1
0
Fork 0

drm/amd/display: call amdgpu_dm_fini when hw_fini.

to free up drm mode_config info.

fix issue: unload amdgpu, can't load amdgpu again.
[drm:drm_debugfs_init [drm]] *ERROR* Cannot create /sys/kernel/debug/dri/0
[drm:drm_minor_register [drm]] *ERROR* DRM: Failed to initialize /sys/kernel/debug/dri.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Andrey Grodzovsky<andrey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
hifive-unleashed-5.1
Rex Zhu 2017-05-22 13:11:15 +08:00 committed by Alex Deucher
parent c14833c672
commit 21de3396b4
2 changed files with 8 additions and 4 deletions

View File

@ -395,9 +395,8 @@ void amdgpu_dm_fini(struct amdgpu_device *adev)
adev->dm.freesync_module = NULL;
}
/* DC Destroy TODO: Replace destroy DAL */
{
if (adev->dm.dc)
dc_destroy(&adev->dm.dc);
}
return;
}
@ -490,7 +489,7 @@ static int dm_hw_fini(void *handle)
amdgpu_dm_hpd_fini(adev);
amdgpu_dm_irq_fini(adev);
amdgpu_dm_fini(adev);
return 0;
}

View File

@ -1541,7 +1541,12 @@ enum dc_irq_source dc_interrupt_to_irq_source(
void dc_interrupt_set(const struct dc *dc, enum dc_irq_source src, bool enable)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
struct core_dc *core_dc;
if (dc == NULL)
return;
core_dc = DC_TO_CORE(dc);
dal_irq_service_set(core_dc->res_pool->irqs, src, enable);
}