mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Only map front buffer if glamor acceleration is disabled (v2)
Otherwise the front buffer may not be accessible by the CPU, because Mesa sets the AMDGPU_GEM_CREATE_NO_CPU_ACCESS flag for tiled buffers, because accessing tiled buffers with the CPU makes little sense. v2: Also handle Option "AccelMethod" "none" Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
2fcb7dadd3
commit
a3eac85d81
@@ -1431,7 +1431,8 @@ static Bool amdgpu_setup_kernel_mem(ScreenPtr pScreen)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (amdgpu_bo_map(pScrn, info->front_buffer)) {
|
||||
if (!info->use_glamor &&
|
||||
amdgpu_bo_map(pScrn, info->front_buffer) != 0) {
|
||||
ErrorF("Failed to map front buffer memory\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1741,7 +1741,7 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (amdgpu_bo_map(scrn, info->front_buffer)) {
|
||||
if (!info->use_glamor && amdgpu_bo_map(scrn, info->front_buffer) != 0) {
|
||||
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
|
||||
"Failed to map front buffer memory\n");
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user