Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2019-02-05 Thread Rodrigo Vivi
Hi all,

restarting a very old thread since Dmitry is interested in tackle
the issue that we have to propagate and keep all IDs in sync across
the stack.

He has few ideas of i915 ioctls in a way that it wouldn't necessarily
tie build dependencies etc..

Since I believe this place is the best one to discuss ideas like that
let me invite him for the discussion in a way he can explain his
ideas here.

Also cc'ing some relevant mailing lists.

Thanks,
Rodrigo.

On Wed, Dec 20, 2017 at 12:06:24PM -0800, De Marchi, Lucas wrote:
> On Tue, 2017-12-19 at 15:28 -0800, Rodrigo Vivi wrote:
> > On Tue, Dec 19, 2017 at 10:07:30PM +, Chris Wilson wrote:
> > > Quoting Rodrigo Vivi (2017-12-19 21:59:43)
> > > > On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> > > > > This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> > > > > drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS
> > > > > that
> > > > > was missing there[1].
> > > > 
> > > > Since this tip name is not easily found maybe it would be good to
> > > > mention latest kernel commit that touched this file.
> > > > 
> > > > > The goal is to keep track of the PCI IDs in a
> > > > > single place (kernel).
> > > > 
> > > > good idea.
> > > > 
> > > > > 
> > > > > Right now a simple copy is done to catch up with latest changes there,
> > > > > although in future it could be more sofisticated pointing the build
> > > > > system to the external header.
> > > > 
> > > > Yeap, a real single place would be awesome.
> > > 
> > > Whilst maintaining independence of the igt build itself?
> > 
> > yeap... nevermind...
> > I was just in another discussion about detection of cnl on vaapi driver
> > and I realized that the userspace individual detection has its advantages...
> 
> I get the benefit of not tying i-g-t to particular kernel versions, but we may
> need to think in a way to alleviate the tedious work of updating the IDs
> across the projects.
> 
> Some alternatives:
> 
> 1) Move header to e.g. include/external/i915_pciids.h and add a
> scripts/i915-update-ids that receives the kernel directory as argument.  The
> script does whateve is needed to update the header, which may or may not
> include adding a verbiage on top of the header
> 
>   /* This header is automatically generated, do not edit it */
> 
> 2) Just create a policy that changes to this header needs to actually be a
> copy from the kernel header with the commit hash in the commit message
> 
> 3) A mix or partial implementation of (1) and (2).
> 
> What do you think?
> 
> Lucas De Marchi
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-20 Thread Rodrigo Vivi
On Wed, Dec 20, 2017 at 11:21:28PM +, Rodrigo Vivi wrote:
> On Wed, Dec 20, 2017 at 08:55:24PM +, Lucas De Marchi wrote:
> > Synchronize with kernel header as of
> > c99d7832dcd7 ("drm/i915/cfl: Adding more Coffee Lake PCI IDs.")
> > 
> > Signed-off-by: Lucas De Marchi 
> 
> Reviewed-by: Rodrigo Vivi 

And pushed... thanks for the patch!

