Skip to content

Commit 5b83c25

Browse files
committed
Merge tag 'amd-drm-fixes-5.8-2020-06-24' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
amd-drm-fixes-5.8-2020-06-24: amdgpu: - Fix missed mutex unlock in DC error path - Fix firmware leak for sdma5 - DC bpc property fixes amdkfd: - Fix memleak in an error path radeon: - Fix copy paste typo in NI DPM spll validation Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents a1cd348 + b5b78a6 commit 5b83c25

File tree

6 files changed

+16
-6
lines changed

6 files changed

+16
-6
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,12 @@ static int sdma_v5_0_sw_fini(void *handle)
12981298
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
12991299
int i;
13001300

1301-
for (i = 0; i < adev->sdma.num_instances; i++)
1301+
for (i = 0; i < adev->sdma.num_instances; i++) {
1302+
if (adev->sdma.instance[i].fw != NULL)
1303+
release_firmware(adev->sdma.instance[i].fw);
1304+
13021305
amdgpu_ring_fini(&adev->sdma.instance[i].ring);
1306+
}
13031307

13041308
return 0;
13051309
}

drivers/gpu/drm/amd/amdkfd/kfd_process.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ struct kfd_process *kfd_create_process(struct file *filep)
428428
(int)process->lead_thread->pid);
429429
if (ret) {
430430
pr_warn("Creating procfs pid directory failed");
431+
kobject_put(process->kobj);
431432
goto out;
432433
}
433434

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5024,7 +5024,8 @@ create_validate_stream_for_sink(struct amdgpu_dm_connector *aconnector,
50245024
struct drm_connector *connector = &aconnector->base;
50255025
struct amdgpu_device *adev = connector->dev->dev_private;
50265026
struct dc_stream_state *stream;
5027-
int requested_bpc = connector->state ? connector->state->max_requested_bpc : 8;
5027+
const struct drm_connector_state *drm_state = dm_state ? &dm_state->base : NULL;
5028+
int requested_bpc = drm_state ? drm_state->max_requested_bpc : 8;
50285029
enum dc_status dc_result = DC_OK;
50295030

50305031
do {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,6 @@ static const struct {
10581058
{"link_settings", &dp_link_settings_debugfs_fops},
10591059
{"phy_settings", &dp_phy_settings_debugfs_fop},
10601060
{"test_pattern", &dp_phy_test_pattern_fops},
1061-
{"output_bpc", &output_bpc_fops},
10621061
{"vrr_range", &vrr_range_fops},
10631062
#ifdef CONFIG_DRM_AMD_DC_HDCP
10641063
{"hdcp_sink_capability", &hdcp_sink_capability_fops},
@@ -1142,6 +1141,9 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
11421141
debugfs_create_file_unsafe("force_yuv420_output", 0644, dir, connector,
11431142
&force_yuv420_output_fops);
11441143

1144+
debugfs_create_file("output_bpc", 0644, dir, connector,
1145+
&output_bpc_fops);
1146+
11451147
connector->debugfs_dpcd_address = 0;
11461148
connector->debugfs_dpcd_size = 0;
11471149

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,10 @@ static ssize_t srm_data_read(struct file *filp, struct kobject *kobj, struct bin
510510

511511
srm = psp_get_srm(work->hdcp.config.psp.handle, &srm_version, &srm_size);
512512

513-
if (!srm)
514-
return -EINVAL;
513+
if (!srm) {
514+
ret = -EINVAL;
515+
goto ret;
516+
}
515517

516518
if (pos >= srm_size)
517519
ret = 0;

drivers/gpu/drm/radeon/ni_dpm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2127,7 +2127,7 @@ static int ni_init_smc_spll_table(struct radeon_device *rdev)
21272127
if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT))
21282128
ret = -EINVAL;
21292129

2130-
if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT))
2130+
if (fb_div & ~(SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT))
21312131
ret = -EINVAL;
21322132

21332133
if (clk_v & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_SHIFT))

0 commit comments

Comments
 (0)