From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v3 04/11] lib/intel_bufops: Restrict tilings on non-flatccs platforms
Date: Tue, 7 May 2024 17:07:27 +0300 [thread overview]
Message-ID: <fec0ddfb-5940-4752-83ea-6b820a0fb6a1@gmail.com> (raw)
In-Reply-To: <20240507075836.259581-5-zbigniew.kempczynski@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
On 7.5.2024 10.58, Zbigniew Kempczyński wrote:
> 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>
> ---
> 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 */
next prev parent reply other threads:[~2024-05-07 14:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 7:58 [PATCH i-g-t v3 00/11] Add render-copy compression on Xe+ Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 01/11] lib/intel_bufops: Store devid on buffer ops creation Zbigniew Kempczyński
2024-05-07 14:05 ` Juha-Pekka Heikkila
2024-05-07 7:58 ` [PATCH i-g-t v3 02/11] lib/intel_blt: Rename confusing fb tile to i915 tile Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 03/11] lib/intel_blt: Add i915 -> blt tile helper converter Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 04/11] lib/intel_bufops: Restrict tilings on non-flatccs platforms Zbigniew Kempczyński
2024-05-07 14:07 ` Juha-Pekka Heikkila [this message]
2024-05-07 7:58 ` [PATCH i-g-t v3 05/11] lib/intel_bufops: Start supporting compression on Xe2+ Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 06/11] lib/rendercopy_gen9: Allow to use all tilings on flatccs platforms Zbigniew Kempczyński
2024-05-07 12:59 ` Juha-Pekka Heikkila
2024-05-08 5:59 ` Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 07/11] lib/intel_cmds_info: Define tiling macros Zbigniew Kempczyński
2024-05-07 14:27 ` Juha-Pekka Heikkila
2024-05-08 7:13 ` Zbigniew Kempczyński
2024-05-08 11:53 ` Juha-Pekka Heikkila
2024-05-07 7:58 ` [PATCH i-g-t v3 08/11] lib/intel_cmds_info: Introduce render tilings Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 09/11] lib/intel_blt: Add render tilings and compression support helper Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 10/11] tests/xe_render_copy: Add subtest which exercises compression Zbigniew Kempczyński
2024-05-07 7:58 ` [PATCH i-g-t v3 11/11] tests/xe_intel_bb: Use supported tilings instead hardcoded ones Zbigniew Kempczyński
2024-05-07 9:25 ` ✓ Fi.CI.BAT: success for Add render-copy compression on Xe+ (rev3) Patchwork
2024-05-07 13:07 ` ✗ Fi.CI.IGT: failure " 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=fec0ddfb-5940-4752-83ea-6b820a0fb6a1@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=zbigniew.kempczynski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox