Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Grzegorzek, Dominik" <dominik.grzegorzek@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"kamil.konieczny@linux.intel.com"
	<kamil.konieczny@linux.intel.com>
Cc: "Hajda, Andrzej" <andrzej.hajda@intel.com>
Subject: Re: [PATCH i-g-t v2] lib/gpgpu_shader: Fix compilation warning and write dword shader
Date: Wed, 21 Aug 2024 07:03:57 +0000	[thread overview]
Message-ID: <d36dc4076906e156bae9d2cdc58357baaa6854de.camel@intel.com> (raw)
In-Reply-To: <20240819175130.ou26fda5jnhqbs3l@kamilkon-DESK.igk.intel.com>

On Mon, 2024-08-19 at 19:51 +0200, Kamil Konieczny wrote:
> Hi Dominik,
> On 2024-08-14 at 15:04:23 +0200, Dominik Grzegorzek wrote:
> > 1) Fix src1_null macro definition to match platforms which are mentioned in
> > the comment above the declaration. (DG2+)
> > 
> > Fixes:
> > iga64 -Xauto-deps -Wall -p=12p71 lib/iga64_generated_codes.c.d/iga64_assembly_eot.12p71.asm
> > line 2.37: warning: Src1.Length should suffix src1 register (e.g. r10:4)
> > (W) send.gtwy (8|M0) null r112 null 0 0x02000000 {EOT}
> >                                     ^
> > 2) Zero out r4 register in media block write message to prevent
> >    errors when the same register was used earlier in the shader.
> > 
> 
> Could you split this patch into two fixes? Now subject suggest
> that you fixed one thing and write new dword shader, while it
> looks like two fixes?
> 
> Regards,
> Kamil
Sure, I will split them.

