All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 4/8] drm/i915/fb: move intel_fb_uses_dpt to intel_fb.c and un-inline
Date: Mon, 22 Nov 2021 15:51:05 +0200	[thread overview]
Message-ID: <b77969b20b495eec96e8f8cd1d48459b623e8bea.1637588831.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1637588831.git.jani.nikula@intel.com>

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>
---
 drivers/gpu/drm/i915/display/intel_display_types.h | 10 ----------
 drivers/gpu/drm/i915/display/intel_fb.c            | 10 ++++++++++
 drivers/gpu/drm/i915/display/intel_fb.h            |  2 ++
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 06edc92e4f7c..338ac3bd08ac 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1987,16 +1987,6 @@ intel_crtc_needs_modeset(const struct intel_crtc_state *crtc_state)
 	return drm_atomic_crtc_needs_modeset(&crtc_state->uapi);
 }
 
-static inline bool intel_modifier_uses_dpt(struct drm_i915_private *i915, u64 modifier)
-{
-	return DISPLAY_VER(i915) >= 13 && modifier != DRM_FORMAT_MOD_LINEAR;
-}
-
-static inline bool intel_fb_uses_dpt(const struct drm_framebuffer *fb)
-{
-	return fb && intel_modifier_uses_dpt(to_i915(fb->dev), fb->modifier);
-}
-
 static inline u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state)
 {
 	return i915_ggtt_offset(plane_state->ggtt_vma);
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))
diff --git a/drivers/gpu/drm/i915/display/intel_fb.h b/drivers/gpu/drm/i915/display/intel_fb.h
index b54997175d6d..ba9df8986c1e 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.h
+++ b/drivers/gpu/drm/i915/display/intel_fb.h
@@ -90,4 +90,6 @@ intel_user_framebuffer_create(struct drm_device *dev,
 			      struct drm_file *filp,
 			      const struct drm_mode_fb_cmd2 *user_mode_cmd);
 
+bool intel_fb_uses_dpt(const struct drm_framebuffer *fb);
+
 #endif /* __INTEL_FB_H__ */
-- 
2.30.2


  parent reply	other threads:[~2021-11-22 13:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 13:51 [Intel-gfx] [PATCH 0/8] drm/i915: break intel_display_types.h dependency on i915_drv.h Jani Nikula
2021-11-22 13:51 ` [Intel-gfx] [PATCH 1/8] drm/i915/display: use drm_crtc_wait_one_vblank() directly when possible Jani Nikula
2021-11-25 10:32   ` Ville Syrjälä
2021-11-22 13:51 ` [Intel-gfx] [PATCH 2/8] drm/i915/display: remove intel_wait_for_vblank() Jani Nikula
2021-11-25 10:23   ` Ville Syrjälä
2021-11-25 10:35     ` Ville Syrjälä
2021-11-25 11:03       ` Jani Nikula
2021-11-22 13:51 ` [Intel-gfx] [PATCH 3/8] drm/i915/crtc: un-inline some crtc functions and move to intel_crtc.[ch] Jani Nikula
2021-11-22 13:51 ` Jani Nikula [this message]
2021-11-22 13:51 ` [Intel-gfx] [PATCH 5/8] drm/i915: split out intel_pm_types.h Jani Nikula
2021-11-22 13:51 ` [Intel-gfx] [PATCH 6/8] drm/i915: move enum hpd_pin to intel_display.h Jani Nikula
2021-11-22 13:51 ` [Intel-gfx] [PATCH 7/8] drm/i915/display: convert dp_to_i915() to a macro Jani Nikula
2021-11-22 13:51 ` [Intel-gfx] [PATCH 8/8] drm/i915/display: stop including i915_drv.h from intel_display_types.h Jani Nikula
2021-11-22 18:07 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: break intel_display_types.h dependency on i915_drv.h Patchwork
2021-11-22 18:08 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-11-22 18:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-11-22 23:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b77969b20b495eec96e8f8cd1d48459b623e8bea.1637588831.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.