[PATCH 15/36] xf86dga: handle DGAAvailable for gpu screens.
Dave Airlie
airlied at gmail.com
Mon Jul 2 03:13:08 PDT 2012
From: Dave Airlie <airlied at redhat.com>
Just check for GPU screens, in DGAAvailable,
should probably overhaul DGA interface at some point,
or remove it.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
hw/xfree86/common/xf86DGA.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 6416372..4fe12f2 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -523,10 +523,15 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode)
Bool
DGAAvailable(int index)
{
+ ScreenPtr pScreen;
if (!DGAScreenKeyRegistered)
return FALSE;
- if (DGA_GET_SCREEN_PRIV(screenInfo.screens[index]))
+ if (index >= GPU_SCREEN_OFFSET)
+ pScreen = screenInfo.gpuscreens[index - GPU_SCREEN_OFFSET];
+ else
+ pScreen = screenInfo.screens[index];
+ if (DGA_GET_SCREEN_PRIV(pScreen))
return TRUE;
return FALSE;
--
1.7.10.2
More information about the xorg-devel
mailing list