> 
> 
> > ---
> >  lib/i915_pciids.h | 28 ++--
> >  1 file changed, 22 insertions(+), 6 deletions(-)
> > 
> > diff --git a/lib/i915_pciids.h b/lib/i915_pciids.h
> > index c65e4489..5db0458d 100644
> > --- a/lib/i915_pciids.h
> > +++ b/lib/i915_pciids.h
> > @@ -373,29 +373,45 @@
> >  /* CFL S */
> >  #define INTEL_CFL_S_GT1_IDS(info) \
> > INTEL_VGA_DEVICE(0x3E90, info), /* SRV GT1 */ \
> > -   INTEL_VGA_DEVICE(0x3E93, info)  /* SRV GT1 */
> > +   INTEL_VGA_DEVICE(0x3E93, info), /* SRV GT1 */ \
> > +   INTEL_VGA_DEVICE(0x3E99, info)  /* SRV GT1 */
> >  
> >  #define INTEL_CFL_S_GT2_IDS(info) \
> > INTEL_VGA_DEVICE(0x3E91, info), /* SRV GT2 */ \
> > INTEL_VGA_DEVICE(0x3E92, info), /* SRV GT2 */ \
> > -   INTEL_VGA_DEVICE(0x3E96, info)  /* SRV GT2 */
> > +   INTEL_VGA_DEVICE(0x3E96, info), /* SRV GT2 */ \
> > +   INTEL_VGA_DEVICE(0x3E9A, info)  /* SRV GT2 */
> >  
> >  /* CFL H */
> >  #define INTEL_CFL_H_GT2_IDS(info) \
> > INTEL_VGA_DEVICE(0x3E9B, info), /* Halo GT2 */ \
> > INTEL_VGA_DEVICE(0x3E94, info)  /* Halo GT2 */
> >  
> > -/* CFL U */
> > +/* CFL U GT1 */
> > +#define INTEL_CFL_U_GT1_IDS(info) \
> > +   INTEL_VGA_DEVICE(0x3EA1, info), \
> > +   INTEL_VGA_DEVICE(0x3EA4, info)
> > +
> > +/* CFL U GT2 */
> > +#define INTEL_CFL_U_GT2_IDS(info) \
> > +   INTEL_VGA_DEVICE(0x3EA0, info), \
> > +   INTEL_VGA_DEVICE(0x3EA3, info), \
> > +   INTEL_VGA_DEVICE(0x3EA9, info)
> > +
> > +/* CFL U GT3 */
> >  #define INTEL_CFL_U_GT3_IDS(info) \
> > +   INTEL_VGA_DEVICE(0x3EA2, info), /* ULT GT3 */ \
> > +   INTEL_VGA_DEVICE(0x3EA5, info), /* ULT GT3 */ \
> > INTEL_VGA_DEVICE(0x3EA6, info), /* ULT GT3 */ \
> > INTEL_VGA_DEVICE(0x3EA7, info), /* ULT GT3 */ \
> > -   INTEL_VGA_DEVICE(0x3EA8, info), /* ULT GT3 */ \
> > -   INTEL_VGA_DEVICE(0x3EA5, info)  /* ULT GT3 */
> > +   INTEL_VGA_DEVICE(0x3EA8, info)  /* ULT GT3 */
> >  
> > -#define INTEL_CFL_IDS(info) \
> > +#define INTEL_CFL_IDS(info)   \
> > INTEL_CFL_S_GT1_IDS(info), \
> > INTEL_CFL_S_GT2_IDS(info), \
> > INTEL_CFL_H_GT2_IDS(info), \
> > +   INTEL_CFL_U_GT1_IDS(info), \
> > +   INTEL_CFL_U_GT2_IDS(info), \
> > INTEL_CFL_U_GT3_IDS(info)
> >  
> >  /* CNL U 2+2 */
> > -- 
> > 2.14.3
> > 
> > ___
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-20 Thread Rodrigo Vivi
On Wed, Dec 20, 2017 at 08:55:24PM +, Lucas De Marchi wrote:
> Synchronize with kernel header as of
> c99d7832dcd7 ("drm/i915/cfl: Adding more Coffee Lake PCI IDs.")
> 
> Signed-off-by: Lucas De Marchi 

Reviewed-by: Rodrigo Vivi 


