Commit a3eac85d authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer

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: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2fcb7dad
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment