Skip to content

Commit 64d845f

Browse files
hoganderrodrigovivi
authored andcommitted
drm/i915/psr: Calculate PIPE_SRCSZ_ERLY_TPT value
When early transport is enabled we need to write PIPE_SRCSZ_ERLY_TPT on every flip doing selective update. This patch calculates PIPE_SRCSZ_ERLY_TPT same way as is done for PSR2_MAN_TRK_CTL value and stores i in intel_crtc_state->pipe_srcsz_early_tpt to be written later during flip. Bspec: 68927 Signed-off-by: Jouni Högander <[email protected]> Reviewed-by: Mika Kahola <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit f3b899f) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent caf3d74 commit 64d845f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,8 @@ struct intel_crtc_state {
14231423

14241424
u32 psr2_man_track_ctl;
14251425

1426+
u32 pipe_srcsz_early_tpt;
1427+
14261428
struct drm_rect psr2_su_area;
14271429

14281430
/* Variable Refresh Rate state */

drivers/gpu/drm/i915/display/intel_psr.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,6 +2051,20 @@ static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state,
20512051
crtc_state->psr2_man_track_ctl = val;
20522052
}
20532053

2054+
static u32 psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state *crtc_state,
2055+
bool full_update)
2056+
{
2057+
int width, height;
2058+
2059+
if (!crtc_state->enable_psr2_su_region_et || full_update)
2060+
return 0;
2061+
2062+
width = drm_rect_width(&crtc_state->psr2_su_area);
2063+
height = drm_rect_height(&crtc_state->psr2_su_area);
2064+
2065+
return PIPESRC_WIDTH(width - 1) | PIPESRC_HEIGHT(height - 1);
2066+
}
2067+
20542068
static void clip_area_update(struct drm_rect *overlap_damage_area,
20552069
struct drm_rect *damage_area,
20562070
struct drm_rect *pipe_src)
@@ -2338,6 +2352,8 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
23382352

23392353
skip_sel_fetch_set_loop:
23402354
psr2_man_trk_ctl_calc(crtc_state, full_update);
2355+
crtc_state->pipe_srcsz_early_tpt =
2356+
psr2_pipe_srcsz_early_tpt_calc(crtc_state, full_update);
23412357
return 0;
23422358
}
23432359

0 commit comments

Comments
 (0)