> ---
>  lib/i915_pciids.h | 28 ++--
>  1 file changed, 22 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/i915_pciids.h b/lib/i915_pciids.h
> index c65e4489..5db0458d 100644
> --- a/lib/i915_pciids.h
> +++ b/lib/i915_pciids.h
> @@ -373,29 +373,45 @@
>  /* CFL S */
>  #define INTEL_CFL_S_GT1_IDS(info) \
>   INTEL_VGA_DEVICE(0x3E90, info), /* SRV GT1 */ \
> - INTEL_VGA_DEVICE(0x3E93, info)  /* SRV GT1 */
> + INTEL_VGA_DEVICE(0x3E93, info), /* SRV GT1 */ \
> + INTEL_VGA_DEVICE(0x3E99, info)  /* SRV GT1 */
>  
>  #define INTEL_CFL_S_GT2_IDS(info) \
>   INTEL_VGA_DEVICE(0x3E91, info), /* SRV GT2 */ \
>   INTEL_VGA_DEVICE(0x3E92, info), /* SRV GT2 */ \
> - INTEL_VGA_DEVICE(0x3E96, info)  /* SRV GT2 */
> + INTEL_VGA_DEVICE(0x3E96, info), /* SRV GT2 */ \
> + INTEL_VGA_DEVICE(0x3E9A, info)  /* SRV GT2 */
>  
>  /* CFL H */
>  #define INTEL_CFL_H_GT2_IDS(info) \
>   INTEL_VGA_DEVICE(0x3E9B, info), /* Halo GT2 */ \
>   INTEL_VGA_DEVICE(0x3E94, info)  /* Halo GT2 */
>  
> -/* CFL U */
> +/* CFL U GT1 */
> +#define INTEL_CFL_U_GT1_IDS(info) \
> + INTEL_VGA_DEVICE(0x3EA1, info), \
> + INTEL_VGA_DEVICE(0x3EA4, info)
> +
> +/* CFL U GT2 */
> +#define INTEL_CFL_U_GT2_IDS(info) \
> + INTEL_VGA_DEVICE(0x3EA0, info), \
> + INTEL_VGA_DEVICE(0x3EA3, info), \
> + INTEL_VGA_DEVICE(0x3EA9, info)
> +
> +/* CFL U GT3 */
>  #define INTEL_CFL_U_GT3_IDS(info) \
> + INTEL_VGA_DEVICE(0x3EA2, info), /* ULT GT3 */ \
> + INTEL_VGA_DEVICE(0x3EA5, info), /* ULT GT3 */ \
>   INTEL_VGA_DEVICE(0x3EA6, info), /* ULT GT3 */ \
>   INTEL_VGA_DEVICE(0x3EA7, info), /* ULT GT3 */ \
> - INTEL_VGA_DEVICE(0x3EA8, info), /* ULT GT3 */ \
> - INTEL_VGA_DEVICE(0x3EA5, info)  /* ULT GT3 */
> + INTEL_VGA_DEVICE(0x3EA8, info)  /* ULT GT3 */
>  
> -#define INTEL_CFL_IDS(info) \
> +#define INTEL_CFL_IDS(info) \
>   INTEL_CFL_S_GT1_IDS(info), \
>   INTEL_CFL_S_GT2_IDS(info), \
>   INTEL_CFL_H_GT2_IDS(info), \
> + INTEL_CFL_U_GT1_IDS(info), \
> + INTEL_CFL_U_GT2_IDS(info), \
>   INTEL_CFL_U_GT3_IDS(info)
>  
>  /* CNL U 2+2 */
> -- 
> 2.14.3
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-20 Thread Rodrigo Vivi
On Wed, Dec 20, 2017 at 08:06:24PM +, De Marchi, Lucas wrote:
> On Tue, 2017-12-19 at 15:28 -0800, Rodrigo Vivi wrote:
> > On Tue, Dec 19, 2017 at 10:07:30PM +, Chris Wilson wrote:
> > > Quoting Rodrigo Vivi (2017-12-19 21:59:43)
> > > > On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> > > > > This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> > > > > drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS
> > > > > that
> > > > > was missing there[1].
> > > > 
> > > > Since this tip name is not easily found maybe it would be good to
> > > > mention latest kernel commit that touched this file.
> > > > 
> > > > > The goal is to keep track of the PCI IDs in a
> > > > > single place (kernel).
> > > > 
> > > > good idea.
> > > > 
> > > > > 
> > > > > Right now a simple copy is done to catch up with latest changes there,
> > > > > although in future it could be more sofisticated pointing the build
> > > > > system to the external header.
> > > > 
> > > > Yeap, a real single place would be awesome.
> > > 
> > > Whilst maintaining independence of the igt build itself?
> > 
> > yeap... nevermind...
> > I was just in another discussion about detection of cnl on vaapi driver
> > and I realized that the userspace individual detection has its advantages...
> 
> I get the benefit of not tying i-g-t to particular kernel versions, but we may
> need to think in a way to alleviate the tedious work of updating the IDs
> across the projects.
> 
> Some alternatives:
> 
> 1) Move header to e.g. include/external/i915_pciids.h and add a
> scripts/i915-update-ids that receives the kernel directory as argument.  The
> script does whateve is needed to update the header, which may or may not
> include adding a verbiage on top of the header
> 
>   /* This header is automatically generated, do not edit it */
>

+1.

An igt/tools/ that could use some sort of curl 
https://cgit.freedesktop.org/drm-tip/tree/include/drm/i915_pciids.h
and generate the igt out of it. possibly the libdrm as well?

or maybe a git instead the curl so we could get the last commit id touching 
this file
and add to the new auto-generated commit as reference.

> 2) Just create a policy that changes to this header needs to actually be a
> copy from the kernel header with the commit hash in the commit message
> 
> 3) A mix or partial implementation of (1) and (2).
> 
> What do you think?
> 
> Lucas De Marchi
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-20 Thread Lucas De Marchi
Synchronize with kernel header as of
c99d7832dcd7 ("drm/i915/cfl: Adding more Coffee Lake PCI IDs.")

Signed-off-by: Lucas De Marchi 
---
 lib/i915_pciids.h | 28 ++--
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/lib/i915_pciids.h b/lib/i915_pciids.h
index c65e4489..5db0458d 100644
--- a/lib/i915_pciids.h
+++ b/lib/i915_pciids.h
@@ -373,29 +373,45 @@
 /* CFL S */
 #define INTEL_CFL_S_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x3E90, info), /* SRV GT1 */ \
-   INTEL_VGA_DEVICE(0x3E93, info)  /* SRV GT1 */
+   INTEL_VGA_DEVICE(0x3E93, info), /* SRV GT1 */ \
+   INTEL_VGA_DEVICE(0x3E99, info)  /* SRV GT1 */
 
 #define INTEL_CFL_S_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x3E91, info), /* SRV GT2 */ \
