Mesa (master): st/xorg: Update to new libkms interface but be backwards compatible

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Thu Jan 28 10:42:26 PST 2010


Module: Mesa
Branch: master
Commit: c75e238434f64657e96f09e0215f02cefa6ad6d6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c75e238434f64657e96f09e0215f02cefa6ad6d6

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Thu Jan 28 17:59:26 2010 +0100

st/xorg: Update to new libkms interface but be backwards compatible

---

 src/gallium/state_trackers/xorg/xorg_crtc.c   |    4 ++++
 src/gallium/state_trackers/xorg/xorg_driver.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 2786558..2395d54 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -242,7 +242,11 @@ crtc_load_cursor_argb_kms(xf86CrtcPtr crtc, CARD32 * image)
 	unsigned attr[8];
 
 	attr[0] = KMS_BO_TYPE;
+#ifdef KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8
+	attr[1] = KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8;
+#else
 	attr[1] = KMS_BO_TYPE_CURSOR;
+#endif
 	attr[2] = KMS_WIDTH;
 	attr[3] = 64;
 	attr[4] = KMS_HEIGHT;
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index e4ad789..f53a879 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -1008,7 +1008,11 @@ drv_create_front_buffer_kms(ScrnInfoPtr pScrn)
     int ret;
 
     attr[0] = KMS_BO_TYPE;
+#ifdef KMS_BO_TYPE_SCANOUT_X8R8G8B8
+    attr[1] = KMS_BO_TYPE_SCANOUT_X8R8G8B8;
+#else
     attr[1] = KMS_BO_TYPE_SCANOUT;
+#endif
     attr[2] = KMS_WIDTH;
     attr[3] = pScrn->virtualX;
     attr[4] = KMS_HEIGHT;



More information about the mesa-commit mailing list