Commit bb849442 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/dpt: Introduce HAS_DPT()

Replace the hand rolled DISPLAY_VER check for a more descriptive
HAS_DPT() macro. Will be used on more than one place later.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-4-ville.syrjala@linux.intel.comReviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
parent ef5cb493
......@@ -718,7 +718,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)
static bool intel_modifier_uses_dpt(struct drm_i915_private *i915, u64 modifier)
{
return DISPLAY_VER(i915) >= 13 && modifier != DRM_FORMAT_MOD_LINEAR;
return HAS_DPT(i915) && modifier != DRM_FORMAT_MOD_LINEAR;
}
bool intel_fb_uses_dpt(const struct drm_framebuffer *fb)
......
......@@ -809,6 +809,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
#define HAS_FBC(dev_priv) (RUNTIME_INFO(dev_priv)->fbc_mask != 0)
#define HAS_CUR_FBC(dev_priv) (!HAS_GMCH(dev_priv) && DISPLAY_VER(dev_priv) >= 7)
#define HAS_DPT(dev_priv) (DISPLAY_VER(dev_priv) >= 13)
#define HAS_IPS(dev_priv) (IS_HSW_ULT(dev_priv) || IS_BROADWELL(dev_priv))
#define HAS_DP_MST(dev_priv) (INTEL_INFO(dev_priv)->display.has_dp_mst)
......
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