summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-08-11 04:25:36 +0000
committerIan Romanick <[email protected]>2005-08-11 04:25:36 +0000
commitac887d421176364fe0756e8ebba9aac11d78b16a (patch)
treee0f1c7b2978e7b0e984572f3f21bd855fb50e1e4 /src/mesa
parent967b006f518849e57fef68ab71359485b1535b3a (diff)
Make ffb driver build on x86-64. The fix is two fold. First, use the
proper DRM_CAS_RESULT to declare the variable used to store the result of DRM_CAS. Second, only use the "real" versions of LOCK_HARDWARE and UNLOCK_HARDWARE on SPARC. That's the only platform where the hardware can really exist.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_lock.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/ffb/ffb_lock.h b/src/mesa/drivers/dri/ffb/ffb_lock.h
index e6295dc0645..7c49f740f89 100644
--- a/src/mesa/drivers/dri/ffb/ffb_lock.h
+++ b/src/mesa/drivers/dri/ffb/ffb_lock.h
@@ -8,14 +8,18 @@
extern void ffbXMesaUpdateState(ffbContextPtr fmesa);
#define FFB_UPDATE_STATE(fmesa) ffbXMesaUpdateState(fmesa)
-/* Lock the hardware and validate our state. */
-#if defined(__i386__)
+/* Lock the hardware and validate our state. This hardware can only ever
+ * exist on SPARC platforms. Don't bother building the real LOCK_HARDWARE and
+ * UNLOCK_HARDWARE code on non-SPARC platforms. The only reason the driver
+ * gets built on non-SPARC is to catch build breakages earlier.
+ */
+#if !defined(__sparc__)
#define LOCK_HARDWARE(fmesa)
#define UNLOCK_HARDWARE(fmesa)
#else
#define LOCK_HARDWARE(fmesa) \
do { \
- int __ret=0; \
+ DRM_CAS_RESULT(__ret); \
DRM_CAS(fmesa->driHwLock, fmesa->hHWContext, \
(DRM_LOCK_HELD | fmesa->hHWContext), __ret);\
if (__ret) { \