[igt-dev] [i-g-t V2 22/40] tests/kms_3d: Add XE support

Karthik B S karthik.b.s at intel.com
Tue Apr 25 09:23:01 UTC 2023


On 4/25/2023 12:19 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Karthik B S <karthik.b.s at intel.com>
> ---
>   tests/kms_3d.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/tests/kms_3d.c b/tests/kms_3d.c
> index c6bef67c1..437c8a481 100644
> --- a/tests/kms_3d.c
> +++ b/tests/kms_3d.c
> @@ -23,6 +23,7 @@
>    */
>   
>   #include "igt.h"
> +#include "xe/xe_query.h"
>   
>   IGT_TEST_DESCRIPTION("Tests 3D mode setting.");
>   
> @@ -36,6 +37,9 @@ igt_simple_main
>   
>   	drm_fd = drm_open_driver_master(DRIVER_ANY);
>   
> +	if (is_xe_device(drm_fd))
> +		xe_device_get(drm_fd);
> +
>   	res = drmModeGetResources(drm_fd);
>   	igt_require(res);
>   
> @@ -111,5 +115,9 @@ igt_simple_main
>   	kmstest_force_edid(drm_fd, connector, NULL);
>   
>   	drmModeFreeConnector(connector);
> +
> +	if (is_xe_device(drm_fd))
> +		xe_device_put(drm_fd);
> +
>   	close(drm_fd);
>   }


More information about the igt-dev mailing list