[PATCH 13/18] Move some UXA-specific code under #if USE_UXA.

Keith Packard keithp at keithp.com
Sat Aug 16 23:13:16 PDT 2014


This makes the UXA-specific elements of intel_screen_private and a bit
of code in intel_driver covered under #if USE_UXA

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 src/uxa/intel.h        | 6 ++++++
 src/uxa/intel_driver.c | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/uxa/intel.h b/src/uxa/intel.h
index dbd718d..9b4b2fb 100644
--- a/src/uxa/intel.h
+++ b/src/uxa/intel.h
@@ -127,6 +127,7 @@ typedef struct intel_screen_private {
 
 	dri_bufmgr *bufmgr;
 
+#if USE_UXA
 	uint32_t batch_ptr[4096];
 	/** Byte offset in batch_ptr for the next dword to be emitted. */
 	unsigned int batch_used;
@@ -142,6 +143,7 @@ typedef struct intel_screen_private {
 	struct list batch_pixmaps;
 	drm_intel_bo *wa_scratch_bo;
 	OsTimerPtr cache_expire;
+#endif
 
 	/* For Xvideo */
 	Bool use_overlay;
@@ -180,8 +182,10 @@ typedef struct intel_screen_private {
 
         Bool need_entervt;
 
+#if USE_UXA
 	struct _UxaDriver *uxa_driver;
 	int uxa_flags;
+#endif
 	Bool need_sync;
 	int accel_pixmap_offset_alignment;
 	int accel_max_x;
@@ -214,6 +218,7 @@ typedef struct intel_screen_private {
 		drm_intel_bo *gen6_depth_stencil_bo;
 	} video;
 
+#if USE_UXA
 	/* Render accel state */
 	float scale_units[2][2];
 	/** Transform pointers for src/mask, or NULL if identity */
@@ -271,6 +276,7 @@ typedef struct intel_screen_private {
 
 	/* 965 render acceleration state */
 	struct gen4_render_state *gen4_render_state;
+#endif
 
 	/* DRI enabled this generation. */
 	enum dri_type dri2, dri3;
diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index a8bd9ef..4548137 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -210,6 +210,7 @@ static Bool I830GetEarlyOptions(ScrnInfoPtr scrn)
 	if (!intel->Options)
 		return FALSE;
 
+#if USE_UXA
 	intel->fallback_debug = xf86ReturnOptValBool(intel->Options,
 						     OPTION_FALLBACKDEBUG,
 						     FALSE);
@@ -231,6 +232,7 @@ static Bool I830GetEarlyOptions(ScrnInfoPtr scrn)
 				 FALSE))
 		intel->debug_flush |= DEBUG_FLUSH_WAIT;
 
+#endif
 	return TRUE;
 }
 
-- 
2.0.1



More information about the xorg-devel mailing list