INTEL_VGA_DEVICE(0x3E92, info), /* SRV GT2 */ \
-   INTEL_VGA_DEVICE(0x3E96, info)  /* SRV GT2 */
+   INTEL_VGA_DEVICE(0x3E96, info), /* SRV GT2 */ \
+   INTEL_VGA_DEVICE(0x3E9A, info)  /* SRV GT2 */
 
 /* CFL H */
 #define INTEL_CFL_H_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x3E9B, info), /* Halo GT2 */ \
INTEL_VGA_DEVICE(0x3E94, info)  /* Halo GT2 */
 
-/* CFL U */
+/* CFL U GT1 */
+#define INTEL_CFL_U_GT1_IDS(info) \
+   INTEL_VGA_DEVICE(0x3EA1, info), \
+   INTEL_VGA_DEVICE(0x3EA4, info)
+
+/* CFL U GT2 */
+#define INTEL_CFL_U_GT2_IDS(info) \
+   INTEL_VGA_DEVICE(0x3EA0, info), \
+   INTEL_VGA_DEVICE(0x3EA3, info), \
+   INTEL_VGA_DEVICE(0x3EA9, info)
+
+/* CFL U GT3 */
 #define INTEL_CFL_U_GT3_IDS(info) \
+   INTEL_VGA_DEVICE(0x3EA2, info), /* ULT GT3 */ \
+   INTEL_VGA_DEVICE(0x3EA5, info), /* ULT GT3 */ \
INTEL_VGA_DEVICE(0x3EA6, info), /* ULT GT3 */ \
INTEL_VGA_DEVICE(0x3EA7, info), /* ULT GT3 */ \
-   INTEL_VGA_DEVICE(0x3EA8, info), /* ULT GT3 */ \
-   INTEL_VGA_DEVICE(0x3EA5, info)  /* ULT GT3 */
+   INTEL_VGA_DEVICE(0x3EA8, info)  /* ULT GT3 */
 
-#define INTEL_CFL_IDS(info) \
+#define INTEL_CFL_IDS(info)   \
INTEL_CFL_S_GT1_IDS(info), \
INTEL_CFL_S_GT2_IDS(info), \
INTEL_CFL_H_GT2_IDS(info), \
+   INTEL_CFL_U_GT1_IDS(info), \
+   INTEL_CFL_U_GT2_IDS(info), \
INTEL_CFL_U_GT3_IDS(info)
 
 /* CNL U 2+2 */
-- 
2.14.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-20 Thread De Marchi, Lucas
On Tue, 2017-12-19 at 13:59 -0800, Rodrigo Vivi wrote:
> On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> > This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> > drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS that
> > was missing there[1].
> 
> Since this tip name is not easily found maybe it would be good to
> mention latest kernel commit that touched this file.

At the time I sent this the additional kernel patch with CFL IDs were not
applied yet. I was already expecting to have to change this message, but I
forgot to tell here. I will send a v2.

thanks

Lucas De Marchi
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-20 Thread Chris Wilson
Quoting De Marchi, Lucas (2017-12-20 20:06:24)
> On Tue, 2017-12-19 at 15:28 -0800, Rodrigo Vivi wrote:
> > On Tue, Dec 19, 2017 at 10:07:30PM +, Chris Wilson wrote:
> > > Quoting Rodrigo Vivi (2017-12-19 21:59:43)
> > > > On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> > > > > This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> > > > > drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS
> > > > > that
> > > > > was missing there[1].
> > > > 
> > > > Since this tip name is not easily found maybe it would be good to
> > > > mention latest kernel commit that touched this file.
> > > > 
> > > > > The goal is to keep track of the PCI IDs in a
> > > > > single place (kernel).
> > > > 
> > > > good idea.
> > > > 
> > > > > 
> > > > > Right now a simple copy is done to catch up with latest changes there,
> > > > > although in future it could be more sofisticated pointing the build
> > > > > system to the external header.
> > > > 
> > > > Yeap, a real single place would be awesome.
> > > 
> > > Whilst maintaining independence of the igt build itself?
> > 
> > yeap... nevermind...
> > I was just in another discussion about detection of cnl on vaapi driver
> > and I realized that the userspace individual detection has its advantages...
> 
> I get the benefit of not tying i-g-t to particular kernel versions, but we may
> need to think in a way to alleviate the tedious work of updating the IDs
> across the projects.

