Message ID | 1557340733-9629-11-git-send-email-uma.shankar@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add HDR Metadata Parsing and handling in DRM layer | expand |
On Thu, May 09, 2019 at 12:08:50AM +0530, Uma Shankar wrote: > HDR metadata requires a infoframe to be set. Due to fastset, > full modeset is not performed hence adding it to update_pipe > to handle that. > > Signed-off-by: Uma Shankar <uma.shankar@intel.com> > Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> > --- > drivers/gpu/drm/i915/intel_ddi.c | 13 +++++++++++++ > drivers/gpu/drm/i915/intel_hdmi.c | 7 +++++-- > 2 files changed, 18 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c > index cd5277d..d37526b 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -3559,6 +3559,10 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder, > const struct intel_crtc_state *crtc_state, > const struct drm_connector_state *conn_state) > { > + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); > + struct intel_digital_port *intel_dig_port = > + enc_to_dig_port(&encoder->base); > + > if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) > intel_ddi_update_pipe_dp(encoder, crtc_state, conn_state); > > @@ -3568,6 +3572,15 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder, > else if (conn_state->content_protection == > DRM_MODE_CONTENT_PROTECTION_UNDESIRED) > intel_hdcp_disable(to_intel_connector(conn_state->connector)); > + > + /* Set the infoframe for NON modeset cases as well */ > + if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) { > + if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) && > + conn_state->hdr_metadata_changed) > + intel_dig_port->set_infoframes(encoder, > + crtc_state->has_infoframe, > + crtc_state, conn_state); > + } Still nak. > } > > static void intel_ddi_set_fia_lane_count(struct intel_encoder *encoder, > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c > index db9c82b..e559a940 100644 > --- a/drivers/gpu/drm/i915/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/intel_hdmi.c > @@ -1204,8 +1204,11 @@ static void hsw_set_infoframes(struct intel_encoder *encoder, > i915_reg_t reg = HSW_TVIDEO_DIP_CTL(crtc_state->cpu_transcoder); > u32 val = I915_READ(reg); > > - assert_hdmi_transcoder_func_disabled(dev_priv, > - crtc_state->cpu_transcoder); > + /* DRM Infoframe can be send with transcoder enabled */ > + if (!((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) && > + conn_state->hdr_metadata_changed)) > + assert_hdmi_transcoder_func_disabled(dev_priv, > + crtc_state->cpu_transcoder); > > val &= ~(VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW | > VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW | > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>-----Original Message----- >From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] >Sent: Tuesday, May 14, 2019 1:10 AM >To: Shankar, Uma <uma.shankar@intel.com> >Cc: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; >dcastagna@chromium.org; jonas@kwiboo.se; emil.l.velikov@gmail.com; >seanpaul@chromium.org; Syrjala, Ville <ville.syrjala@intel.com>; Lankhorst, Maarten ><maarten.lankhorst@intel.com> >Subject: Re: [v9 10/13] drm/i915: Set Infoframe for non modeset case for HDR > >On Thu, May 09, 2019 at 12:08:50AM +0530, Uma Shankar wrote: >> HDR metadata requires a infoframe to be set. Due to fastset, full >> modeset is not performed hence adding it to update_pipe to handle >> that. >> >> Signed-off-by: Uma Shankar <uma.shankar@intel.com> >> Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> >> --- >> drivers/gpu/drm/i915/intel_ddi.c | 13 +++++++++++++ >> drivers/gpu/drm/i915/intel_hdmi.c | 7 +++++-- >> 2 files changed, 18 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/intel_ddi.c >> b/drivers/gpu/drm/i915/intel_ddi.c >> index cd5277d..d37526b 100644 >> --- a/drivers/gpu/drm/i915/intel_ddi.c >> +++ b/drivers/gpu/drm/i915/intel_ddi.c >> @@ -3559,6 +3559,10 @@ static void intel_ddi_update_pipe(struct intel_encoder >*encoder, >> const struct intel_crtc_state *crtc_state, >> const struct drm_connector_state *conn_state) { >> + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); >> + struct intel_digital_port *intel_dig_port = >> + enc_to_dig_port(&encoder->base); >> + >> if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) >> intel_ddi_update_pipe_dp(encoder, crtc_state, conn_state); >> >> @@ -3568,6 +3572,15 @@ static void intel_ddi_update_pipe(struct intel_encoder >*encoder, >> else if (conn_state->content_protection == >> DRM_MODE_CONTENT_PROTECTION_UNDESIRED) >> intel_hdcp_disable(to_intel_connector(conn_state->connector)); >> + >> + /* Set the infoframe for NON modeset cases as well */ >> + if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) { >> + if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) && >> + conn_state->hdr_metadata_changed) >> + intel_dig_port->set_infoframes(encoder, >> + crtc_state->has_infoframe, >> + crtc_state, conn_state); >> + } > >Still nak. Ok, will drop this from this series and take this up later. >> } >> >> static void intel_ddi_set_fia_lane_count(struct intel_encoder >> *encoder, diff --git a/drivers/gpu/drm/i915/intel_hdmi.c >> b/drivers/gpu/drm/i915/intel_hdmi.c >> index db9c82b..e559a940 100644 >> --- a/drivers/gpu/drm/i915/intel_hdmi.c >> +++ b/drivers/gpu/drm/i915/intel_hdmi.c >> @@ -1204,8 +1204,11 @@ static void hsw_set_infoframes(struct intel_encoder >*encoder, >> i915_reg_t reg = HSW_TVIDEO_DIP_CTL(crtc_state->cpu_transcoder); >> u32 val = I915_READ(reg); >> >> - assert_hdmi_transcoder_func_disabled(dev_priv, >> - crtc_state->cpu_transcoder); >> + /* DRM Infoframe can be send with transcoder enabled */ >> + if (!((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) && >> + conn_state->hdr_metadata_changed)) >> + assert_hdmi_transcoder_func_disabled(dev_priv, >> + crtc_state->cpu_transcoder); >> >> val &= ~(VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW | >> VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW | >> -- >> 1.9.1 >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > >-- >Ville Syrjälä >Intel
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index cd5277d..d37526b 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -3559,6 +3559,10 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state) { + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); + struct intel_digital_port *intel_dig_port = + enc_to_dig_port(&encoder->base); + if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) intel_ddi_update_pipe_dp(encoder, crtc_state, conn_state); @@ -3568,6 +3572,15 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder, else if (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) intel_hdcp_disable(to_intel_connector(conn_state->connector)); + + /* Set the infoframe for NON modeset cases as well */ + if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) { + if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) && + conn_state->hdr_metadata_changed) + intel_dig_port->set_infoframes(encoder, + crtc_state->has_infoframe, + crtc_state, conn_state); + } } static void intel_ddi_set_fia_lane_count(struct intel_encoder *encoder, diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index db9c82b..e559a940 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -1204,8 +1204,11 @@ static void hsw_set_infoframes(struct intel_encoder *encoder, i915_reg_t reg = HSW_TVIDEO_DIP_CTL(crtc_state->cpu_transcoder); u32 val = I915_READ(reg); - assert_hdmi_transcoder_func_disabled(dev_priv, - crtc_state->cpu_transcoder); + /* DRM Infoframe can be send with transcoder enabled */ + if (!((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) && + conn_state->hdr_metadata_changed)) + assert_hdmi_transcoder_func_disabled(dev_priv, + crtc_state->cpu_transcoder); val &= ~(VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW | VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |