From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
"Chery, Nanley G" <nanley.g.chery@intel.com>,
"Saarinen, Jani" <jani.saarinen@intel.com>,
"Graunke, Kenneth W" <kenneth.w.graunke@intel.com>,
"Souza, Jose" <jose.souza@intel.com>,
"Mathew, Alwin" <alwin.mathew@intel.com>,
"Zhang, Jianxun" <jianxun.zhang@intel.com>,
"Nikula, Jani" <jani.nikula@intel.com>
Subject: Re: [RFC PATCH 3/3] drm/i915/display: allow creation of case I915_FORMAT_MOD_4_TILED_XE2_CCS type framebuffer
Date: Tue, 7 May 2024 19:06:10 +0300 [thread overview]
Message-ID: <ZjpRcqvy7BSCV5fo@intel.com> (raw)
In-Reply-To: <20240506185238.364539-4-juhapekka.heikkila@gmail.com>
On Mon, May 06, 2024 at 09:52:38PM +0300, Juha-Pekka Heikkila wrote:
> Add I915_FORMAT_MOD_4_TILED_XE2_CCS to possible created tiling for new framebuffer
> on Xe driver.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 1 +
> drivers/gpu/drm/i915/display/intel_fb.c | 10 ++++++++++
> drivers/gpu/drm/i915/display/skl_universal_plane.c | 4 +++-
> 3 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index ef986b508431..083147a21edb 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -6150,6 +6150,7 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
> case I915_FORMAT_MOD_Y_TILED:
> case I915_FORMAT_MOD_Yf_TILED:
> case I915_FORMAT_MOD_4_TILED:
> + case I915_FORMAT_MOD_4_TILED_XE2_CCS:
> break;
> default:
> drm_dbg_kms(&i915->drm,
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index bf24f48a1e76..6a44746b8381 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -161,6 +161,10 @@ struct intel_modifier_desc {
>
> static const struct intel_modifier_desc intel_modifiers[] = {
> {
> + .modifier = I915_FORMAT_MOD_4_TILED_XE2_CCS,
> + .display_ver = { 14, -1 },
Should that say 20?
> + .plane_caps = INTEL_PLANE_CAP_TILING_4,
> + }, {
> .modifier = I915_FORMAT_MOD_4_TILED_MTL_MC_CCS,
> .display_ver = { 14, 14 },
> .plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_MC,
> @@ -435,6 +439,10 @@ static bool plane_has_modifier(struct drm_i915_private *i915,
> HAS_FLAT_CCS(i915) != !md->ccs.packed_aux_planes)
> return false;
>
> + if (md->modifier == I915_FORMAT_MOD_4_TILED_XE2_CCS &&
> + GRAPHICS_VER(i915) < 20)
> + return false;
> +
> return true;
> }
>
> @@ -657,6 +665,7 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)
> return 128;
> else
> return 512;
> + case I915_FORMAT_MOD_4_TILED_XE2_CCS:
> case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
> case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC:
> case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS:
> @@ -858,6 +867,7 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,
> case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS:
> case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC:
> return 16 * 1024;
> + case I915_FORMAT_MOD_4_TILED_XE2_CCS:
> case I915_FORMAT_MOD_Y_TILED_CCS:
> case I915_FORMAT_MOD_Yf_TILED_CCS:
> case I915_FORMAT_MOD_Y_TILED:
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 0a8e781a3648..e590fea1180a 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -792,6 +792,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)
> case I915_FORMAT_MOD_Y_TILED:
> return PLANE_CTL_TILED_Y;
> case I915_FORMAT_MOD_4_TILED:
> + case I915_FORMAT_MOD_4_TILED_XE2_CCS:
> return PLANE_CTL_TILED_4;
> case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
> return PLANE_CTL_TILED_4 |
> @@ -949,7 +950,8 @@ static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
> plane_ctl |= adlp_plane_ctl_arb_slots(plane_state);
>
> if (GRAPHICS_VER(dev_priv) >= 20 &&
> - fb->modifier == I915_FORMAT_MOD_4_TILED) {
> + (fb->modifier == I915_FORMAT_MOD_4_TILED ||
> + fb->modifier == I915_FORMAT_MOD_4_TILED_XE2_CCS)) {
> plane_ctl |= PLANE_CTL_RENDER_DECOMPRESSION_ENABLE;
If we got to the trouble of adding a new modifier then we should
just let skl_plane_ctl_tiling() handle this, like it does for
every other platform.
> }
>
> --
> 2.43.2
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-05-07 16:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 18:52 [RFC PATCH 0/3] Introducing I915_FORMAT_MOD_4_TILED_XE2_CCS Modifier for Xe2 Juha-Pekka Heikkila
2024-05-06 18:52 ` [RFC PATCH 1/3] drm/fourcc: define Intel Xe2 related tile4 ccs modifier Juha-Pekka Heikkila
2024-06-04 15:54 ` Chery, Nanley G
2024-05-06 18:52 ` [RFC PATCH 2/3] drm/xe/display: allow creation of case I915_FORMAT_MOD_4_TILED_XE2_CCS type framebuffer Juha-Pekka Heikkila
2024-05-07 16:07 ` Ville Syrjälä
2024-05-07 16:41 ` Juha-Pekka Heikkila
2024-05-06 18:52 ` [RFC PATCH 3/3] drm/i915/display: " Juha-Pekka Heikkila
2024-05-07 16:06 ` Ville Syrjälä [this message]
2024-05-07 16:43 ` Juha-Pekka Heikkila
2024-05-06 20:41 ` ✗ Fi.CI.CHECKPATCH: warning for Introducing I915_FORMAT_MOD_4_TILED_XE2_CCS Modifier for Xe2 Patchwork
2024-05-06 20:56 ` ✓ Fi.CI.BAT: success " Patchwork
2024-05-06 23:53 ` ✓ CI.Patch_applied: " Patchwork
2024-05-06 23:53 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-06 23:54 ` ✓ CI.KUnit: success " Patchwork
2024-05-07 0:06 ` ✓ CI.Build: " Patchwork
2024-05-07 0:09 ` ✓ CI.Hooks: " Patchwork
2024-05-07 0:10 ` ✗ CI.checksparse: warning " Patchwork
2024-05-07 0:56 ` ✓ CI.BAT: success " Patchwork
2024-05-07 5:12 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-05-07 5:48 ` ✓ CI.FULL: success " Patchwork
2024-05-07 22:56 ` [RFC PATCH 0/3] " Matt Roper
2024-05-08 13:08 ` Juha-Pekka Heikkila
2024-05-11 0:58 ` Kenneth Graunke
2024-05-14 9:25 ` Joonas Lahtinen
2024-05-14 16:51 ` Thomas Hellström
2024-07-19 20:17 ` Zhang, Jianxun
2024-07-23 22:51 ` Chery, Nanley G
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=ZjpRcqvy7BSCV5fo@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=alwin.mathew@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jani.saarinen@intel.com \
--cc=jianxun.zhang@intel.com \
--cc=jose.souza@intel.com \
--cc=juhapekka.heikkila@gmail.com \
--cc=kenneth.w.graunke@intel.com \
--cc=nanley.g.chery@intel.com \
/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.