mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
drm/i915/display: Add HDR mode helper function
Add helper function with returns if HDR mode in on Signed-off-by: Tejas 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: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
parent
e01163e82b
commit
e6e0edfdbb
|
|
@ -183,6 +183,12 @@ static void intel_update_czclk(struct drm_i915_private *dev_priv)
|
|||
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 */
|
||||
static void
|
||||
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)
|
|||
val |= PIPEMISC_YUV420_ENABLE |
|
||||
PIPEMISC_YUV420_MODE_FULL_BLEND;
|
||||
|
||||
if (DISPLAY_VER(dev_priv) >= 11 &&
|
||||
(crtc_state->active_planes & ~(icl_hdr_plane_mask() |
|
||||
BIT(PLANE_CURSOR))) == 0)
|
||||
if (DISPLAY_VER(dev_priv) >= 11 && is_hdr_mode(crtc_state))
|
||||
val |= PIPEMISC_HDR_MODE_PRECISION;
|
||||
|
||||
if (DISPLAY_VER(dev_priv) >= 12)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user