summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_fb.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2021-12-01 15:57:08 +0200
committerJani Nikula <jani.nikula@intel.com>2021-12-03 11:23:15 +0200
commit1538f65f18ee600dd405350d826ec6af05da79f9 (patch)
treeb3639d5a4ff3ee360a0de6bbec807773b9b2f851 /drivers/gpu/drm/i915/display/intel_fb.c
parent92e9624ad9468bdfcf652ba2cbea9d8995397fa6 (diff)
downloadlinux-1538f65f18ee600dd405350d826ec6af05da79f9.tar.gz
linux-1538f65f18ee600dd405350d826ec6af05da79f9.tar.bz2
linux-1538f65f18ee600dd405350d826ec6af05da79f9.zip
drm/i915/fb: move intel_fb_uses_dpt to intel_fb.c and un-inline
Move fb functions where they belong, and un-inline to avoid looking into struct drm_i915_private guts in header files. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/4aa89f113ce6d840d62f50c989e2a1415483557c.1638366969.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_fb.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_fb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index c4a743d0913f..99769132c35b 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -658,6 +658,16 @@ 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;
+}
+
+bool intel_fb_uses_dpt(const struct drm_framebuffer *fb)
+{
+ return fb && intel_modifier_uses_dpt(to_i915(fb->dev), fb->modifier);
+}
+
unsigned int intel_cursor_alignment(const struct drm_i915_private *i915)
{
if (IS_I830(i915))