* [PATCH] drm/amdgpu: disable CRTCs before teardown
@ 2016-09-25 20:34 Grazvydas Ignotas
2016-09-26 17:29 ` Lukas Wunner
2016-09-26 17:39 ` Lukas Wunner
0 siblings, 2 replies; 4+ messages in thread
From: Grazvydas Ignotas @ 2016-09-25 20:34 UTC (permalink / raw)
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Grazvydas Ignotas
Some code called by drm_crtc_force_disable_all() wants to wait for all
fences, so only do fence teardown after CRTCs are disabled.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 99a15ca..1a1bc79 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1822,11 +1822,11 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
DRM_INFO("amdgpu: finishing device.\n");
adev->shutdown = true;
+ drm_crtc_force_disable_all(adev->ddev);
/* evict vram memory */
amdgpu_bo_evict_vram(adev);
amdgpu_ib_pool_fini(adev);
amdgpu_fence_driver_fini(adev);
- drm_crtc_force_disable_all(adev->ddev);
amdgpu_fbdev_fini(adev);
r = amdgpu_fini(adev);
kfree(adev->ip_block_status);
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] drm/amdgpu: disable CRTCs before teardown
2016-09-25 20:34 [PATCH] drm/amdgpu: disable CRTCs before teardown Grazvydas Ignotas
@ 2016-09-26 17:29 ` Lukas Wunner
2016-09-26 23:00 ` Grazvydas Ignotas
2016-09-26 17:39 ` Lukas Wunner
1 sibling, 1 reply; 4+ messages in thread
From: Lukas Wunner @ 2016-09-26 17:29 UTC (permalink / raw)
To: Grazvydas Ignotas; +Cc: amd-gfx, dri-devel
On Sun, Sep 25, 2016 at 11:34:48PM +0300, Grazvydas Ignotas wrote:
> Some code called by drm_crtc_force_disable_all() wants to wait for all
> fences, so only do fence teardown after CRTCs are disabled.
Ugh, how embarrassing, that was added by me.
Do you have a BUG splat (e.g. soft lockup) for this? I'd be curious to
see exactly where things explode, would also be good to have that in
the commit message.
Thanks!
Lukas
>
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 99a15ca..1a1bc79 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1822,11 +1822,11 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>
> DRM_INFO("amdgpu: finishing device.\n");
> adev->shutdown = true;
> + drm_crtc_force_disable_all(adev->ddev);
> /* evict vram memory */
> amdgpu_bo_evict_vram(adev);
> amdgpu_ib_pool_fini(adev);
> amdgpu_fence_driver_fini(adev);
> - drm_crtc_force_disable_all(adev->ddev);
> amdgpu_fbdev_fini(adev);
> r = amdgpu_fini(adev);
> kfree(adev->ip_block_status);
> --
> 2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm/amdgpu: disable CRTCs before teardown
2016-09-26 17:29 ` Lukas Wunner
@ 2016-09-26 23:00 ` Grazvydas Ignotas
0 siblings, 0 replies; 4+ messages in thread
From: Grazvydas Ignotas @ 2016-09-26 23:00 UTC (permalink / raw)
To: Lukas Wunner; +Cc: amd-gfx, dri-devel
On Mon, Sep 26, 2016 at 8:29 PM, Lukas Wunner <lukas@wunner.de> wrote:
> On Sun, Sep 25, 2016 at 11:34:48PM +0300, Grazvydas Ignotas wrote:
>> Some code called by drm_crtc_force_disable_all() wants to wait for all
>> fences, so only do fence teardown after CRTCs are disabled.
>
> Ugh, how embarrassing, that was added by me.
>
> Do you have a BUG splat (e.g. soft lockup) for this? I'd be curious to
> see exactly where things explode, would also be good to have that in
> the commit message.
It can be seen here, the first one:
https://bugs.freedesktop.org/attachment.cgi?id=126769
I'm not sure it's that useful to have the full BUG dump with all the
registers, pointers and stuff in the commit message, like some people
like to have, most of that is only relevant for my specific build.
Gražvydas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu: disable CRTCs before teardown
2016-09-25 20:34 [PATCH] drm/amdgpu: disable CRTCs before teardown Grazvydas Ignotas
2016-09-26 17:29 ` Lukas Wunner
@ 2016-09-26 17:39 ` Lukas Wunner
1 sibling, 0 replies; 4+ messages in thread
From: Lukas Wunner @ 2016-09-26 17:39 UTC (permalink / raw)
To: Grazvydas Ignotas, Alex Deucher; +Cc: amd-gfx, dri-devel
On Sun, Sep 25, 2016 at 11:34:48PM +0300, Grazvydas Ignotas wrote:
> Some code called by drm_crtc_force_disable_all() wants to wait for all
> fences, so only do fence teardown after CRTCs are disabled.
>
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Fixes: 84b89bdcedf8 ("drm/amdgpu: Turn off CRTCs on driver unload")
Cc: stable@vger.kernel.org # v4.8+
Alex, would it be possible to get this fix into 4.8 this week?
Thanks!
Lukas
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 99a15ca..1a1bc79 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1822,11 +1822,11 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>
> DRM_INFO("amdgpu: finishing device.\n");
> adev->shutdown = true;
> + drm_crtc_force_disable_all(adev->ddev);
> /* evict vram memory */
> amdgpu_bo_evict_vram(adev);
> amdgpu_ib_pool_fini(adev);
> amdgpu_fence_driver_fini(adev);
> - drm_crtc_force_disable_all(adev->ddev);
> amdgpu_fbdev_fini(adev);
> r = amdgpu_fini(adev);
> kfree(adev->ip_block_status);
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-26 23:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-25 20:34 [PATCH] drm/amdgpu: disable CRTCs before teardown Grazvydas Ignotas
2016-09-26 17:29 ` Lukas Wunner
2016-09-26 23:00 ` Grazvydas Ignotas
2016-09-26 17:39 ` Lukas Wunner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).