diff options
author | Dave Airlie <airlied@redhat.com> | 2015-07-15 10:15:51 +1000 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-09-13 10:27:19 +0200 |
commit | 7b634067c13045671685a9f00bfbac626ed68f94 (patch) | |
tree | 87e229967549b50c00b422d9d42f30c5b9932aca /dix | |
parent | df88008f92f85ef96d9fe48ac509d027570424eb (diff) |
xf86Cursor: Add hw cursor support for prime
Currently with PRIME if we detect a secondary GPU,
we switch to using SW cursors, this isn't optimal,
esp for the intel/nvidia combinations, we have
no choice for the USB offload devices.
This patch checks on each slave screen if hw
cursors are enabled, and also calls set cursor
and move cursor on all screens.
Cc: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/dispatch.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index a3c2fbb31..0edcfeea8 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3965,6 +3965,16 @@ AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , update_desktop_dimensions(); + /* + * We cannot register the Screen PRIVATE_CURSOR key if cursors are already + * created, because dix/privates.c does not have relocation code for + * PRIVATE_CURSOR. Once this is fixed the if() can be removed and we can + * register the Screen PRIVATE_CURSOR key unconditionally. + */ + if (!dixPrivatesCreated(PRIVATE_CURSOR)) + dixRegisterScreenPrivateKey(&cursorScreenDevPriv, pScreen, + PRIVATE_CURSOR, 0); + return i; } |