[igt-dev] [PATCH i-g-t 2/6] RFC Added is_xe to check if xe device

Hogander, Jouni jouni.hogander at intel.com
Thu Jun 1 10:11:43 UTC 2023


Hello Kunal,

Please check my comment below.

On Thu, 2023-06-01 at 10:39 +0530, Kunal Joshi wrote:
> Added is_xe for test to have XE checks
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
> ---
>  tests/i915/kms_frontbuffer_tracking.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/tests/i915/kms_frontbuffer_tracking.c
> b/tests/i915/kms_frontbuffer_tracking.c
> index c2b99670..3bef46b6 100644
> --- a/tests/i915/kms_frontbuffer_tracking.c
> +++ b/tests/i915/kms_frontbuffer_tracking.c
> @@ -309,6 +309,8 @@ struct {
>         .stop = true,
>  };
>  
> +static bool is_xe;

Maybe you could just drop this and use is_xe_device() where you need to
differentiate?

> +
>  static drmModeModeInfo *get_connector_smallest_mode(igt_output_t
> *output)
>  {
>         drmModeConnector *c = output->config.connector;
> @@ -1341,6 +1343,12 @@ static void setup_drm(void)
>         drm.fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
>         drm.debugfs = igt_debugfs_dir(drm.fd);
>  
> +       /*
> +        * Test has XE checks as we don't have gem IOCTLS
> +        * on XE used in this test, for now ignore it if XE
> +        */
> +       is_xe = is_xe_device(drm.fd);
> +
>         kmstest_set_vt_graphics_mode();
>         igt_display_require(&drm.display, drm.fd);
>  



More information about the igt-dev mailing list