Re: [Mesa-dev] [PATCH] intel/aubinator: Use the correct length for MEDIA commands

2016-11-28 Thread Jason Ekstrand
On Tue, Nov 22, 2016 at 1:53 AM, Lionel Landwerlin <
lionel.g.landwer...@intel.com> wrote:

> On 22/11/16 02:58, Jason Ekstrand wrote:
>
>> ---
>>   src/intel/tools/decoder.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/intel/tools/decoder.c b/src/intel/tools/decoder.c
>> index 6bd02bf..55488eb 100644
>> --- a/src/intel/tools/decoder.c
>> +++ b/src/intel/tools/decoder.c
>> @@ -612,8 +612,8 @@ gen_group_get_length(struct gen_group *group, const
>> uint32_t *p)
>>return field(h, 0, 7) + 2;
>> case 1:
>>return 1;
>> -  case 2:
>> - return 2;
>> +  case 2: /* MEDIA */
>> + return field(h, 0, 7) + 2;
>>
>
> The documentation seems to indicate 0..15 as bits for DWord Length.
> Am I missing something?
>

*most* of them use 0..15.  However the GPGPU_WALKER command only uses
0..7.  Since I didn't figure we'd have a lot of commands larger than 255
dwords, I figured just reading 0..7 would be ok.  We could always lookup
the "DWord Length" field by name or just special-case GPGPU_WALKER

--Jason


>
> case 3:
>>return field(h, 0, 7) + 2;
>> }
>>
>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel/aubinator: Use the correct length for MEDIA commands

2016-11-22 Thread Michael Schellenberger Costa
Hi Jason,

this would be the same as case 3. Is that intentional and if so would you 
combine the cases?
--Michael

-Ursprüngliche Nachricht-
Von: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] Im Auftrag von 
Jason Ekstrand
Gesendet: Dienstag, 22. November 2016 03:59
An: mesa-dev@lists.freedesktop.org
Cc: Jason Ekstrand 
Betreff: [Mesa-dev] [PATCH] intel/aubinator: Use the correct length for MEDIA 
commands

---
 src/intel/tools/decoder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/tools/decoder.c b/src/intel/tools/decoder.c index 
6bd02bf..55488eb 100644
--- a/src/intel/tools/decoder.c
+++ b/src/intel/tools/decoder.c
@@ -612,8 +612,8 @@ gen_group_get_length(struct gen_group *group, const 
uint32_t *p)
  return field(h, 0, 7) + 2;
   case 1:
  return 1;
-  case 2:
- return 2;
+  case 2: /* MEDIA */
+ return field(h, 0, 7) + 2;
   case 3:
  return field(h, 0, 7) + 2;
   }
--
2.5.0.400.gff86faf

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel/aubinator: Use the correct length for MEDIA commands

2016-11-22 Thread Lionel Landwerlin

On 22/11/16 02:58, Jason Ekstrand wrote:

---
  src/intel/tools/decoder.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/tools/decoder.c b/src/intel/tools/decoder.c
index 6bd02bf..55488eb 100644
--- a/src/intel/tools/decoder.c
+++ b/src/intel/tools/decoder.c
@@ -612,8 +612,8 @@ gen_group_get_length(struct gen_group *group, const 
uint32_t *p)
   return field(h, 0, 7) + 2;
case 1:
   return 1;
-  case 2:
- return 2;
+  case 2: /* MEDIA */
+ return field(h, 0, 7) + 2;


The documentation seems to indicate 0..15 as bits for DWord Length.
Am I missing something?


case 3:
   return field(h, 0, 7) + 2;
}



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev