Skip to content

Commit a5523e2

Browse files
committed
drm/i915: Add PSR2 selective fetch registers
This registers will be used to implement PSR2 manual tracking/selective fetch. v2: - Fixed typo in _PLANE_SEL_FETCH_BASE - Renamed PSR2_MAN_TRK_CTL bits to better match spec names - Renamed _PLANE_SEL_FETCH_* to better match spec names BSpec: 55229 BSpec: 50424 BSpec: 50420 Cc: Gwan-gyeong Mun <[email protected]> Signed-off-by: José Roberto de Souza <[email protected]> Reviewed-by: Gwan-gyeong Mun <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 19167eb commit a5523e2

File tree

1 file changed

+63
-5
lines changed

1 file changed

+63
-5
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4589,6 +4589,18 @@ enum {
45894589
#define PSR2_SU_STATUS_MASK(frame) (0x3ff << PSR2_SU_STATUS_SHIFT(frame))
45904590
#define PSR2_SU_STATUS_FRAMES 8
45914591

4592+
#define _PSR2_MAN_TRK_CTL_A 0x60910
4593+
#define _PSR2_MAN_TRK_CTL_EDP 0x6f910
4594+
#define PSR2_MAN_TRK_CTL(tran) _MMIO_TRANS2(tran, _PSR2_MAN_TRK_CTL_A)
4595+
#define PSR2_MAN_TRK_CTL_ENABLE REG_BIT(31)
4596+
#define PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR_MASK REG_GENMASK(30, 21)
4597+
#define PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR(val) REG_FIELD_PREP(PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR_MASK, val)
4598+
#define PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR_MASK REG_GENMASK(20, 11)
4599+
#define PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR(val) REG_FIELD_PREP(PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR_MASK, val)
4600+
#define PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME REG_BIT(3)
4601+
#define PSR2_MAN_TRK_CTL_SF_CONTINUOS_FULL_FRAME REG_BIT(2)
4602+
#define PSR2_MAN_TRK_CTL_SF_PARTIAL_FRAME_UPDATE REG_BIT(1)
4603+
45924604
/* VGA port control */
45934605
#define ADPA _MMIO(0x61100)
45944606
#define PCH_ADPA _MMIO(0xe1100)
@@ -7152,7 +7164,52 @@ enum {
71527164
#define PLANE_COLOR_CTL(pipe, plane) \
71537165
_MMIO_PLANE(plane, _PLANE_COLOR_CTL_1(pipe), _PLANE_COLOR_CTL_2(pipe))
71547166

7155-
#/* SKL new cursor registers */
7167+
#define _SEL_FETCH_PLANE_BASE_1_A 0x70890
7168+
#define _SEL_FETCH_PLANE_BASE_2_A 0x708B0
7169+
#define _SEL_FETCH_PLANE_BASE_3_A 0x708D0
7170+
#define _SEL_FETCH_PLANE_BASE_4_A 0x708F0
7171+
#define _SEL_FETCH_PLANE_BASE_5_A 0x70920
7172+
#define _SEL_FETCH_PLANE_BASE_6_A 0x70940
7173+
#define _SEL_FETCH_PLANE_BASE_7_A 0x70960
7174+
#define _SEL_FETCH_PLANE_BASE_CUR_A 0x70880
7175+
#define _SEL_FETCH_PLANE_BASE_1_B 0x70990
7176+
7177+
#define _SEL_FETCH_PLANE_BASE_A(plane) _PICK(plane, \
7178+
_SEL_FETCH_PLANE_BASE_1_A, \
7179+
_SEL_FETCH_PLANE_BASE_2_A, \
7180+
_SEL_FETCH_PLANE_BASE_3_A, \
7181+
_SEL_FETCH_PLANE_BASE_4_A, \
7182+
_SEL_FETCH_PLANE_BASE_5_A, \
7183+
_SEL_FETCH_PLANE_BASE_6_A, \
7184+
_SEL_FETCH_PLANE_BASE_7_A, \
7185+
_SEL_FETCH_PLANE_BASE_CUR_A)
7186+
#define _SEL_FETCH_PLANE_BASE_1(pipe) _PIPE(pipe, _SEL_FETCH_PLANE_BASE_1_A, _SEL_FETCH_PLANE_BASE_1_B)
7187+
#define _SEL_FETCH_PLANE_BASE(pipe, plane) (_SEL_FETCH_PLANE_BASE_1(pipe) - \
7188+
_SEL_FETCH_PLANE_BASE_1_A + \
7189+
_SEL_FETCH_PLANE_BASE_A(plane))
7190+
7191+
#define _SEL_FETCH_PLANE_CTL_1_A 0x70890
7192+
#define PLANE_SEL_FETCH_CTL(pipe, plane) _MMIO(_SEL_FETCH_PLANE_BASE(pipe, plane) + \
7193+
_SEL_FETCH_PLANE_CTL_1_A - \
7194+
_SEL_FETCH_PLANE_BASE_1_A)
7195+
#define PLANE_SEL_FETCH_CTL_ENABLE REG_BIT(31)
7196+
7197+
#define _SEL_FETCH_PLANE_POS_1_A 0x70894
7198+
#define PLANE_SEL_FETCH_POS(pipe, plane) _MMIO(_SEL_FETCH_PLANE_BASE(pipe, plane) + \
7199+
_SEL_FETCH_PLANE_POS_1_A - \
7200+
_SEL_FETCH_PLANE_BASE_1_A)
7201+
7202+
#define _SEL_FETCH_PLANE_SIZE_1_A 0x70898
7203+
#define PLANE_SEL_FETCH_SIZE(pipe, plane) _MMIO(_SEL_FETCH_PLANE_BASE(pipe, plane) + \
7204+
_SEL_FETCH_PLANE_SIZE_1_A - \
7205+
_SEL_FETCH_PLANE_BASE_1_A)
7206+
7207+
#define _SEL_FETCH_PLANE_OFFSET_1_A 0x7089C
7208+
#define PLANE_SEL_FETCH_OFFSET(pipe, plane) _MMIO(_SEL_FETCH_PLANE_BASE(pipe, plane) + \
7209+
_SEL_FETCH_PLANE_OFFSET_1_A - \
7210+
_SEL_FETCH_PLANE_BASE_1_A)
7211+
7212+
/* SKL new cursor registers */
71567213
#define _CUR_BUF_CFG_A 0x7017c
71577214
#define _CUR_BUF_CFG_B 0x7117c
71587215
#define CUR_BUF_CFG(pipe) _MMIO_PIPE(pipe, _CUR_BUF_CFG_A, _CUR_BUF_CFG_B)
@@ -7798,11 +7855,12 @@ enum {
77987855
# define CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE (1 << 5)
77997856
# define CHICKEN3_DGMG_DONE_FIX_DISABLE (1 << 2)
78007857

7801-
#define CHICKEN_PAR1_1 _MMIO(0x42080)
7858+
#define CHICKEN_PAR1_1 _MMIO(0x42080)
78027859
#define SKL_DE_COMPRESSED_HASH_MODE (1 << 15)
7803-
#define DPA_MASK_VBLANK_SRD (1 << 15)
7804-
#define FORCE_ARB_IDLE_PLANES (1 << 14)
7805-
#define SKL_EDP_PSR_FIX_RDWRAP (1 << 3)
7860+
#define DPA_MASK_VBLANK_SRD (1 << 15)
7861+
#define FORCE_ARB_IDLE_PLANES (1 << 14)
7862+
#define SKL_EDP_PSR_FIX_RDWRAP (1 << 3)
7863+
#define IGNORE_PSR2_HW_TRACKING (1 << 1)
78067864

78077865
#define CHICKEN_PAR2_1 _MMIO(0x42090)
78087866
#define KVM_CONFIG_CHANGE_NOTIFICATION_SELECT (1 << 14)

0 commit comments

Comments
 (0)