Regards,
Dominik
> 
> > v2: clear r4 before setting r5 (with small grfs the instruction also clears r5)
> > 
> > Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
> > Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
> > ---
> >  lib/gpgpu_shader.c          |  4 ++--
> >  lib/iga64_generated_codes.c | 18 +++++++++++-------
> >  lib/iga64_macros.h          |  2 +-
> >  3 files changed, 14 insertions(+), 10 deletions(-)
> > 
> > diff --git a/lib/gpgpu_shader.c b/lib/gpgpu_shader.c
> > index 991455c49..80bad342a 100644
> > --- a/lib/gpgpu_shader.c
> > +++ b/lib/gpgpu_shader.c
> > @@ -281,6 +281,8 @@ void gpgpu_shader__write_dword(struct gpgpu_shader *shdr, uint32_t value,
> >  			       uint32_t y_offset)
> >  {
> >  	emit_iga64_code(shdr, media_block_write, "				\n\
> > +	// Clear message header							\n\
> > +(W)	mov (16|M0)              r4.0<1>:ud    0x0:ud				\n\
> >  	// Payload								\n\
> >  (W)	mov (1|M0)               r5.0<1>:ud    ARG(3):ud			\n\
> >  (W)	mov (1|M0)               r5.1<1>:ud    ARG(4):ud			\n\
> > @@ -303,8 +305,6 @@ void gpgpu_shader__write_dword(struct gpgpu_shader *shdr, uint32_t value,
> >  	// Load r2.4-7 with tg id Y + ARG(1):ud					\n\
> >  (W)	mov (1|M0)               r2.1<1>:ud    r0.6<0;1,0>:ud			\n\
> >  (W)	add (1|M0)               r2.1<1>:ud    r2.1<0;1,0>:ud    ARG(1):ud	\n\
> > -	// payload setup							\n\
> > -(W)	mov (16|M0)              r4.0<1>:ud    0x0:ud				\n\
> >  	// Store X and Y block start (160:191 and 192:223)			\n\
> >  (W)	mov (2|M0)               r4.5<1>:ud    r2.0<2;2,1>:ud			\n\
> >  	// Store X and Y block max_size (224:231 and 232:239)			\n\
> > diff --git a/lib/iga64_generated_codes.c b/lib/iga64_generated_codes.c
> > index 6a08c4844..87270bb46 100644
> > --- a/lib/iga64_generated_codes.c
> > +++ b/lib/iga64_generated_codes.c
> > @@ -3,10 +3,11 @@
> >  
> >  #include "gpgpu_shader.h"
> >  
> > -#define MD5_SUM_IGA64_ASMS 2c503cbfbd7b3043e9a52188ae4da7a8
> > +#define MD5_SUM_IGA64_ASMS 96abf1aa2d0cc900ebba8203cefdd30c
> >  
> >  struct iga64_template const iga64_code_media_block_write[] = {
> >  	{ .gen_ver = 2000, .size = 56, .code = (const uint32_t []) {
> > +		0x80100061, 0x04054220, 0x00000000, 0x00000000,
> >  		0x80000061, 0x05054220, 0x00000000, 0xc0ded003,
> >  		0x80000061, 0x05154220, 0x00000000, 0xc0ded004,
> >  		0x80000061, 0x05254220, 0x00000000, 0xc0ded005,
> > @@ -14,15 +15,15 @@ struct iga64_template const iga64_code_media_block_write[] = {
> >  		0x80000069, 0x02058220, 0x02000014, 0xc0ded000,
> >  		0x80000061, 0x02150220, 0x00000064, 0x00000000,
> >  		0x80001940, 0x02158220, 0x02000214, 0xc0ded001,
> > -		0x80100061, 0x04054220, 0x00000000, 0x00000000,
> > -		0x80041a61, 0x04550220, 0x00220205, 0x00000000,
> > +		0x80041961, 0x04550220, 0x00220205, 0x00000000,
> >  		0x80000061, 0x04754220, 0x00000000, 0xc0ded002,
> >  		0x80132031, 0x00000000, 0xd00e0494, 0x04000000,
> >  		0x80000001, 0x00010000, 0x20000000, 0x00000000,
> >  		0x80000001, 0x00010000, 0x30000000, 0x00000000,
> >  		0x80000901, 0x00010000, 0x00000000, 0x00000000,
> >  	}},
> > -	{ .gen_ver = 1270, .size = 56, .code = (const uint32_t []) {
> > +	{ .gen_ver = 1270, .size = 60, .code = (const uint32_t []) {
> > +		0x80040061, 0x04054220, 0x00000000, 0x00000000,
> >  		0x80000061, 0x05054220, 0x00000000, 0xc0ded003,
> >  		0x80000061, 0x05254220, 0x00000000, 0xc0ded004,
> >  		0x80000061, 0x05454220, 0x00000000, 0xc0ded005,
> > @@ -38,7 +39,8 @@ struct iga64_template const iga64_code_media_block_write[] = {
> >  		0x80000001, 0x00010000, 0x30000000, 0x00000000,
> >  		0x80000901, 0x00010000, 0x00000000, 0x00000000,
> >  	}},
> > -	{ .gen_ver = 1260, .size = 52, .code = (const uint32_t []) {
> > +	{ .gen_ver = 1260, .size = 56, .code = (const uint32_t []) {
> > +		0x80100061, 0x04054220, 0x00000000, 0x00000000,
> >  		0x80000061, 0x05054220, 0x00000000, 0xc0ded003,
> >  		0x80000061, 0x05154220, 0x00000000, 0xc0ded004,
> >  		0x80000061, 0x05254220, 0x00000000, 0xc0ded005,
> > @@ -53,7 +55,8 @@ struct iga64_template const iga64_code_media_block_write[] = {
> >  		0x80000001, 0x00010000, 0x30000000, 0x00000000,
> >  		0x80000901, 0x00010000, 0x00000000, 0x00000000,
> >  	}},
> > -	{ .gen_ver = 1250, .size = 56, .code = (const uint32_t []) {
> > +	{ .gen_ver = 1250, .size = 60, .code = (const uint32_t []) {
> > +		0x80040061, 0x04054220, 0x00000000, 0x00000000,
> >  		0x80000061, 0x05054220, 0x00000000, 0xc0ded003,
> >  		0x80000061, 0x05254220, 0x00000000, 0xc0ded004,
> >  		0x80000061, 0x05454220, 0x00000000, 0xc0ded005,
> > @@ -69,7 +72,8 @@ struct iga64_template const iga64_code_media_block_write[] = {
> >  		0x80000001, 0x00010000, 0x30000000, 0x00000000,
> >  		0x80000901, 0x00010000, 0x00000000, 0x00000000,
> >  	}},
> > -	{ .gen_ver = 0, .size = 52, .code = (const uint32_t []) {
> > +	{ .gen_ver = 0, .size = 56, .code = (const uint32_t []) {
> > +		0x80040061, 0x04054220, 0x00000000, 0x00000000,
> >  		0x80000061, 0x05054220, 0x00000000, 0xc0ded003,
> >  		0x80000061, 0x05254220, 0x00000000, 0xc0ded004,
> >  		0x80000061, 0x05454220, 0x00000000, 0xc0ded005,
> > diff --git a/lib/iga64_macros.h b/lib/iga64_macros.h
> > index f4ef5cb16..03cc726d4 100644
> > --- a/lib/iga64_macros.h
> > +++ b/lib/iga64_macros.h
> > @@ -7,7 +7,7 @@
> >  #define IGA64_MACROS_H
> >  
> >  /* send instruction for DG2+ requires 0 length in case src1 is null, BSpec: 47443 */
> > -#if GEN_VER < 1271
> > +#if GEN_VER <= 1250
> >  #define src1_null null
> >  #else
> >  #define src1_null null:0
> > -- 
> > 2.34.1
> > 


      reply	other threads:[~2024-08-21  7:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14 13:04 [PATCH i-g-t v2] lib/gpgpu_shader: Fix compilation warning and write dword shader Dominik Grzegorzek
2024-08-14 16:41 ` ✓ CI.xeBAT: success for lib/gpgpu_shader: Fix compilation warning and write dword shader (rev2) Patchwork
2024-08-14 16:51 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-14 22:09 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-15 20:31 ` ✓ Fi.CI.IGT: success " Patchwork
2024-08-19 17:51 ` [PATCH i-g-t v2] lib/gpgpu_shader: Fix compilation warning and write dword shader Kamil Konieczny
2024-08-21  7:03   ` Grzegorzek, Dominik [this message]

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=d36dc4076906e156bae9d2cdc58357baaa6854de.camel@intel.com \
    --to=dominik.grzegorzek@intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.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