We did that, it's called i915_pciids.h. We said we would put all the ids
into a single header in a format that both userspace and the kernel
could digest, then copy it wherever required. It's just a cp; git
commit. The difficult part is then tying the pci-id to the internal db
of the project, and our proposal to share that was shot down.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-20 Thread De Marchi, Lucas
On Tue, 2017-12-19 at 15:28 -0800, Rodrigo Vivi wrote:
> On Tue, Dec 19, 2017 at 10:07:30PM +, Chris Wilson wrote:
> > Quoting Rodrigo Vivi (2017-12-19 21:59:43)
> > > On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> > > > This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> > > > drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS
> > > > that
> > > > was missing there[1].
> > > 
> > > Since this tip name is not easily found maybe it would be good to
> > > mention latest kernel commit that touched this file.
> > > 
> > > > The goal is to keep track of the PCI IDs in a
> > > > single place (kernel).
> > > 
> > > good idea.
> > > 
> > > > 
> > > > Right now a simple copy is done to catch up with latest changes there,
> > > > although in future it could be more sofisticated pointing the build
> > > > system to the external header.
> > > 
> > > Yeap, a real single place would be awesome.
> > 
> > Whilst maintaining independence of the igt build itself?
> 
> yeap... nevermind...
> I was just in another discussion about detection of cnl on vaapi driver
> and I realized that the userspace individual detection has its advantages...

I get the benefit of not tying i-g-t to particular kernel versions, but we may
need to think in a way to alleviate the tedious work of updating the IDs
across the projects.

Some alternatives:

1) Move header to e.g. include/external/i915_pciids.h and add a
scripts/i915-update-ids that receives the kernel directory as argument.  The
script does whateve is needed to update the header, which may or may not
include adding a verbiage on top of the header

/* This header is automatically generated, do not edit it */

2) Just create a policy that changes to this header needs to actually be a
copy from the kernel header with the commit hash in the commit message

3) A mix or partial implementation of (1) and (2).

What do you think?

Lucas De Marchi
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-19 Thread Rodrigo Vivi
On Tue, Dec 19, 2017 at 10:07:30PM +, Chris Wilson wrote:
> Quoting Rodrigo Vivi (2017-12-19 21:59:43)
> > On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> > > This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> > > drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS that
> > > was missing there[1].
> > 
> > Since this tip name is not easily found maybe it would be good to
> > mention latest kernel commit that touched this file.
> > 
> > > The goal is to keep track of the PCI IDs in a
> > > single place (kernel).
> > 
> > good idea.
> > 
> > > 
> > > Right now a simple copy is done to catch up with latest changes there,
> > > although in future it could be more sofisticated pointing the build
> > > system to the external header.
> > 
> > Yeap, a real single place would be awesome.
> 
> Whilst maintaining independence of the igt build itself?

yeap... nevermind...
I was just in another discussion about detection of cnl on vaapi driver
and I realized that the userspace individual detection has its advantages...

> -Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-19 Thread Chris Wilson
Quoting Rodrigo Vivi (2017-12-19 21:59:43)
> On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> > This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> > drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS that
> > was missing there[1].
> 
> Since this tip name is not easily found maybe it would be good to
> mention latest kernel commit that touched this file.
> 
> > The goal is to keep track of the PCI IDs in a
> > single place (kernel).
> 
> good idea.
> 
> > 
> > Right now a simple copy is done to catch up with latest changes there,
> > although in future it could be more sofisticated pointing the build
> > system to the external header.
> 
> Yeap, a real single place would be awesome.

Whilst maintaining independence of the igt build itself?
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-19 Thread Rodrigo Vivi
On Fri, Dec 08, 2017 at 10:06:46PM +, Lucas De Marchi wrote:
> This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS that
> was missing there[1].

Since this tip name is not easily found maybe it would be good to
mention latest kernel commit that touched this file.

> The goal is to keep track of the PCI IDs in a
> single place (kernel).

good idea.

> 
> Right now a simple copy is done to catch up with latest changes there,
> although in future it could be more sofisticated pointing the build
> system to the external header.

Yeap, a real single place would be awesome.

> 
> [1] https://patchwork.freedesktop.org/patch/192410/
> 
> Cc: Paulo Zanoni 
> Signed-off-by: Lucas De Marchi 

For the content itself: (with or without modification on commit message)

Reviewed-by: Rodrigo Vivi 

