[PATCH 1/2] amdgpu: Only destroy fbdev framebuffer if it was initialized

Alex Deucher alexdeucher at gmail.com
Mon Sep 11 14:16:27 UTC 2017


On Mon, Sep 11, 2017 at 4:24 AM, Christian König
<deathsimple at vodafone.de> wrote:
> Am 11.09.2017 um 10:10 schrieb Michel Dänzer:
>>
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> Fixes crash when trying to unload the amdgpu module before the fbdev
>> framebuffer was initialized, which can happen since the DRM fbdev helper
>> code supports deferred setup.
>>
>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
>
>
> Acked-by: Christian König <christian.koenig at amd.com> for both.

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> index 9afa9c097e1f..4136996d77ef 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> @@ -303,10 +303,10 @@ static int amdgpu_fbdev_destroy(struct drm_device
>> *dev, struct amdgpu_fbdev *rfb
>>         if (rfb->obj) {
>>                 amdgpufb_destroy_pinned_object(rfb->obj);
>>                 rfb->obj = NULL;
>> +               drm_framebuffer_unregister_private(&rfb->base);
>> +               drm_framebuffer_cleanup(&rfb->base);
>>         }
>>         drm_fb_helper_fini(&rfbdev->helper);
>> -       drm_framebuffer_unregister_private(&rfb->base);
>> -       drm_framebuffer_cleanup(&rfb->base);
>>         return 0;
>>   }
>
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list