[PATCH] drm/amd/display: call amdgpu_dm_fini whewn hw_fini.
Grodzovsky, Andrey
Andrey.Grodzovsky at amd.com
Wed May 24 13:40:49 UTC 2017
> -----Original Message-----
> From: Deucher, Alexander
> Sent: Wednesday, May 24, 2017 9:10 AM
> To: Zhu, Rex; amd-gfx at lists.freedesktop.org; Wentland, Harry; Grodzovsky,
> Andrey
> Cc: Zhu, Rex
> Subject: RE: [PATCH] drm/amd/display: call amdgpu_dm_fini whewn
> hw_fini.
>
> > -----Original Message-----
> > From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> > Of Rex Zhu
> > Sent: Wednesday, May 24, 2017 7:20 AM
> > To: amd-gfx at lists.freedesktop.org
> > Cc: Zhu, Rex
> > Subject: [PATCH] drm/amd/display: call amdgpu_dm_fini whewn hw_fini.
> >
> > to free up drm mode_config info.
> >
> > fix issue: unload amdgpu, can't load amdgpu again.
>
> +Harry, Andrey
>
> Acked-by: Alex Deucher <alexander.deucher at amd.com>
>
> >
> > 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); }
> >
> > --
> > 1.9.1
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by: Andrey Grodzovsky<andrey.grodzovsky at amd.com>
More information about the amd-gfx
mailing list