[PATCH 1/2] drm/i915: Use anonymous union/struct to save space taken by latency values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Suggested-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.h | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0baf7f3..8471d12 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1730,23 +1730,27 @@ struct drm_i915_private {
 	struct vlv_s0ix_state vlv_s0ix_state;
 
 	struct {
-		/*
-		 * Raw watermark latency values:
-		 * in 0.1us units for WM0,
-		 * in 0.5us units for WM1+.
-		 */
-		/* primary */
-		uint16_t pri_latency[5];
-		/* sprite */
-		uint16_t spr_latency[5];
-		/* cursor */
-		uint16_t cur_latency[5];
-		/*
-		 * Raw watermark memory latency values
-		 * for SKL for all 8 levels
-		 * in 1us units.
-		 */
-		uint16_t skl_latency[8];
+		union {
+			/*
+			 * Raw watermark latency values:
+			 * in 0.1us units for WM0,
+			 * in 0.5us units for WM1+.
+			 */
+			struct {
+				/* primary */
+				uint16_t pri_latency[5];
+				/* sprite */
+				uint16_t spr_latency[5];
+				/* cursor */
+				uint16_t cur_latency[5];
+			};
+
+			/*
+			 * Raw watermark memory latency values for SKL for all
+			 * 8 levels. In 1us units.
+			 */
+			uint16_t skl_latency[8];
+		};
 
 		/*
 		 * The skl_wm_values structure is a bit too big for stack
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux