Skip to content

Commit 82ab75c

Browse files
ckborahanimesh-manna
authored andcommitted
drm/i915/display: Allow fastset for change in HDR infoframe
Changes in Dynamic Range and Mastering infoframe should not trigger a full modeset. Therefore, allow fastset. DP SDP programming is already hooked up in the fastset flow but HDMI AVI infoframe update is not, add it. Any other infoframe that can be fastset should be added to the helper intel_hdmi_fastset_infoframes(). v3: - Create a wrapper intel_ddi_update_pipe_hdmi to stick to uniform naming (Jani) - Do not disable HDMI AVI infoframe if already disabled (Uma) v2: - Update HDMI AVI infoframe during fastset. Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241023044122.3889137-1-chaitanya.kumar.borah@intel.com
1 parent facde55 commit 82ab75c

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3513,6 +3513,13 @@ static void intel_ddi_update_pipe_dp(struct intel_atomic_state *state,
35133513
drm_connector_update_privacy_screen(conn_state);
35143514
}
35153515

3516+
static void intel_ddi_update_pipe_hdmi(struct intel_encoder *encoder,
3517+
const struct intel_crtc_state *crtc_state,
3518+
const struct drm_connector_state *conn_state)
3519+
{
3520+
intel_hdmi_fastset_infoframes(encoder, crtc_state, conn_state);
3521+
}
3522+
35163523
void intel_ddi_update_pipe(struct intel_atomic_state *state,
35173524
struct intel_encoder *encoder,
35183525
const struct intel_crtc_state *crtc_state,
@@ -3524,6 +3531,10 @@ void intel_ddi_update_pipe(struct intel_atomic_state *state,
35243531
intel_ddi_update_pipe_dp(state, encoder, crtc_state,
35253532
conn_state);
35263533

3534+
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
3535+
intel_ddi_update_pipe_hdmi(encoder, crtc_state,
3536+
conn_state);
3537+
35273538
intel_hdcp_update_pipe(state, encoder, crtc_state, conn_state);
35283539
}
35293540

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5702,7 +5702,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
57025702
PIPE_CONF_CHECK_INFOFRAME(avi);
57035703
PIPE_CONF_CHECK_INFOFRAME(spd);
57045704
PIPE_CONF_CHECK_INFOFRAME(hdmi);
5705-
PIPE_CONF_CHECK_INFOFRAME(drm);
5705+
if (!fastset)
5706+
PIPE_CONF_CHECK_INFOFRAME(drm);
57065707
PIPE_CONF_CHECK_DP_VSC_SDP(vsc);
57075708
PIPE_CONF_CHECK_DP_AS_SDP(as_sdp);
57085709

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,30 @@ static void vlv_set_infoframes(struct intel_encoder *encoder,
12121212
&crtc_state->infoframes.hdmi);
12131213
}
12141214

1215+
void intel_hdmi_fastset_infoframes(struct intel_encoder *encoder,
1216+
const struct intel_crtc_state *crtc_state,
1217+
const struct drm_connector_state *conn_state)
1218+
{
1219+
struct intel_display *display = to_intel_display(encoder);
1220+
i915_reg_t reg = HSW_TVIDEO_DIP_CTL(display,
1221+
crtc_state->cpu_transcoder);
1222+
u32 val = intel_de_read(display, reg);
1223+
1224+
if ((crtc_state->infoframes.enable &
1225+
intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_DRM)) == 0 &&
1226+
(val & VIDEO_DIP_ENABLE_DRM_GLK) == 0)
1227+
return;
1228+
1229+
val &= ~(VIDEO_DIP_ENABLE_DRM_GLK);
1230+
1231+
intel_de_write(display, reg, val);
1232+
intel_de_posting_read(display, reg);
1233+
1234+
intel_write_infoframe(encoder, crtc_state,
1235+
HDMI_INFOFRAME_TYPE_DRM,
1236+
&crtc_state->infoframes.drm);
1237+
}
1238+
12151239
static void hsw_set_infoframes(struct intel_encoder *encoder,
12161240
bool enable,
12171241
const struct intel_crtc_state *crtc_state,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ u32 intel_hdmi_infoframes_enabled(struct intel_encoder *encoder,
4242
u32 intel_hdmi_infoframe_enable(unsigned int type);
4343
void intel_hdmi_read_gcp_infoframe(struct intel_encoder *encoder,
4444
struct intel_crtc_state *crtc_state);
45+
void intel_hdmi_fastset_infoframes(struct intel_encoder *encoder,
46+
const struct intel_crtc_state *crtc_state,
47+
const struct drm_connector_state *conn_state);
4548
void intel_read_infoframe(struct intel_encoder *encoder,
4649
const struct intel_crtc_state *crtc_state,
4750
enum hdmi_infoframe_type type,

0 commit comments

Comments
 (0)