mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 05:50:04 +01:00
dix: allow pixmap dirty helper to be used for non-shared pixmaps
this allows the pixmap dirty helper to be used for reverse optimus,
where the GPU wants to copy from the shared pixmap to its VRAM copy.
[airlied: slave_dst is wrong name now but pointless ABI churn at this point]
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8fcb9d91b6)
This commit is contained in:
parent
d817284b01
commit
f21cc327a5
2 changed files with 3 additions and 0 deletions
|
|
@ -243,6 +243,8 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = dirty->slave_dst->master_pixmap;
|
dst = dirty->slave_dst->master_pixmap;
|
||||||
|
if (!dst)
|
||||||
|
dst = dirty->slave_dst;
|
||||||
|
|
||||||
RegionTranslate(dirty_region, -dirty->x, -dirty->y);
|
RegionTranslate(dirty_region, -dirty->x, -dirty->y);
|
||||||
n = RegionNumRects(dirty_region);
|
n = RegionNumRects(dirty_region);
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ fbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp,
|
||||||
pPixmap->devKind = paddedWidth;
|
pPixmap->devKind = paddedWidth;
|
||||||
pPixmap->refcnt = 1;
|
pPixmap->refcnt = 1;
|
||||||
pPixmap->devPrivate.ptr = (pointer) ((char *) pPixmap + base + adjust);
|
pPixmap->devPrivate.ptr = (pointer) ((char *) pPixmap + base + adjust);
|
||||||
|
pPixmap->master_pixmap = NULL;
|
||||||
|
|
||||||
#ifdef FB_DEBUG
|
#ifdef FB_DEBUG
|
||||||
pPixmap->devPrivate.ptr =
|
pPixmap->devPrivate.ptr =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue