xf86dga: handle DGAAvailable for gpu screens. (v2)

v2: Split out DGAAvailable into two interfaces, one for calls from protocol
decoding and one for internal usage, after discussion with ajax and keithp.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2012-06-14 15:03:02 +01:00
commit 05d2472cd2
4 changed files with 15 additions and 5 deletions

View file

@ -97,7 +97,7 @@ xColorItem *pdefs;
}
writeColormap = scrninfp->vtSema;
if (DGAAvailable(scrnIndex)) {
if (DGAScreenAvailable(pmap->pScreen)) {
writeColormap = writeColormap ||
(DGAGetDirectMode(scrnIndex) &&
!(DGAGetFlags(scrnIndex) & XF86DGADirectColormap)) ||