Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jouni Högander" <jouni.hogander@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 2/4] drm/i915/display: Use original src in psr2 sel fetch area calculation
Date: Tue, 23 Aug 2022 14:29:18 +0300	[thread overview]
Message-ID: <20220823112920.352563-3-jouni.hogander@intel.com> (raw)
In-Reply-To: <20220823112920.352563-1-jouni.hogander@intel.com>

drm_plane_state->src is modified when offset is calculated:

before calculation:
src.x1 = 8192, src.y1 = 8192

after calculation (pitch = 65536, cpp = 4, alignment = 262144)
src.x1 = 8192, src.y1 = 0, offset = 0x20000000

Damage clips are relative to original coodrdinates provided by
user-space. To compare these against src coordinates we need to use
original coordinates as provided by user-space. These can be obtained
by using drm_plane_state_src.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 98c3c8015a5c..16985de24019 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1767,7 +1767,8 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
 			continue;
 		}
 
-		drm_rect_fp_to_int(&src, &new_plane_state->uapi.src);
+		src = drm_plane_state_src(&new_plane_state->uapi);
+		drm_rect_fp_to_int(&src, &src);
 
 		drm_atomic_helper_damage_iter_init(&iter,
 						   &old_plane_state->uapi,
-- 
2.34.1


  parent reply	other threads:[~2022-08-23 11:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 11:29 [Intel-gfx] [PATCH v2 0/4] Fixes for damage clips handling Jouni Högander
2022-08-23 11:29 ` [Intel-gfx] [PATCH v2 1/4] drm: Use original src rect while initializing damage iterator Jouni Högander
2022-09-02 10:58   ` Kahola, Mika
2022-08-23 11:29 ` Jouni Högander [this message]
2022-09-02 10:59   ` [Intel-gfx] [PATCH v2 2/4] drm/i915/display: Use original src in psr2 sel fetch area calculation Kahola, Mika
2022-08-23 11:29 ` [Intel-gfx] [PATCH v2 3/4] drm/i915/display: Use drm helper instead of own loop for damage clips Jouni Högander
2022-09-02 11:03   ` Kahola, Mika
2022-08-23 11:29 ` [Intel-gfx] [PATCH v2 4/4] drm/tests: Set also mock plane src_x, src_y, src_w and src_h Jouni Högander
2022-09-02 11:06   ` Kahola, Mika
2022-09-03 14:04   ` Maíra Canal
2022-08-23 12:44 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Fixes for damage clips handling (rev2) Patchwork
2022-08-23 13:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-08-24  7:05 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-02 16:28 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Fixes for damage clips handling (rev3) Patchwork
2022-09-02 16:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-02 23:08 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-06 18:11 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2022-09-13  9:04 ` [Intel-gfx] [PATCH v2 0/4] Fixes for damage clips handling Ville Syrjälä
2022-09-13 10:47   ` Hogander, Jouni
2022-09-13 10:54     ` Thomas Zimmermann
2022-09-13 10:56       ` Thomas Zimmermann
2022-09-13 12:16         ` 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=20220823112920.352563-3-jouni.hogander@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox