[PATCH] Revert "drm/amdgpu: Verify bo size can fit framebuffer size on init."

Pierre-Loup A. Griffais pgriffais at valvesoftware.com
Sat May 1 19:45:17 UTC 2021



On 4/30/21 6:24 AM, Michel Dänzer wrote:
> On 2021-04-29 10:50 p.m., Bas Nieuwenhuizen wrote:
>> This reverts commit f258907fdd835e1aed6d666b00cdd0f186676b7c.
>>
>> Same problem as "drm/amdgpu: Verify bo size can fit framebuffer size",
>> but because it gets checked earlier it now only triggers on the
>> modifiers case.
>>
>> There are a couple of reasons why the DRM core BO size check won't
>> work for AMDGPU, especially around DCC planes.
>>
>> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
>> ---
>>
>> For -fixes. Might have some conflicts with
>> "drm/amdgpu: Ensure that the modifier requested is supported by plane"
>> for amd-staging-drm-next
> 
> This interacts badly with 79fcd446e7e1 "drm/amdgpu: Fix memory leak", resulting in BOs getting destroyed prematurely and ensuing badness. To avoid that, at least the drm_gem_object_put call needs to be removed from the end of amdgpu_display_user_framebuffer_create needs to be removed as well, if not 79fcd446e7e1 reverted altogether.
> 
> 
> I suspect 79fcd446e7e1 was at least partly a fix-up for f258907fdd83, to compensate for drm_gem_fb_init_with_funcs incrementing the BO reference counts.

Thanks much for the pointer, reverting "drm/amdgpu: Fix memory leak" in 
addition to the above patch yields a stable kernel on my side again. 
Otherwise, things crash when gamescope attempts to flip its cursor 
surface onto the screen.

> 
> 



More information about the amd-gfx mailing list