[PATCH] drm/amd/display: call amdgpu_dm_fini whewn hw_fini.
Harry Wentland
harry.wentland at amd.com
Wed May 24 13:43:26 UTC 2017
Please fix the typo (whewn -> when) in the title.
With that this patch is
Reviewed-by: Harry Wentland <harry.wentland at amd.com>
Harry
On 2017-05-24 07:20 AM, Rex Zhu wrote:
> to free up drm mode_config info.
>
> fix issue: unload amdgpu, can't load amdgpu again.
>
> Change-Id: I493bc923b039eae69717cbe8a85c8f3f3ea97465
> [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 at amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++---
> drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++++-
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index e39aef6..2774f86 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -393,9 +393,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;
> }
>
> @@ -488,7 +487,7 @@ static int dm_hw_fini(void *handle)
> amdgpu_dm_hpd_fini(adev);
>
> amdgpu_dm_irq_fini(adev);
> -
> + amdgpu_dm_fini(adev);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 8106e01..8e1b573 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -1583,7 +1583,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);
> }
>
>
More information about the amd-gfx
mailing list