Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 6/6] lib/rendercopy: Enable clear color consistently
Date: Tue, 2 Jul 2024 20:20:24 +0300	[thread overview]
Message-ID: <ZoQ22BIzDwNizpWM@intel.com> (raw)
In-Reply-To: <20240625174032.10398-7-ville.syrjala@linux.intel.com>

On Tue, Jun 25, 2024 at 08:40:32PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We are computing the clear color enable bit differently
> for the reloc vs. what we stuff into the surface state
> directly. Unify.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/rendercopy_gen9.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
> index 04ec7ec99d9a..b4d34bc6864f 100644
> --- a/lib/rendercopy_gen9.c
> +++ b/lib/rendercopy_gen9.c
> @@ -146,6 +146,12 @@ static const uint32_t xe2_render_copy[][4] = {
>  	{ 0x8010c031, 0x00000004, 0x58000c24, 0x00c40000 },
>  };
>  
> +static bool cc_enable(struct intel_bb *ibb,
> +		      const struct intel_buf *buf, bool fast_clear)
> +{
> +	return fast_clear || (buf->cc.offset && !HAS_FLATCCS(ibb->devid));

This whole thing is actually wrong. We just want the
buf->cc.offset!=0 check and nothing else, regardless of
platform. Otherwise sampling from previously fast
cleared buffers will not work correctly on dg2/etc.

> +}
> +
>  /* Mostly copy+paste from gen6, except height, width, pitch moved */
>  static uint32_t
>  gen9_bind_buf(struct intel_bb *ibb, const struct intel_buf *buf, int is_dst,
> @@ -238,7 +244,7 @@ gen9_bind_buf(struct intel_bb *ibb, const struct intel_buf *buf, int is_dst,
>  
>  			address = intel_bb_offset_reloc_with_delta(ibb, buf->handle,
>  								   read_domain, write_domain,
> -								   (buf->cc.offset ? (1 << 10) : 0)
> +								   (cc_enable(ibb, buf, fast_clear) ? (1 << 10) : 0)
>  								   | buf->ccs[0].offset,
>  								   intel_bb_offset(ibb) + 4 * 10,
>  								   buf->addr.offset);
> @@ -246,7 +252,7 @@ gen9_bind_buf(struct intel_bb *ibb, const struct intel_buf *buf, int is_dst,
>  			ss->ss11.aux_base_addr_hi = (address + buf->ccs[0].offset) >> 32;
>  		}
>  
> -		if (fast_clear || (buf->cc.offset && !HAS_FLATCCS(ibb->devid))) {
> +		if (cc_enable(ibb, buf, fast_clear)) {
>  			igt_assert(buf->compression == I915_COMPRESSION_RENDER);
>  
>  			ss->ss10.clearvalue_addr_enable = 1;
> -- 
> 2.44.2

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2024-07-02 17:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 17:40 [PATCH i-g-t 0/6] lib: igt_fb/rendercopy fixes/cleanups Ville Syrjala
2024-06-25 17:40 ` [PATCH i-g-t 1/6] lib/rendercopy: Add deltas to all surface relocs Ville Syrjala
2024-06-27 11:22   ` [PATCH i-g-t v2 " Ville Syrjala
2024-07-02  5:49     ` Zbigniew Kempczyński
2024-07-02 22:53       ` Ville Syrjälä
2024-06-25 17:40 ` [PATCH i-g-t 2/6] tests/kms_big_fb: Use igt_fb_create_intel_buf() Ville Syrjala
2024-07-02  5:57   ` Zbigniew Kempczyński
2024-06-25 17:40 ` [PATCH i-g-t 3/6] tests/kms_frontbuffer_tracking: Use igt_create_fb() Ville Syrjala
2024-06-25 17:40 ` [PATCH i-g-t 4/6] lib/igt_fb: Make igt_calc_fb_size() somewhat usable Ville Syrjala
2024-06-25 17:40 ` [PATCH i-g-t 5/6] lib/rendercopy: Always setup clear color for TGL Ville Syrjala
2024-06-25 17:40 ` [PATCH i-g-t 6/6] lib/rendercopy: Enable clear color consistently Ville Syrjala
2024-07-02 17:20   ` Ville Syrjälä [this message]
2024-06-25 18:52 ` ✓ CI.xeBAT: success for lib: igt_fb/rendercopy fixes/cleanups Patchwork
2024-06-25 18:55 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-25 22:35 ` ✗ CI.xeFULL: " Patchwork
2024-06-26 11:22 ` ✗ Fi.CI.BAT: failure for lib: igt_fb/rendercopy fixes/cleanups (rev2) Patchwork
2024-06-26 11:41 ` ✓ CI.xeBAT: success " Patchwork
2024-06-26 15:24 ` ✗ CI.xeFULL: failure " Patchwork
2024-06-28 12:03 ` ✓ CI.xeBAT: success for lib: igt_fb/rendercopy fixes/cleanups (rev3) Patchwork
2024-06-28 12:11 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-28 13:33 ` ✓ CI.xeFULL: success " Patchwork
2024-06-29 13:53 ` ✓ CI.xeBAT: success for lib: igt_fb/rendercopy fixes/cleanups (rev4) Patchwork
2024-06-29 14:02 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-29 14:54 ` ✓ CI.xeFULL: success " Patchwork
2024-07-02 19:37 ` ✓ CI.xeBAT: success for lib: igt_fb/rendercopy fixes/cleanups (rev5) Patchwork
2024-07-02 19:46 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-07-02 20:36 ` ✓ CI.xeFULL: success " Patchwork
2024-07-03 12:30 ` ✓ Fi.CI.BAT: success for lib: igt_fb/rendercopy fixes/cleanups (rev6) Patchwork
2024-07-03 12:33 ` ✓ CI.xeBAT: " Patchwork
2024-07-03 14:40 ` ✓ CI.xeFULL: " Patchwork
2024-07-04  0:09 ` ✗ 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=ZoQ22BIzDwNizpWM@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@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