From: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 7/9] drm/i915/mtl: Add MTL for remapping CCS FBs
Date: Tue, 21 Feb 2023 23:35:05 -0800 [thread overview]
Message-ID: <20230222073507.788705-8-radhakrishna.sripada@intel.com> (raw)
In-Reply-To: <20230222073507.788705-1-radhakrishna.sripada@intel.com>
From: Clint Taylor <clinton.a.taylor@intel.com>
Add support for remapping CCS FBs on MTL to remove the restriction
of the power-of-two sized stride and the 2MB surface offset alignment
for these FBs.
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
---
drivers/gpu/drm/i915/display/intel_fb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index 799bdc81a6a9..fc4cb829e8af 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -1189,7 +1189,8 @@ bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb)
{
struct drm_i915_private *i915 = to_i915(fb->base.dev);
- return IS_ALDERLAKE_P(i915) && fb->base.modifier != DRM_FORMAT_MOD_LINEAR;
+ return (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14) &&
+ fb->base.modifier != DRM_FORMAT_MOD_LINEAR;
}
static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation)
@@ -1325,9 +1326,10 @@ plane_view_scanout_stride(const struct intel_framebuffer *fb, int color_plane,
unsigned int tile_width,
unsigned int src_stride_tiles, unsigned int dst_stride_tiles)
{
+ struct drm_i915_private *i915 = to_i915(fb->base.dev);
unsigned int stride_tiles;
- if (IS_ALDERLAKE_P(to_i915(fb->base.dev)))
+ if (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14)
stride_tiles = src_stride_tiles;
else
stride_tiles = dst_stride_tiles;
@@ -1521,7 +1523,8 @@ static void intel_fb_view_init(struct drm_i915_private *i915, struct intel_fb_vi
memset(view, 0, sizeof(*view));
view->gtt.type = view_type;
- if (view_type == I915_GTT_VIEW_REMAPPED && IS_ALDERLAKE_P(i915))
+ if (view_type == I915_GTT_VIEW_REMAPPED &&
+ (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14))
view->gtt.remapped.plane_alignment = SZ_2M / PAGE_SIZE;
}
--
2.34.1
next prev parent reply other threads:[~2023-02-22 7:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 7:34 [Intel-gfx] [PATCH v2 0/9] Misc Meteorlake patches Radhakrishna Sripada
2023-02-22 7:34 ` [Intel-gfx] [PATCH v2 1/9] drm/i915/mtl: Fix Wa_14015855405 implementation Radhakrishna Sripada
2023-02-22 18:53 ` Matt Roper
2023-02-22 7:35 ` [Intel-gfx] [PATCH v2 2/9] drm/i915/gt: generate per tile debugfs files Radhakrishna Sripada
2023-02-22 19:00 ` Matt Roper
2023-02-22 7:35 ` [Intel-gfx] [PATCH v2 3/9] drm/i915/mtl: make IRQ reset and postinstall multi-gt aware Radhakrishna Sripada
2023-02-22 15:19 ` Lucas De Marchi
2023-02-22 7:35 ` [Intel-gfx] [PATCH v2 4/9] drm/i915/fbdev: lock the fbdev obj before vma pin Radhakrishna Sripada
2023-02-22 19:07 ` Matt Roper
2023-02-22 7:35 ` [Intel-gfx] [PATCH v2 5/9] drm/i915/display/mtl: Program latch to phy reset Radhakrishna Sripada
2023-02-22 19:13 ` Matt Roper
2023-02-22 7:35 ` [Intel-gfx] [PATCH v2 6/9] drm/i915/mtl: Drop FLAT CCS check Radhakrishna Sripada
2023-02-22 19:16 ` Matt Roper
2023-02-22 7:35 ` Radhakrishna Sripada [this message]
2023-02-22 19:26 ` [Intel-gfx] [PATCH v2 7/9] drm/i915/mtl: Add MTL for remapping CCS FBs Matt Roper
2023-02-22 7:35 ` [Intel-gfx] [PATCH v2 8/9] drm/i915/mtl: define MTL related ccs modifiers Radhakrishna Sripada
2023-02-22 19:29 ` Matt Roper
2023-02-22 7:35 ` [Intel-gfx] [PATCH v2 9/9] drm/i915/mtl: Add handling for MTL " Radhakrishna Sripada
2023-02-22 8:04 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Misc Meteorlake patches (rev2) Patchwork
2023-02-22 15:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-02-22 16:26 ` [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=20230222073507.788705-8-radhakrishna.sripada@intel.com \
--to=radhakrishna.sripada@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox