Codebase list xserver-xorg-video-amdgpu / 5b8bc9f
Don't set up black scanout buffer if LeaveVT is called from CloseScreen Avoids a crash described in https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/43#note_223718 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Michel Dänzer authored 4 years ago Michel Dänzer committed 4 years ago
1 changed file(s) with 10 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
22662266 unsigned w = 0, h = 0;
22672267 int i;
22682268
2269 /* If we're called from CloseScreen, trying to clear the black
2270 * scanout BO will likely crash and burn
2271 */
2272 if (!pScreen->GCperDepth[0])
2273 goto hide_cursors;
2274
22692275 /* Compute maximum scanout dimensions of active CRTCs */
22702276 for (i = 0; i < xf86_config->num_crtc; i++) {
22712277 crtc = xf86_config->crtc[i];
23382344 info->pixel_bytes * pScrn->virtualY);
23392345 }
23402346
2341 TimerSet(NULL, 0, 1000, cleanup_black_fb, pScreen);
2342
2347 if (pScreen->GCperDepth[0])
2348 TimerSet(NULL, 0, 1000, cleanup_black_fb, pScreen);
2349
2350 hide_cursors:
23432351 xf86_hide_cursors(pScrn);
23442352
23452353 amdgpu_drop_drm_master(pScrn);