Skip to content

Commit 9b454a3

Browse files
committed
Merge tag 'drm-intel-fixes-2026-04-02' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
- Fix for #12045: Huawei Matebook E (DRR-WXX): Persistent Black Screen on Boot with i915 and Gen11: Modesetting and Backlight Control Malfunction - Fix for #15826: i915: Raptor Lake-P [UHD Graphics] display flicker/corruption on eDP panel - Use crtc_state->enhanced_framing properly on ivb/hsw CPU eDP Signed-off-by: Dave Airlie <airlied@redhat.com> From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patch.msgid.link/ac5DM1IpBkuaT58e@jlahtine-mobl
2 parents 2aa5a6d + 9c9a57e commit 9b454a3

3 files changed

Lines changed: 57 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder,
137137
intel_dp->DP |= DP_SYNC_VS_HIGH;
138138
intel_dp->DP |= DP_LINK_TRAIN_OFF_CPT;
139139

140-
if (drm_dp_enhanced_frame_cap(intel_dp->dpcd))
140+
if (pipe_config->enhanced_framing)
141141
intel_dp->DP |= DP_ENHANCED_FRAMING;
142142

143143
intel_dp->DP |= DP_PIPE_SEL_IVB(crtc->pipe);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,
889889
* non-compressed link speeds, and simplifies down to the ratio between
890890
* compressed and non-compressed bpp.
891891
*/
892-
if (crtc_state->dsc.compression_enable) {
892+
if (is_vid_mode(intel_dsi) && crtc_state->dsc.compression_enable) {
893893
mul = fxp_q4_to_int(crtc_state->dsc.compressed_bpp_x16);
894894
div = mipi_dsi_pixel_format_to_bpp(intel_dsi->pixel_format);
895895
}
@@ -1503,7 +1503,7 @@ static void gen11_dsi_get_timings(struct intel_encoder *encoder,
15031503
struct drm_display_mode *adjusted_mode =
15041504
&pipe_config->hw.adjusted_mode;
15051505

1506-
if (pipe_config->dsc.compressed_bpp_x16) {
1506+
if (is_vid_mode(intel_dsi) && pipe_config->dsc.compressed_bpp_x16) {
15071507
int div = fxp_q4_to_int(pipe_config->dsc.compressed_bpp_x16);
15081508
int mul = mipi_dsi_pixel_format_to_bpp(intel_dsi->pixel_format);
15091509

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

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2971,6 +2971,53 @@ static int intel_cdclk_update_crtc_min_cdclk(struct intel_atomic_state *state,
29712971
return 0;
29722972
}
29732973

2974+
static int intel_cdclk_update_crtc_min_voltage_level(struct intel_atomic_state *state,
2975+
struct intel_crtc *crtc,
2976+
u8 old_min_voltage_level,
2977+
u8 new_min_voltage_level,
2978+
bool *need_cdclk_calc)
2979+
{
2980+
struct intel_display *display = to_intel_display(state);
2981+
struct intel_cdclk_state *cdclk_state;
2982+
bool allow_voltage_level_decrease = intel_any_crtc_needs_modeset(state);
2983+
int ret;
2984+
2985+
if (new_min_voltage_level == old_min_voltage_level)
2986+
return 0;
2987+
2988+
if (!allow_voltage_level_decrease &&
2989+
new_min_voltage_level < old_min_voltage_level)
2990+
return 0;
2991+
2992+
cdclk_state = intel_atomic_get_cdclk_state(state);
2993+
if (IS_ERR(cdclk_state))
2994+
return PTR_ERR(cdclk_state);
2995+
2996+
old_min_voltage_level = cdclk_state->min_voltage_level[crtc->pipe];
2997+
2998+
if (new_min_voltage_level == old_min_voltage_level)
2999+
return 0;
3000+
3001+
if (!allow_voltage_level_decrease &&
3002+
new_min_voltage_level < old_min_voltage_level)
3003+
return 0;
3004+
3005+
cdclk_state->min_voltage_level[crtc->pipe] = new_min_voltage_level;
3006+
3007+
ret = intel_atomic_lock_global_state(&cdclk_state->base);
3008+
if (ret)
3009+
return ret;
3010+
3011+
*need_cdclk_calc = true;
3012+
3013+
drm_dbg_kms(display->drm,
3014+
"[CRTC:%d:%s] min voltage level: %d -> %d\n",
3015+
crtc->base.base.id, crtc->base.name,
3016+
old_min_voltage_level, new_min_voltage_level);
3017+
3018+
return 0;
3019+
}
3020+
29743021
int intel_cdclk_update_dbuf_bw_min_cdclk(struct intel_atomic_state *state,
29753022
int old_min_cdclk, int new_min_cdclk,
29763023
bool *need_cdclk_calc)
@@ -3386,6 +3433,13 @@ static int intel_crtcs_calc_min_cdclk(struct intel_atomic_state *state,
33863433
need_cdclk_calc);
33873434
if (ret)
33883435
return ret;
3436+
3437+
ret = intel_cdclk_update_crtc_min_voltage_level(state, crtc,
3438+
old_crtc_state->min_voltage_level,
3439+
new_crtc_state->min_voltage_level,
3440+
need_cdclk_calc);
3441+
if (ret)
3442+
return ret;
33893443
}
33903444

33913445
return 0;

0 commit comments

Comments
 (0)