Skip to content

Commit cc8853f

Browse files
committed
drm/i915: Add PSR2 selective update status registers and bits definitions
This register contains how many blocks was sent in the past selective updates. Those registers are not kept set all the times but polling it after flip can show the values corresponding to the last 8 frames. v2: Improved macros(Dhinakaran) Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190117205548.28378-3-jose.souza@intel.com
1 parent 47c6cd5 commit cc8853f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4272,6 +4272,15 @@ enum {
42724272
#define EDP_PSR2_STATUS_STATE_MASK (0xf << 28)
42734273
#define EDP_PSR2_STATUS_STATE_SHIFT 28
42744274

4275+
#define _PSR2_SU_STATUS_0 0x6F914
4276+
#define _PSR2_SU_STATUS_1 0x6F918
4277+
#define _PSR2_SU_STATUS_2 0x6F91C
4278+
#define _PSR2_SU_STATUS(index) _MMIO(_PICK_EVEN((index), _PSR2_SU_STATUS_0, _PSR2_SU_STATUS_1))
4279+
#define PSR2_SU_STATUS(frame) (_PSR2_SU_STATUS((frame) / 3))
4280+
#define PSR2_SU_STATUS_SHIFT(frame) (((frame) % 3) * 10)
4281+
#define PSR2_SU_STATUS_MASK(frame) (0x3ff << PSR2_SU_STATUS_SHIFT(frame))
4282+
#define PSR2_SU_STATUS_FRAMES 8
4283+
42754284
/* VGA port control */
42764285
#define ADPA _MMIO(0x61100)
42774286
#define PCH_ADPA _MMIO(0xe1100)

0 commit comments

Comments
 (0)