[PATCH amdgpu] Fix crash when page flipping in multi-X-Screen/Zaphod mode

Michel Dänzer michel at daenzer.net
Wed Dec 19 17:28:10 UTC 2018


On 2018-12-19 7:56 a.m., Mario Kleiner wrote:
> amdgpu_do_pageflip() indexed the flipdata->fb[] array
> indexing over config->num_crtc, but the flip completion
> routines, e.g., drmmode_flip_handler(), index that array
> via the crtc hw id from drmmode_get_crtc_id(crtc).
> 
> This is mismatched and causes indexing into the wrong
> array slot at flip completion -> Server crash.
> 
> Always use drmmode_get_crtc_id(crtc) for indexing into
> the array to fix this.
> 
> Tested on a dual-X-Screen setup with one video output
> assigned to each X-Screen, page-flipping an OpenGL app
> on either of both X-Screens. This used to crash when
> flipping on X-Screen 1, now it doesn't anymore.
> 
> Fixes: 9b6782c821e0 "Store FB for each CRTC in drmmode_flipdata_rec"
> (Ported from radeon commit 0058fd2ebf4c900b12f129984e98886a7ac84b2f)
> Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>

I created
https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/20
for this and merged it, thanks again!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list