Skip to content

Commit 7cf346f

Browse files
committed
Merge tag 'drm-intel-next-fixes-2025-05-15' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
- Stop writing ALPM registers when PSR is enabled - Use the correct connector while computing the link BPP limit on MST Signed-off-by: Dave Airlie <[email protected]> From: Joonas Lahtinen <[email protected]> Link: https://lore.kernel.org/r/aCWlWk5rTE7TH1pN@jlahtine-mobl
2 parents e31b74b + eff82fb commit 7cf346f

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ void intel_alpm_pre_plane_update(struct intel_atomic_state *state,
426426
}
427427
}
428428

429-
static void intel_alpm_enable_sink(struct intel_dp *intel_dp,
430-
const struct intel_crtc_state *crtc_state)
429+
void intel_alpm_enable_sink(struct intel_dp *intel_dp,
430+
const struct intel_crtc_state *crtc_state)
431431
{
432432
u8 val;
433433

@@ -453,8 +453,8 @@ void intel_alpm_post_plane_update(struct intel_atomic_state *state,
453453
intel_atomic_get_old_crtc_state(state, crtc);
454454
struct intel_encoder *encoder;
455455

456-
if ((!crtc_state->has_lobf ||
457-
crtc_state->has_lobf == old_crtc_state->has_lobf) && !crtc_state->has_psr)
456+
if (crtc_state->has_psr || !crtc_state->has_lobf ||
457+
crtc_state->has_lobf == old_crtc_state->has_lobf)
458458
return;
459459

460460
for_each_intel_encoder_mask(display->drm, encoder,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp,
2323
struct drm_connector_state *conn_state);
2424
void intel_alpm_configure(struct intel_dp *intel_dp,
2525
const struct intel_crtc_state *crtc_state);
26+
void intel_alpm_enable_sink(struct intel_dp *intel_dp,
27+
const struct intel_crtc_state *crtc_state);
2628
void intel_alpm_pre_plane_update(struct intel_atomic_state *state,
2729
struct intel_crtc *crtc);
2830
void intel_alpm_post_plane_update(struct intel_atomic_state *state,

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,6 +2524,7 @@ intel_dp_dsc_compute_pipe_bpp_limits(struct intel_dp *intel_dp,
25242524

25252525
bool
25262526
intel_dp_compute_config_limits(struct intel_dp *intel_dp,
2527+
struct intel_connector *connector,
25272528
struct intel_crtc_state *crtc_state,
25282529
bool respect_downstream_limits,
25292530
bool dsc,
@@ -2577,7 +2578,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
25772578
intel_dp_test_compute_config(intel_dp, crtc_state, limits);
25782579

25792580
return intel_dp_compute_config_link_bpp_limits(intel_dp,
2580-
intel_dp->attached_connector,
2581+
connector,
25812582
crtc_state,
25822583
dsc,
25832584
limits);
@@ -2638,7 +2639,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
26382639
joiner_needs_dsc = intel_dp_joiner_needs_dsc(display, num_joined_pipes);
26392640

26402641
dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
2641-
!intel_dp_compute_config_limits(intel_dp, pipe_config,
2642+
!intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
26422643
respect_downstream_limits,
26432644
false,
26442645
&limits);
@@ -2672,7 +2673,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
26722673
str_yes_no(ret), str_yes_no(joiner_needs_dsc),
26732674
str_yes_no(intel_dp->force_dsc_en));
26742675

2675-
if (!intel_dp_compute_config_limits(intel_dp, pipe_config,
2676+
if (!intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
26762677
respect_downstream_limits,
26772678
true,
26782679
&limits))

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ void intel_dp_wait_source_oui(struct intel_dp *intel_dp);
194194
int intel_dp_output_bpp(enum intel_output_format output_format, int bpp);
195195

196196
bool intel_dp_compute_config_limits(struct intel_dp *intel_dp,
197+
struct intel_connector *connector,
197198
struct intel_crtc_state *crtc_state,
198199
bool respect_downstream_limits,
199200
bool dsc,

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,13 @@ adjust_limits_for_dsc_hblank_expansion_quirk(struct intel_dp *intel_dp,
599599

600600
static bool
601601
mst_stream_compute_config_limits(struct intel_dp *intel_dp,
602-
const struct intel_connector *connector,
602+
struct intel_connector *connector,
603603
struct intel_crtc_state *crtc_state,
604604
bool dsc,
605605
struct link_config_limits *limits)
606606
{
607-
if (!intel_dp_compute_config_limits(intel_dp, crtc_state, false, dsc,
607+
if (!intel_dp_compute_config_limits(intel_dp, connector,
608+
crtc_state, false, dsc,
608609
limits))
609610
return false;
610611

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,8 @@ static void _psr_enable_sink(struct intel_dp *intel_dp,
800800
static void intel_psr_enable_sink(struct intel_dp *intel_dp,
801801
const struct intel_crtc_state *crtc_state)
802802
{
803+
intel_alpm_enable_sink(intel_dp, crtc_state);
804+
803805
crtc_state->has_panel_replay ?
804806
_panel_replay_enable_sink(intel_dp, crtc_state) :
805807
_psr_enable_sink(intel_dp, crtc_state);
@@ -1962,6 +1964,8 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,
19621964
IS_DISPLAY_VERx100_STEP(display, 3000, STEP_A0, STEP_B0)) &&
19631965
!intel_dp->psr.panel_replay_enabled)
19641966
intel_dmc_block_pkgc(display, intel_dp->psr.pipe, true);
1967+
1968+
intel_alpm_configure(intel_dp, crtc_state);
19651969
}
19661970

19671971
static bool psr_interrupt_error_check(struct intel_dp *intel_dp)
@@ -2029,8 +2033,9 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
20292033
intel_dp->psr.sel_update_enabled ? "2" : "1");
20302034

20312035
/*
2032-
* Enabling here only for PSR. Panel Replay enable bit is already
2033-
* written at this point. See
2036+
* Enabling sink PSR/Panel Replay here only for PSR. Panel Replay enable
2037+
* bit is already written at this point. Sink ALPM is enabled here for
2038+
* PSR and Panel Replay. See
20342039
* intel_psr_panel_replay_enable_sink. Modifiers/options:
20352040
* - Selective Update
20362041
* - Region Early Transport
@@ -2172,6 +2177,9 @@ static void intel_psr_disable_locked(struct intel_dp *intel_dp)
21722177
if (intel_dp_is_edp(intel_dp))
21732178
intel_snps_phy_update_psr_power_state(&dp_to_dig_port(intel_dp)->base, false);
21742179

2180+
if (intel_dp->psr.panel_replay_enabled && intel_dp_is_edp(intel_dp))
2181+
intel_alpm_disable(intel_dp);
2182+
21752183
/* Disable PSR on Sink */
21762184
if (!intel_dp->psr.panel_replay_enabled) {
21772185
drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0);
@@ -3498,7 +3506,6 @@ static void psr_alpm_check(struct intel_dp *intel_dp)
34983506
if (intel_alpm_get_error(intel_dp)) {
34993507
intel_psr_disable_locked(intel_dp);
35003508
psr->sink_not_reliable = true;
3501-
intel_alpm_disable(intel_dp);
35023509
}
35033510
}
35043511

0 commit comments

Comments
 (0)