summaryrefslogtreecommitdiff
path: root/src/amdgpu_kms.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-09-08 16:48:59 +0900
committerMichel Dänzer <michel@daenzer.net>2016-09-09 19:02:28 +0900
commitb10ecdbd89b0a60a990c78c3e53bab6c4c96fe9f (patch)
treea3b4c7b98c6a5eb68e6cd40211a6e7e0e70d466a /src/amdgpu_kms.c
parent9565981f751b0884cbfa885b8f3af3d41a965a2b (diff)
Use drmmode_crtc_scanout_* helpers for RandR 1.4 scanout pixmaps
This should allow using multiple CRTCs via RandR 1.4 even with xserver < 1.17. It also simplifies the code a little, and paves the way for following changes. (Ported from radeon commits 4cfa4615f79f64062e5e771cd45dd7048f48b4f6 and a92c27484703abc7c410b6ae0e4b8d1efbbb8e6f) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_kms.c')
-rw-r--r--src/amdgpu_kms.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 1bce781..9670c3f 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -595,15 +595,20 @@ static void AMDGPUBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)
(*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
pScreen->BlockHandler = AMDGPUBlockHandler_KMS;
- for (c = 0; c < xf86_config->num_crtc; c++) {
- if (info->tear_free)
- amdgpu_scanout_flip(pScreen, info, xf86_config->crtc[c]);
- else if (info->shadow_primary
+#ifdef AMDGPU_PIXMAP_SHARING
+ if (!pScreen->isGPU)
+#endif
+ {
+ for (c = 0; c < xf86_config->num_crtc; c++) {
+ if (info->tear_free)
+ amdgpu_scanout_flip(pScreen, info, xf86_config->crtc[c]);
+ else if (info->shadow_primary
#if XF86_CRTC_VERSION >= 4
- || xf86_config->crtc[c]->driverIsPerformingTransform
+ || xf86_config->crtc[c]->driverIsPerformingTransform
#endif
- )
- amdgpu_scanout_update(xf86_config->crtc[c]);
+ )
+ amdgpu_scanout_update(xf86_config->crtc[c]);
+ }
}
if (info->use_glamor)