Commit e6e0edfd authored by Tejas Upadhyay's avatar Tejas Upadhyay Committed by Ville Syrjälä

drm/i915/display: Add HDR mode helper function

Add helper function with returns if HDR mode in on
Signed-off-by: default avatarTejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210907113658.1351456-1-tejaskumarx.surendrakumar.upadhyay@intel.com
[vsyrjala: fix up alignment to match codingstyle]
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent e01163e8
...@@ -183,6 +183,12 @@ static void intel_update_czclk(struct drm_i915_private *dev_priv) ...@@ -183,6 +183,12 @@ static void intel_update_czclk(struct drm_i915_private *dev_priv)
dev_priv->czclk_freq); dev_priv->czclk_freq);
} }
static bool is_hdr_mode(const struct intel_crtc_state *crtc_state)
{
return (crtc_state->active_planes &
~(icl_hdr_plane_mask() | BIT(PLANE_CURSOR))) == 0;
}
/* WA Display #0827: Gen9:all */ /* WA Display #0827: Gen9:all */
static void static void
skl_wa_827(struct drm_i915_private *dev_priv, enum pipe pipe, bool enable) skl_wa_827(struct drm_i915_private *dev_priv, enum pipe pipe, bool enable)
...@@ -5258,9 +5264,7 @@ static void bdw_set_pipemisc(const struct intel_crtc_state *crtc_state) ...@@ -5258,9 +5264,7 @@ static void bdw_set_pipemisc(const struct intel_crtc_state *crtc_state)
val |= PIPEMISC_YUV420_ENABLE | val |= PIPEMISC_YUV420_ENABLE |
PIPEMISC_YUV420_MODE_FULL_BLEND; PIPEMISC_YUV420_MODE_FULL_BLEND;
if (DISPLAY_VER(dev_priv) >= 11 && if (DISPLAY_VER(dev_priv) >= 11 && is_hdr_mode(crtc_state))
(crtc_state->active_planes & ~(icl_hdr_plane_mask() |
BIT(PLANE_CURSOR))) == 0)
val |= PIPEMISC_HDR_MODE_PRECISION; val |= PIPEMISC_HDR_MODE_PRECISION;
if (DISPLAY_VER(dev_priv) >= 12) if (DISPLAY_VER(dev_priv) >= 12)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment