From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>
Subject: [PATCH i-g-t v4 04/11] lib/intel_bufops: Restrict tilings on non-flatccs platforms
Date: Wed, 8 May 2024 14:54:36 +0200 [thread overview]
Message-ID: <20240508125443.404402-5-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20240508125443.404402-1-zbigniew.kempczynski@intel.com>
JP noticed after last changes introduced in bufops we keep unnecessary
two conditions instead of pack them to single one. This is refactor,
no functional change.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Suggested-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
lib/intel_bufops.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 43d6dd5b43..7118272e5f 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -896,7 +896,9 @@ static void __intel_buf_init(struct buf_ops *bops,
size = buf->surface[0].size = buf->surface[0].stride * aligned_height;
- if (compression) {
+ if (compression && !HAS_FLATCCS(buf_ops_get_devid(bops))) {
+ int aux_width, aux_height;
+
igt_require(bops->intel_gen >= 9);
igt_assert(req_tiling == I915_TILING_Y ||
req_tiling == I915_TILING_Yf ||
@@ -907,17 +909,12 @@ static void __intel_buf_init(struct buf_ops *bops,
* CCS units, that is 4 * 64 bytes. These 4 CCS units are in
* turn mapped by one L1 AUX page table entry.
*/
+ aux_width = intel_buf_ccs_width(bops->intel_gen, buf);
+ aux_height = intel_buf_ccs_height(bops->intel_gen, buf);
- if (!HAS_FLATCCS(intel_get_drm_devid(bops->fd))) {
- int aux_width, aux_height;
-
- aux_width = intel_buf_ccs_width(bops->intel_gen, buf);
- aux_height = intel_buf_ccs_height(bops->intel_gen, buf);
-
- buf->ccs[0].offset = buf->surface[0].stride * ALIGN(height, 32);
- buf->ccs[0].stride = aux_width;
- size = buf->ccs[0].offset + aux_width * aux_height;
- }
+ buf->ccs[0].offset = buf->surface[0].stride * ALIGN(height, 32);
+ buf->ccs[0].stride = aux_width;
+ size = buf->ccs[0].offset + aux_width * aux_height;
}
/* Store buffer size to avoid mistakes in calculating it again */
--
2.34.1
next prev parent reply other threads:[~2024-05-08 12:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 12:54 [PATCH i-g-t v4 00/11] Add render-copy compression on Xe+ Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 01/11] lib/intel_bufops: Store devid on buffer ops creation Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 02/11] lib/intel_blt: Rename confusing fb tile to i915 tile Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 03/11] lib/intel_blt: Add i915 -> blt tile helper converter Zbigniew Kempczyński
2024-05-08 12:54 ` Zbigniew Kempczyński [this message]
2024-05-08 12:54 ` [PATCH i-g-t v4 05/11] lib/intel_bufops: Start supporting compression on Xe2+ Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 06/11] lib/rendercopy_gen9: Separate xe and xe2 compression format Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 07/11] lib/intel_cmds_info: Define tiling macros Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 08/11] lib/intel_cmds_info: Introduce render tilings Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 09/11] lib/intel_blt: Add render tilings and compression support helper Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 10/11] tests/xe_render_copy: Add subtest which exercises compression Zbigniew Kempczyński
2024-05-08 12:54 ` [PATCH i-g-t v4 11/11] tests/xe_intel_bb: Use supported tilings instead hardcoded ones Zbigniew Kempczyński
2024-05-09 5:18 ` Karolina Stolarek
2024-05-08 17:41 ` ✓ CI.xeBAT: success for Add render-copy compression on Xe+ (rev4) Patchwork
2024-05-08 17:48 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-09 3:22 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-09 8:34 ` ✓ Fi.CI.IGT: success " 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=20240508125443.404402-5-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox