summaryrefslogtreecommitdiff
path: root/src/amdgpu_kms.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/amdgpu_kms.c')
-rw-r--r--src/amdgpu_kms.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index f665a01..e0b7358 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -806,7 +806,7 @@ amdgpu_dirty_update(ScrnInfoPtr scrn)
Bool
amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id,
- DrawablePtr src_draw, BoxPtr extents)
+ PixmapPtr src_pix, BoxPtr extents)
{
drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;
RegionRec region = { .extents = *extents, .data = NULL };
@@ -834,10 +834,9 @@ amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id,
PictFormatPtr format = PictureWindowFormat(pScreen->root);
int error;
PicturePtr src, dst;
- XID include_inferiors = IncludeInferiors;
- src = CreatePicture(None, src_draw, format, CPSubwindowMode,
- &include_inferiors, serverClient, &error);
+ src = CreatePicture(None, &src_pix->drawable, format, 0L, NULL,
+ serverClient, &error);
if (!src) {
ErrorF("Failed to create source picture for transformed scanout "
"update\n");
@@ -880,7 +879,7 @@ amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id,
GCPtr gc = GetScratchGC(pDraw->depth, pScreen);
ValidateGC(pDraw, gc);
- (*gc->ops->CopyArea)(src_draw, pDraw, gc,
+ (*gc->ops->CopyArea)(&src_pix->drawable, pDraw, gc,
xf86_crtc->x + extents->x1, xf86_crtc->y + extents->y1,
extents->x2 - extents->x1, extents->y2 - extents->y1,
extents->x1, extents->y1);
@@ -912,7 +911,7 @@ amdgpu_scanout_update_handler(xf86CrtcPtr crtc, uint32_t frame, uint64_t usec,
!drmmode_crtc->flip_pending &&
drmmode_crtc->dpms_mode == DPMSModeOn) {
if (amdgpu_scanout_do_update(crtc, drmmode_crtc->scanout_id,
- &screen->GetWindowPixmap(screen->root)->drawable,
+ screen->GetWindowPixmap(screen->root),
&region->extents))
RegionEmpty(region);
}
@@ -993,7 +992,7 @@ amdgpu_scanout_flip(ScreenPtr pScreen, AMDGPUInfoPtr info,
scanout_id = drmmode_crtc->scanout_id ^ 1;
if (!amdgpu_scanout_do_update(xf86_crtc, scanout_id,
- &pScreen->GetWindowPixmap(pScreen->root)->drawable,
+ pScreen->GetWindowPixmap(pScreen->root),
&region->extents))
return;
RegionEmpty(region);