All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/i915_blt: Equalize pitch and aux-ccs for full resolve
@ 2022-10-20  6:47 Zbigniew Kempczyński
  0 siblings, 0 replies; 4+ messages in thread
From: Zbigniew Kempczyński @ 2022-10-20  6:47 UTC (permalink / raw)
  To: igt-dev

According to documentation and hw team suggestion use source pitch
and aux-ccs in destination object when inplace decompression is
performed (full-resolve operation).

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Karolina Drobnik <karolina.drobnik@intel.com>
---
 lib/i915/i915_blt.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/i915/i915_blt.c b/lib/i915/i915_blt.c
index 8d46e51fb7..a8615f0a1d 100644
--- a/lib/i915/i915_blt.c
+++ b/lib/i915/i915_blt.c
@@ -317,8 +317,15 @@ static void fill_data(struct gen12_block_copy_data *data,
 	data->dw00.special_mode = __special_mode(blt);
 	data->dw00.length = extended_command ? 20 : 10;
 
-	data->dw01.dst_pitch = blt->dst.pitch - 1;
-	data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
+	if (__special_mode(blt) == SM_FULL_RESOLVE)
+		data->dw01.dst_pitch = blt->src.pitch - 1;
+	else
+		data->dw01.dst_pitch = blt->dst.pitch - 1;
+
+	if (__special_mode(blt) == SM_FULL_RESOLVE)
+		data->dw01.dst_aux_mode = __aux_mode(&blt->src);
+	else
+		data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
 	data->dw01.dst_mocs = blt->dst.mocs;
 	data->dw01.dst_compression = blt->dst.compression;
 	data->dw01.dst_tiling = __block_tiling(blt->dst.tiling);
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/i915_blt: Equalize pitch and aux-ccs for full resolve
  2022-10-21  9:28 ` Karolina Drobnik
@ 2022-10-24  5:41   ` Zbigniew Kempczyński
  0 siblings, 0 replies; 4+ messages in thread
From: Zbigniew Kempczyński @ 2022-10-24  5:41 UTC (permalink / raw)
  To: Karolina Drobnik; +Cc: igt-dev

On Fri, Oct 21, 2022 at 11:28:40AM +0200, Karolina Drobnik wrote:
> On 20.10.2022 08:53, Zbigniew Kempczyński wrote:
> > According to documentation and hw team suggestion use source pitch
> > and aux-ccs in destination object when inplace decompression is
> > performed (full-resolve operation).
> > 
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> > Cc: Karolina Drobnik <karolina.drobnik@intel.com>
> > 
> > ---
> > v2: group assignments in if/else
> > ---
> >   lib/i915/i915_blt.c | 10 ++++++++--
> >   1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/lib/i915/i915_blt.c b/lib/i915/i915_blt.c
> > index 8d46e51fb7..a886c1d72d 100644
> > --- a/lib/i915/i915_blt.c
> > +++ b/lib/i915/i915_blt.c
> > @@ -317,8 +317,14 @@ static void fill_data(struct gen12_block_copy_data *data,
> >   	data->dw00.special_mode = __special_mode(blt);
> >   	data->dw00.length = extended_command ? 20 : 10;
> > -	data->dw01.dst_pitch = blt->dst.pitch - 1;
> > -	data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
> > +	if (__special_mode(blt) == SM_FULL_RESOLVE) {
> > +		data->dw01.dst_pitch = blt->src.pitch - 1;
> > +		data->dw01.dst_aux_mode = __aux_mode(&blt->src);
> > +	} else {
> > +		data->dw01.dst_pitch = blt->dst.pitch - 1;
> > +		data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
> > +	}
> > +
> 
> iirc, with FULL_RESOLVE, we want to have identical src and dst
> configuration, not just aux and pitch. Still, these were the only
> differences we found when analysing bbs (and it would be hard to
> restructure fill_data() to do it), so I'm fine with this change.

This means we can't decompress inplace to other than linear format
what would be great to have.

Thanks for the review.

--
Zbigniew

> 
> Reviewed-by: Karolina Drobnik <karolina.drobnik@intel.com>
> 
> >   	data->dw01.dst_mocs = blt->dst.mocs;
> >   	data->dw01.dst_compression = blt->dst.compression;
> >   	data->dw01.dst_tiling = __block_tiling(blt->dst.tiling);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/i915_blt: Equalize pitch and aux-ccs for full resolve
  2022-10-20  6:53 Zbigniew Kempczyński
@ 2022-10-21  9:28 ` Karolina Drobnik
  2022-10-24  5:41   ` Zbigniew Kempczyński
  0 siblings, 1 reply; 4+ messages in thread
From: Karolina Drobnik @ 2022-10-21  9:28 UTC (permalink / raw)
  To: Zbigniew Kempczyński; +Cc: igt-dev

On 20.10.2022 08:53, Zbigniew Kempczyński wrote:
> According to documentation and hw team suggestion use source pitch
> and aux-ccs in destination object when inplace decompression is
> performed (full-resolve operation).
> 
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Karolina Drobnik <karolina.drobnik@intel.com>
> 
> ---
> v2: group assignments in if/else
> ---
>   lib/i915/i915_blt.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/i915/i915_blt.c b/lib/i915/i915_blt.c
> index 8d46e51fb7..a886c1d72d 100644
> --- a/lib/i915/i915_blt.c
> +++ b/lib/i915/i915_blt.c
> @@ -317,8 +317,14 @@ static void fill_data(struct gen12_block_copy_data *data,
>   	data->dw00.special_mode = __special_mode(blt);
>   	data->dw00.length = extended_command ? 20 : 10;
>   
> -	data->dw01.dst_pitch = blt->dst.pitch - 1;
> -	data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
> +	if (__special_mode(blt) == SM_FULL_RESOLVE) {
> +		data->dw01.dst_pitch = blt->src.pitch - 1;
> +		data->dw01.dst_aux_mode = __aux_mode(&blt->src);
> +	} else {
> +		data->dw01.dst_pitch = blt->dst.pitch - 1;
> +		data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
> +	}
> +

iirc, with FULL_RESOLVE, we want to have identical src and dst
configuration, not just aux and pitch. Still, these were the only
differences we found when analysing bbs (and it would be hard to
restructure fill_data() to do it), so I'm fine with this change.

Reviewed-by: Karolina Drobnik <karolina.drobnik@intel.com>

>   	data->dw01.dst_mocs = blt->dst.mocs;
>   	data->dw01.dst_compression = blt->dst.compression;
>   	data->dw01.dst_tiling = __block_tiling(blt->dst.tiling);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [igt-dev] [PATCH i-g-t] lib/i915_blt: Equalize pitch and aux-ccs for full resolve
@ 2022-10-20  6:53 Zbigniew Kempczyński
  2022-10-21  9:28 ` Karolina Drobnik
  0 siblings, 1 reply; 4+ messages in thread
From: Zbigniew Kempczyński @ 2022-10-20  6:53 UTC (permalink / raw)
  To: igt-dev

According to documentation and hw team suggestion use source pitch
and aux-ccs in destination object when inplace decompression is
performed (full-resolve operation).

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Karolina Drobnik <karolina.drobnik@intel.com>

---
v2: group assignments in if/else
---
 lib/i915/i915_blt.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/i915/i915_blt.c b/lib/i915/i915_blt.c
index 8d46e51fb7..a886c1d72d 100644
--- a/lib/i915/i915_blt.c
+++ b/lib/i915/i915_blt.c
@@ -317,8 +317,14 @@ static void fill_data(struct gen12_block_copy_data *data,
 	data->dw00.special_mode = __special_mode(blt);
 	data->dw00.length = extended_command ? 20 : 10;
 
-	data->dw01.dst_pitch = blt->dst.pitch - 1;
-	data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
+	if (__special_mode(blt) == SM_FULL_RESOLVE) {
+		data->dw01.dst_pitch = blt->src.pitch - 1;
+		data->dw01.dst_aux_mode = __aux_mode(&blt->src);
+	} else {
+		data->dw01.dst_pitch = blt->dst.pitch - 1;
+		data->dw01.dst_aux_mode = __aux_mode(&blt->dst);
+	}
+
 	data->dw01.dst_mocs = blt->dst.mocs;
 	data->dw01.dst_compression = blt->dst.compression;
 	data->dw01.dst_tiling = __block_tiling(blt->dst.tiling);
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-24  5:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20  6:47 [igt-dev] [PATCH i-g-t] lib/i915_blt: Equalize pitch and aux-ccs for full resolve Zbigniew Kempczyński
2022-10-20  6:53 Zbigniew Kempczyński
2022-10-21  9:28 ` Karolina Drobnik
2022-10-24  5:41   ` Zbigniew Kempczyński

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.