public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Sripada, Radhakrishna" <radhakrishna.sripada@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Kahola, Mika" <mika.kahola@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 2/4] lib/rendercopy_gen9: Add GEN12 color clear
Date: Wed, 4 Dec 2019 00:37:51 +0000	[thread overview]
Message-ID: <d09c9c829f7596d73ee951b5559e0e4b0efd1a36.camel@intel.com> (raw)
In-Reply-To: <20191129134734.21965-3-mika.kahola@intel.com>

On Fri, 2019-11-29 at 15:47 +0200, Mika Kahola wrote:
> GEN12 supports color clear feature on the 3rd plane. The patch
> updates rendercopy function to and buffers to support clear color.
> 
> Surface state bitgroups 12 and 13 are updated to support clear value
> or depth clear value.
> 
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Radhakrishna Sripada<radhakrishna.sripada@intel.com>
> ---
>  lib/gen9_render.h       |  7 +++++--
>  lib/igt_fb.c            |  3 +++
>  lib/intel_batchbuffer.h |  3 +++
>  lib/rendercopy_gen9.c   | 11 +++++++++++
>  4 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/gen9_render.h b/lib/gen9_render.h
> index 9ee5782b..ab99563a 100644
> --- a/lib/gen9_render.h
> +++ b/lib/gen9_render.h
> @@ -118,12 +118,15 @@ struct gen9_surface_state {
>  		uint32_t aux_base_addr_hi;
>  	} ss11;
>  
> +	/* register can be used for either
> +	 * clear value or depth clear value
> +	 */
>  	struct {
> -		uint32_t hiz_depth_clear_value;
> +		uint32_t clear_address;
>  	} ss12;
>  
>  	struct {
> -		uint32_t reserved;
> +		uint32_t clear_address_hi;
>  	} ss13;
>  
>  	struct {
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 1d1e0d22..53aa344a 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -1936,6 +1936,9 @@ static void init_buf(struct fb_blit_upload
> *blit,
>  		buf->aux.offset = fb->offsets[1];
>  		buf->aux.stride = fb->strides[1];
>  	}
> +
> +	if (fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)
> +		buf->cc.offset = fb->offsets[2];
>  }
>  
>  static void fini_buf(struct igt_buf *buf)
> diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
> index e5f6e6d0..fc28dd55 100644
> --- a/lib/intel_batchbuffer.h
> +++ b/lib/intel_batchbuffer.h
> @@ -234,6 +234,9 @@ struct igt_buf {
>  		uint32_t offset;
>  		uint32_t stride;
>  	} aux;
> +	struct {
> +		uint32_t offset;
> +	} cc;
>  	/*< private >*/
>  	unsigned num_tiles;
>  };
> diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
> index 3189594f..8f75c185 100644
> --- a/lib/rendercopy_gen9.c
> +++ b/lib/rendercopy_gen9.c
> @@ -271,6 +271,17 @@ gen8_bind_buf(struct intel_batchbuffer *batch,
> const struct igt_buf *buf,
>  		assert(ret == 0);
>  	}
>  
> +	if (buf->cc.offset) {
> +		ss->ss12.clear_address = buf->bo->offset64 + buf-
> >cc.offset;
> +		ss->ss13.clear_address_hi = (buf->bo->offset64 + buf-
> >cc.offset) >> 32;
> +
> +		ret = drm_intel_bo_emit_reloc(batch->bo,
> +					      intel_batchbuffer_subdata
> _offset(batch, &ss->ss12),
> +					      buf->bo, buf->cc.offset,
> +					      read_domain,
> write_domain);
> +		assert(ret == 0);
> +	}
> +
>  	return offset;
>  }
>  
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-12-04  0:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 13:47 [igt-dev] [PATCH i-g-t 0/4] GEN12 Color Clear Mika Kahola
2019-11-29 13:47 ` [igt-dev] [PATCH i-g-t 1/4] drm-uapi/drm_fourcc: Format modifier for GEN12 render engine with " Mika Kahola
2019-12-04  0:35   ` Sripada, Radhakrishna
2019-11-29 13:47 ` [igt-dev] [PATCH i-g-t 2/4] lib/rendercopy_gen9: Add GEN12 color clear Mika Kahola
2019-12-04  0:37   ` Sripada, Radhakrishna [this message]
2019-11-29 13:47 ` [igt-dev] [PATCH i-g-t 3/4] lib/igt_fb.c: Update tile sizes for GEN12 Color Clear Mika Kahola
2019-12-04  0:38   ` Sripada, Radhakrishna
2019-11-29 13:47 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_ccs: Add GEN12 CCS Color Clear format modifiers Mika Kahola
2019-12-04  0:39   ` Sripada, Radhakrishna
2019-11-29 14:08 ` [igt-dev] ✗ GitLab.Pipeline: warning for GEN12 Color Clear Patchwork
2019-11-29 14:32 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2019-12-02  9:41 ` [igt-dev] ✗ Fi.CI.BAT: failure for GEN12 Color Clear (rev2) Patchwork
2019-12-04  8:55 ` [igt-dev] [PATCH i-g-t 0/4] GEN12 Color Clear Kahola, Mika

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=d09c9c829f7596d73ee951b5559e0e4b0efd1a36.camel@intel.com \
    --to=radhakrishna.sripada@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=mika.kahola@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