Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 3/9] drm/i915: Move the intel_dpt_offset() check into intel_plane_pin_fb()
Date: Wed,  2 Apr 2025 03:22:03 +0300	[thread overview]
Message-ID: <20250402002209.24987-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20250402002209.24987-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Now that we handle all the other vma offset stuff in
intel_plane_pin_fb() it seems more proper to do the
dpt_vma offset check there as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fb_pin.c        | 7 +++++++
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.c b/drivers/gpu/drm/i915/display/intel_fb_pin.c
index f2d8675dd98a..a5b9d87b2255 100644
--- a/drivers/gpu/drm/i915/display/intel_fb_pin.c
+++ b/drivers/gpu/drm/i915/display/intel_fb_pin.c
@@ -259,6 +259,7 @@ intel_plane_fb_vtd_guard(const struct intel_plane_state *plane_state)
 int intel_plane_pin_fb(struct intel_plane_state *plane_state,
 		       const struct intel_plane_state *old_plane_state)
 {
+	struct intel_display *display = to_intel_display(plane_state);
 	struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
 	const struct intel_framebuffer *fb =
 		to_intel_framebuffer(plane_state->hw.fb);
@@ -297,6 +298,12 @@ int intel_plane_pin_fb(struct intel_plane_state *plane_state,
 		plane_state->dpt_vma = vma;
 
 		WARN_ON(plane_state->ggtt_vma == plane_state->dpt_vma);
+
+		/*
+		 * The DPT object contains only one vma, so
+		 * the VMA's offset within the DPT is always 0.
+		 */
+		drm_WARN_ON(display->drm, intel_dpt_offset(plane_state->dpt_vma));
 	}
 
 	/*
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index b82a9e07350b..808580826b0e 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -1271,12 +1271,6 @@ static u32 skl_surf_address(const struct intel_plane_state *plane_state,
 	u32 offset = plane_state->view.color_plane[color_plane].offset;
 
 	if (intel_fb_uses_dpt(fb)) {
-		/*
-		 * The DPT object contains only one vma, so the VMA's offset
-		 * within the DPT is always 0.
-		 */
-		drm_WARN_ON(display->drm, plane_state->dpt_vma &&
-			    intel_dpt_offset(plane_state->dpt_vma));
 		drm_WARN_ON(display->drm, offset & 0x1fffff);
 		return offset >> 9;
 	} else {
-- 
2.45.3


  parent reply	other threads:[~2025-04-02  0:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  0:22 [PATCH 0/9] drm/i915: Precompute plane SURF address/etc Ville Syrjala
2025-04-02  0:22 ` [PATCH 1/9] drm/i915: Precompute plane SURF address Ville Syrjala
2025-04-02  0:22 ` [PATCH 2/9] drm/i915: Nuke intel_plane_ggtt_offset() Ville Syrjala
2025-04-02  0:22 ` Ville Syrjala [this message]
2025-04-02  0:22 ` [PATCH 4/9] drm/i915: Use i915_vma_offset() in intel_dpt_offset() Ville Syrjala
2025-04-02  0:22 ` [PATCH 5/9] drm/i915: Remove unused dpt_total_entries() Ville Syrjala
2025-04-02  0:22 ` [PATCH 6/9] drm/i915: Don't pass crtc_state to foo_plane_ctl() & co Ville Syrjala
2025-04-02  0:22 ` [PATCH 7/9] drm/i915: Include crtc contributed bits in plane_state->ctl Ville Syrjala
2025-04-02  0:22 ` [PATCH 8/9] drm/i915: Add tracepoint for plane faults Ville Syrjala
2025-04-02  0:22 ` [PATCH 9/9] drm/i915: Include plane ctl/surf registers in the plane update_arm() tracepoint Ville Syrjala
2025-04-02  1:42 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Precompute plane SURF address/etc Patchwork
2025-04-02  1:42 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-04-02  2:02 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-02  4:33 ` ✗ i915.CI.Full: failure " Patchwork
2025-04-02 15:00   ` Ville Syrjälä

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=20250402002209.24987-4-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox