summaryrefslogtreecommitdiff
path: root/src/radeon.h
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-12-27 17:13:30 +0100
committerMichel Dänzer <michel@daenzer.net>2017-12-28 15:17:56 +0100
commit1fe8ca75974c5241c3b556b757f9c966c9ce5002 (patch)
tree09052856b54fea5fe261bb06f397e57614aa6f75 /src/radeon.h
parentb4ce8913ac392df339081f6f3e28bf79a239ee75 (diff)
Keep track of how many SW cursors are visible on each screen
And use this to determine when we cannot use page flipping for DRI clients. We previously did this based on whether the HW cursor cannot be used on at least one CRTC, which had at least two issues: * Even while the HW cursor cannot be used, no SW cursor may actually be visible (e.g. because all cursors are disabled), in which case we can use page flipping for DRI clients anyway * Even while the HW cursor can be used, there may be SW cursors visible from non-core pointer devices, in which case we cannot use page flipping for DRI clients anyway (Ported from amdgpu commit 69e20839bfeb3ee0b0a732d72de0a32d6c5435fc) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon.h')
-rw-r--r--src/radeon.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/radeon.h b/src/radeon.h
index cc5dc09f..9658e029 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -500,6 +500,13 @@ struct radeon_client_priv {
uint_fast32_t needs_flush;
};
+struct radeon_device_priv {
+ CursorPtr cursor;
+ Bool sprite_visible;
+};
+
+extern DevScreenPrivateKeyRec radeon_device_private_key;
+
typedef struct {
EntityInfoPtr pEnt;
pciVideoPtr PciInfo;
@@ -550,6 +557,12 @@ typedef struct {
CreateScreenResourcesProcPtr CreateScreenResources;
CreateWindowProcPtr CreateWindow;
WindowExposuresProcPtr WindowExposures;
+ void (*SetCursor) (DeviceIntPtr pDev, ScreenPtr pScreen,
+ CursorPtr pCursor, int x, int y);
+ void (*MoveCursor) (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
+
+ /* Number of SW cursors currently visible on this screen */
+ int sprites_visible;
Bool IsSecondary;