[Intel-gfx] [PATCH v2 10/11] drm/i915: Improve PSR2 CTL macros

José Roberto de Souza jose.souza at intel.com
Fri Nov 30 02:25:24 UTC 2018


- Reusing the EDP_PSR2_FRAME_BEFORE_SU_SHIFT in EDP_PSR2_FRAME_BEFORE_SU
- Removing unused EDP_PSR2_FRAME_BEFORE_SU_MASK
- Adding EDP_PSR2_FRAME_BEFORE_SU_MAX
- Adding EDP_PSR2_IDLE_FRAME()
- Adding EDP_PSR2_IDLE_FRAME_MAX

In the next patch the new macros will be used.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index d3ef97915455..9e46da5032c0 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4216,10 +4216,11 @@ enum {
 #define   EDP_PSR2_TP2_TIME_50us	(3 << 8)
 #define   EDP_PSR2_TP2_TIME_MASK	(3 << 8)
 #define   EDP_PSR2_FRAME_BEFORE_SU_SHIFT 4
-#define   EDP_PSR2_FRAME_BEFORE_SU_MASK	(0xf << 4)
-#define   EDP_PSR2_FRAME_BEFORE_SU(a)	((a) << 4)
-#define   EDP_PSR2_IDLE_FRAME_MASK	0xf
+#define   EDP_PSR2_FRAME_BEFORE_SU_MAX	0xf
+#define   EDP_PSR2_FRAME_BEFORE_SU(a)	((a) << EDP_PSR2_FRAME_BEFORE_SU_SHIFT)
 #define   EDP_PSR2_IDLE_FRAME_SHIFT	0
+#define   EDP_PSR2_IDLE_FRAME_MAX	0xf
+#define   EDP_PSR2_IDLE_FRAME(a)	((a) << EDP_PSR2_IDLE_FRAME_SHIFT)
 
 #define _PSR_EVENT_TRANS_A			0x60848
 #define _PSR_EVENT_TRANS_B			0x61848
-- 
2.19.2



More information about the Intel-gfx mailing list