Kernel crash/Null pointer dereference on vblank
Johannes Hirte
johannes.hirte at datenkhaos.de
Thu Nov 23 17:28:02 UTC 2017
On 2017 Nov 23, Leo Li wrote:
> Hi Johannes,
>
> The s3 resume issue looks to be a problem with amdgpu/display. Could you
> give the attached patch a try?
>
> Thanks,
> Leo
>
> On 2017-11-23 07:27 AM, Johannes Hirte wrote:
> > On 2017 Nov 23, Chunming Zhou wrote:
> >> See the attached email, they fixed same issue, each of them is ok to fix
> >> your issue, your calltrace isĀ same as the second.
> >>
> >> We should already push the first patch in early time, could you check if
> >> the first patch is in your branch?
> >>
> >
> > This patch (series) is not upstream yet. Just tested it, but this doesn't fix the
> > use-after-free on S3 resume with dc enabled.
> >
> From 8656ef112d53f8c08f6571dd0d093f03d2e6cc30 Mon Sep 17 00:00:00 2001
> From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>
> Date: Thu, 16 Nov 2017 15:17:27 -0500
> Subject: [PATCH] drm/amdgpu/display: Do not put drm_atomic_state on resume
>
> drm_atomic_helper_resume now puts it for us. See relevant patch here:
> https://lists.freedesktop.org/archives/dri-devel/2017-October/154268.html
>
> Change-Id: Ief246492f721a1cf281d48e9d1a7029e5cefc2da
> Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> 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 5731167..951ea77 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -688,7 +688,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
>
> ret = drm_atomic_helper_resume(ddev, adev->dm.cached_state);
>
> - drm_atomic_state_put(adev->dm.cached_state);
> adev->dm.cached_state = NULL;
>
> amdgpu_dm_irq_resume_late(adev);
> --
> 2.7.4
>
Looks good, with this patch the use-after-free is gone and S3 resume woks as
expected.
You can add my Tested-by.
--
Regards,
Johannes
More information about the amd-gfx
mailing list