Skip to content

Commit d28e256

Browse files
committed
Merge tag 'amd-drm-fixes-5.14-2021-07-28' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-5.14-2021-07-28: amdgpu: - Fix resource leak in an error path - Avoid stack contents exposure in error path - pmops check fix for S0ix vs S3 - DCN 2.1 display fixes - DCN 2.0 display fix - Backlight control fix for laptops with HDR panels - Maintainers updates Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 80c7917 + ec30ce4 commit d28e256

File tree

8 files changed

+16
-14
lines changed

8 files changed

+16
-14
lines changed

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15468,6 +15468,8 @@ M: Pan, Xinhui <[email protected]>
1546815468
1546915469
S: Supported
1547015470
T: git https://gitlab.freedesktop.org/agd5f/linux.git
15471+
B: https://gitlab.freedesktop.org/drm/amd/-/issues
15472+
C: irc://irc.oftc.net/radeon
1547115473
F: drivers/gpu/drm/amd/
1547215474
F: drivers/gpu/drm/radeon/
1547315475
F: include/uapi/drm/amdgpu_drm.h

drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/slab.h>
2727
#include <linux/power_supply.h>
2828
#include <linux/pm_runtime.h>
29+
#include <linux/suspend.h>
2930
#include <acpi/video.h>
3031
#include <acpi/actbl.h>
3132

@@ -1042,7 +1043,7 @@ bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
10421043
#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE)
10431044
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
10441045
if (adev->flags & AMD_IS_APU)
1045-
return true;
1046+
return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
10461047
}
10471048
#endif
10481049
return false;

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,13 +3504,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
35043504
r = amdgpu_device_get_job_timeout_settings(adev);
35053505
if (r) {
35063506
dev_err(adev->dev, "invalid lockup_timeout parameter syntax\n");
3507-
goto failed_unmap;
3507+
return r;
35083508
}
35093509

35103510
/* early init functions */
35113511
r = amdgpu_device_ip_early_init(adev);
35123512
if (r)
3513-
goto failed_unmap;
3513+
return r;
35143514

35153515
/* doorbell bar mapping and doorbell index init*/
35163516
amdgpu_device_doorbell_init(adev);
@@ -3736,10 +3736,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
37363736
failed:
37373737
amdgpu_vf_error_trans_all(adev);
37383738

3739-
failed_unmap:
3740-
iounmap(adev->rmmio);
3741-
adev->rmmio = NULL;
3742-
37433739
return r;
37443740
}
37453741

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
6767

6868
err = psp_init_asd_microcode(psp, chip_name);
6969
if (err)
70-
goto out;
70+
return err;
7171

7272
snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ta.bin", chip_name);
7373
err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev);
@@ -80,7 +80,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
8080
} else {
8181
err = amdgpu_ucode_validate(adev->psp.ta_fw);
8282
if (err)
83-
goto out2;
83+
goto out;
8484

8585
ta_hdr = (const struct ta_firmware_header_v1_0 *)
8686
adev->psp.ta_fw->data;
@@ -105,10 +105,9 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
105105

106106
return 0;
107107

108-
out2:
108+
out:
109109
release_firmware(adev->psp.ta_fw);
110110
adev->psp.ta_fw = NULL;
111-
out:
112111
if (err) {
113112
dev_err(adev->dev,
114113
"psp v12.0: Failed to load firmware \"%s\"\n",

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,9 +2429,9 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
24292429
max_cll = conn_base->hdr_sink_metadata.hdmi_type1.max_cll;
24302430
min_cll = conn_base->hdr_sink_metadata.hdmi_type1.min_cll;
24312431

2432-
if (caps->ext_caps->bits.oled == 1 ||
2432+
if (caps->ext_caps->bits.oled == 1 /*||
24332433
caps->ext_caps->bits.sdr_aux_backlight_control == 1 ||
2434-
caps->ext_caps->bits.hdr_aux_backlight_control == 1)
2434+
caps->ext_caps->bits.hdr_aux_backlight_control == 1*/)
24352435
caps->aux_support = true;
24362436

24372437
if (amdgpu_backlight == 0)

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, struct
197197

198198
REG_UPDATE(DENTIST_DISPCLK_CNTL,
199199
DENTIST_DISPCLK_WDIVIDER, dispclk_wdivider);
200-
// REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, 1, 5, 100);
200+
REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, 1, 50, 1000);
201201
REG_UPDATE(DENTIST_DISPCLK_CNTL,
202202
DENTIST_DPPCLK_WDIVIDER, dppclk_wdivider);
203203
REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DPPCLK_CHG_DONE, 1, 5, 100);

drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ struct _vcs_dpi_ip_params_st dcn2_1_ip = {
109109
.max_page_table_levels = 4,
110110
.pte_chunk_size_kbytes = 2,
111111
.meta_chunk_size_kbytes = 2,
112+
.min_meta_chunk_size_bytes = 256,
112113
.writeback_chunk_size_kbytes = 2,
113114
.line_buffer_size_bits = 789504,
114115
.is_line_buffer_bpp_fixed = 0,

drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,9 @@ static bool CalculatePrefetchSchedule(
841841
else
842842
*DestinationLinesForPrefetch = dst_y_prefetch_equ;
843843

844+
// Limit to prevent overflow in DST_Y_PREFETCH register
845+
*DestinationLinesForPrefetch = dml_min(*DestinationLinesForPrefetch, 63.75);
846+
844847
dml_print("DML: VStartup: %d\n", VStartup);
845848
dml_print("DML: TCalc: %f\n", TCalc);
846849
dml_print("DML: TWait: %f\n", TWait);

0 commit comments

Comments
 (0)