> ---
>  lib/i915_pciids.h | 178 
> ++
>  1 file changed, 111 insertions(+), 67 deletions(-)
> 
> diff --git a/lib/i915_pciids.h b/lib/i915_pciids.h
> index 8d6c7270..c65e4489 100644
> --- a/lib/i915_pciids.h
> +++ b/lib/i915_pciids.h
> @@ -118,92 +118,125 @@
>  #define INTEL_IRONLAKE_M_IDS(info) \
>   INTEL_VGA_DEVICE(0x0046, info)
>  
> -#define INTEL_SNB_D_IDS(info) \
> +#define INTEL_SNB_D_GT1_IDS(info) \
>   INTEL_VGA_DEVICE(0x0102, info), \
> - INTEL_VGA_DEVICE(0x0112, info), \
> - INTEL_VGA_DEVICE(0x0122, info), \
>   INTEL_VGA_DEVICE(0x010A, info)
>  
> -#define INTEL_SNB_M_IDS(info) \
> - INTEL_VGA_DEVICE(0x0106, info), \
> +#define INTEL_SNB_D_GT2_IDS(info) \
> + INTEL_VGA_DEVICE(0x0112, info), \
> + INTEL_VGA_DEVICE(0x0122, info)
> +
> +#define INTEL_SNB_D_IDS(info) \
> + INTEL_SNB_D_GT1_IDS(info), \
> + INTEL_SNB_D_GT2_IDS(info)
> +
> +#define INTEL_SNB_M_GT1_IDS(info) \
> + INTEL_VGA_DEVICE(0x0106, info)
> +
> +#define INTEL_SNB_M_GT2_IDS(info) \
>   INTEL_VGA_DEVICE(0x0116, info), \
>   INTEL_VGA_DEVICE(0x0126, info)
>  
> +#define INTEL_SNB_M_IDS(info) \
> + INTEL_SNB_M_GT1_IDS(info), \
> + INTEL_SNB_M_GT2_IDS(info)
> +
> +#define INTEL_IVB_M_GT1_IDS(info) \
> + INTEL_VGA_DEVICE(0x0156, info) /* GT1 mobile */
> +
> +#define INTEL_IVB_M_GT2_IDS(info) \
> + INTEL_VGA_DEVICE(0x0166, info) /* GT2 mobile */
> +
>  #define INTEL_IVB_M_IDS(info) \
> - INTEL_VGA_DEVICE(0x0156, info), /* GT1 mobile */ \
> - INTEL_VGA_DEVICE(0x0166, info)  /* GT2 mobile */
> + INTEL_IVB_M_GT1_IDS(info), \
> + INTEL_IVB_M_GT2_IDS(info)
>  
> -#define INTEL_IVB_D_IDS(info) \
> +#define INTEL_IVB_D_GT1_IDS(info) \
>   INTEL_VGA_DEVICE(0x0152, info), /* GT1 desktop */ \
> + INTEL_VGA_DEVICE(0x015a, info)  /* GT1 server */
> +
> +#define INTEL_IVB_D_GT2_IDS(info) \
>   INTEL_VGA_DEVICE(0x0162, info), /* GT2 desktop */ \
> - INTEL_VGA_DEVICE(0x015a, info), /* GT1 server */ \
>   INTEL_VGA_DEVICE(0x016a, info)  /* GT2 server */
>  
> +#define INTEL_IVB_D_IDS(info) \
> + INTEL_IVB_D_GT1_IDS(info), \
> + INTEL_IVB_D_GT2_IDS(info)
> +
>  #define INTEL_IVB_Q_IDS(info) \
>   INTEL_QUANTA_VGA_DEVICE(info) /* Quanta transcode */
>  
> -#define INTEL_HSW_IDS(info) \
> +#define INTEL_HSW_GT1_IDS(info) \
>   INTEL_VGA_DEVICE(0x0402, info), /* GT1 desktop */ \
> - INTEL_VGA_DEVICE(0x0412, info), /* GT2 desktop */ \
> - INTEL_VGA_DEVICE(0x0422, info), /* GT3 desktop */ \
>   INTEL_VGA_DEVICE(0x040a, info), /* GT1 server */ \
> - INTEL_VGA_DEVICE(0x041a, info), /* GT2 server */ \
> - INTEL_VGA_DEVICE(0x042a, info), /* GT3 server */ \
>   INTEL_VGA_DEVICE(0x040B, info), /* GT1 reserved */ \
> - INTEL_VGA_DEVICE(0x041B, info), /* GT2 reserved */ \
> - INTEL_VGA_DEVICE(0x042B, info), /* GT3 reserved */ \
>   INTEL_VGA_DEVICE(0x040E, info), /* GT1 reserved */ \
> - INTEL_VGA_DEVICE(0x041E, info), /* GT2 reserved */ \
> - INTEL_VGA_DEVICE(0x042E, info), /* GT3 reserved */ \
>   INTEL_VGA_DEVICE(0x0C02, info), /* SDV GT1 desktop */ \
> - INTEL_VGA_DEVICE(0x0C12, info), /* SDV GT2 desktop */ \
> - INTEL_VGA_DEVICE(0x0C22, info), /* SDV GT3 desktop */ \
>   INTEL_VGA_DEVICE(0x0C0A, info), /* SDV GT1 server */ \
> - INTEL_VGA_DEVICE(0x0C1A, info), /* SDV GT2 server */ \
> - INTEL_VGA_DEVICE(0x0C2A, info), /* SDV GT3 server */ \
>   INTEL_VGA_DEVICE(0x0C0B, info), /* SDV GT1 reserved */ \
> - INTEL_VGA_DEVICE(0x0C1B, info), /* SDV GT2 reserved */ \
> - INTEL_VGA_DEVICE(0x0C2B, info), /* SDV GT3 reserved */ \
>   INTEL_VGA_DEVICE(0x0C0E, info), /* SDV GT1 reserved */ \
> - INTEL_VGA_DEVICE(0x0C1E, info), /* SDV GT2 reserved */ \
> - INTEL_VGA_DEVICE(0x0C2E, info), /* SDV GT3 reserved */ \
>   INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \
> - INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \
> - INTEL_VGA_DEVICE(0x0A22, 

Re: [Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-13 Thread Arkadiusz Hiler
On Fri, Dec 08, 2017 at 02:06:46PM -0800, Lucas De Marchi wrote:
> This copies include/drm/i915_pciids.h from kernel as of drm-tip:
> drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS that
> was missing there[1]. The goal is to keep track of the PCI IDs in a
> single place (kernel).
> 
> Right now a simple copy is done to catch up with latest changes there,
> although in future it could be more sofisticated pointing the build
> system to the external header.
> 
> [1] https://patchwork.freedesktop.org/patch/192410/
> 
> Cc: Paulo Zanoni 
> Signed-off-by: Lucas De Marchi 

---
% (cd igt ; git pw apply 35121)
% diff -u linux/include/drm/i915_pciids.h igt/lib/i915_pciids.h
--- linux/include/drm/i915_pciids.h 2017-11-21 13:24:48.921774670 +0200
+++ igt/lib/i915_pciids.h   2017-12-12 15:33:02.915711190 +0200
@@ -392,6 +392,12 @@
INTEL_VGA_DEVICE(0x3EA8, info), /* ULT GT3 */ \
INTEL_VGA_DEVICE(0x3EA5, info)  /* ULT GT3 */

+#define INTEL_CFL_IDS(info) \
+   INTEL_CFL_S_GT1_IDS(info), \
+   INTEL_CFL_S_GT2_IDS(info), \
+   INTEL_CFL_H_GT2_IDS(info), \
+   INTEL_CFL_U_GT3_IDS(info)
+
 /* CNL U 2+2 */
 #define INTEL_CNL_U_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x5A52, info), \
---

looks good

Reviewed-by: Arkadiusz Hiler 
and merged, thanks!
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t] lib/i915_pciids.h: synchronize with kernel header

2017-12-08 Thread Lucas De Marchi
This copies include/drm/i915_pciids.h from kernel as of drm-tip:
drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS that
was missing there[1]. The goal is to keep track of the PCI IDs in a
single place (kernel).

Right now a simple copy is done to catch up with latest changes there,
although in future it could be more sofisticated pointing the build
system to the external header.

[1] https://patchwork.freedesktop.org/patch/192410/

Cc: Paulo Zanoni 
Signed-off-by: Lucas De Marchi 
---
 lib/i915_pciids.h | 178 ++
 1 file changed, 111 insertions(+), 67 deletions(-)

diff --git a/lib/i915_pciids.h b/lib/i915_pciids.h
index 8d6c7270..c65e4489 100644
--- a/lib/i915_pciids.h
+++ b/lib/i915_pciids.h
@@ -118,92 +118,125 @@
 #define INTEL_IRONLAKE_M_IDS(info) \
INTEL_VGA_DEVICE(0x0046, info)
 
-#define INTEL_SNB_D_IDS(info) \
+#define INTEL_SNB_D_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0102, info), \
-   INTEL_VGA_DEVICE(0x0112, info), \
-   INTEL_VGA_DEVICE(0x0122, info), \
INTEL_VGA_DEVICE(0x010A, info)
 
-#define INTEL_SNB_M_IDS(info) \
-   INTEL_VGA_DEVICE(0x0106, info), \
+#define INTEL_SNB_D_GT2_IDS(info) \
+   INTEL_VGA_DEVICE(0x0112, info), \
+   INTEL_VGA_DEVICE(0x0122, info)
+
+#define INTEL_SNB_D_IDS(info) \
+   INTEL_SNB_D_GT1_IDS(info), \
+   INTEL_SNB_D_GT2_IDS(info)
+
+#define INTEL_SNB_M_GT1_IDS(info) \
+   INTEL_VGA_DEVICE(0x0106, info)
+
+#define INTEL_SNB_M_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x0116, info), \
INTEL_VGA_DEVICE(0x0126, info)
 
+#define INTEL_SNB_M_IDS(info) \
+   INTEL_SNB_M_GT1_IDS(info), \
+   INTEL_SNB_M_GT2_IDS(info)
+
+#define INTEL_IVB_M_GT1_IDS(info) \
+   INTEL_VGA_DEVICE(0x0156, info) /* GT1 mobile */
+
+#define INTEL_IVB_M_GT2_IDS(info) \
+   INTEL_VGA_DEVICE(0x0166, info) /* GT2 mobile */
+
 #define INTEL_IVB_M_IDS(info) \
-   INTEL_VGA_DEVICE(0x0156, info), /* GT1 mobile */ \
-   INTEL_VGA_DEVICE(0x0166, info)  /* GT2 mobile */
+   INTEL_IVB_M_GT1_IDS(info), \
+   INTEL_IVB_M_GT2_IDS(info)
 
-#define INTEL_IVB_D_IDS(info) \
+#define INTEL_IVB_D_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0152, info), /* GT1 desktop */ \
+   INTEL_VGA_DEVICE(0x015a, info)  /* GT1 server */
+
+#define INTEL_IVB_D_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x0162, info), /* GT2 desktop */ \
-   INTEL_VGA_DEVICE(0x015a, info), /* GT1 server */ \
INTEL_VGA_DEVICE(0x016a, info)  /* GT2 server */
 
+#define INTEL_IVB_D_IDS(info) \
+   INTEL_IVB_D_GT1_IDS(info), \
+   INTEL_IVB_D_GT2_IDS(info)
+
 #define INTEL_IVB_Q_IDS(info) \
INTEL_QUANTA_VGA_DEVICE(info) /* Quanta transcode */
 
-#define INTEL_HSW_IDS(info) \
+#define INTEL_HSW_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0402, info), /* GT1 desktop */ \
-   INTEL_VGA_DEVICE(0x0412, info), /* GT2 desktop */ \
-   INTEL_VGA_DEVICE(0x0422, info), /* GT3 desktop */ \
INTEL_VGA_DEVICE(0x040a, info), /* GT1 server */ \
-   INTEL_VGA_DEVICE(0x041a, info), /* GT2 server */ \
-   INTEL_VGA_DEVICE(0x042a, info), /* GT3 server */ \
INTEL_VGA_DEVICE(0x040B, info), /* GT1 reserved */ \
-   INTEL_VGA_DEVICE(0x041B, info), /* GT2 reserved */ \
-   INTEL_VGA_DEVICE(0x042B, info), /* GT3 reserved */ \
INTEL_VGA_DEVICE(0x040E, info), /* GT1 reserved */ \
-   INTEL_VGA_DEVICE(0x041E, info), /* GT2 reserved */ \
-   INTEL_VGA_DEVICE(0x042E, info), /* GT3 reserved */ \
INTEL_VGA_DEVICE(0x0C02, info), /* SDV GT1 desktop */ \
-   INTEL_VGA_DEVICE(0x0C12, info), /* SDV GT2 desktop */ \
-   INTEL_VGA_DEVICE(0x0C22, info), /* SDV GT3 desktop */ \
INTEL_VGA_DEVICE(0x0C0A, info), /* SDV GT1 server */ \
-   INTEL_VGA_DEVICE(0x0C1A, info), /* SDV GT2 server */ \
-   INTEL_VGA_DEVICE(0x0C2A, info), /* SDV GT3 server */ \
INTEL_VGA_DEVICE(0x0C0B, info), /* SDV GT1 reserved */ \
-   INTEL_VGA_DEVICE(0x0C1B, info), /* SDV GT2 reserved */ \
-   INTEL_VGA_DEVICE(0x0C2B, info), /* SDV GT3 reserved */ \
INTEL_VGA_DEVICE(0x0C0E, info), /* SDV GT1 reserved */ \
-   INTEL_VGA_DEVICE(0x0C1E, info), /* SDV GT2 reserved */ \
-   INTEL_VGA_DEVICE(0x0C2E, info), /* SDV GT3 reserved */ \
INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \
-   INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \
-   INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \
INTEL_VGA_DEVICE(0x0A0A, info), /* ULT GT1 server */ \
-   INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \
-   INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \
INTEL_VGA_DEVICE(0x0A0B, info), /* ULT GT1 reserved */ \
-   INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \
-   INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \
INTEL_VGA_DEVICE(0x0D02, info), /* CRW GT1 desktop */ \
-