[igt-dev] [i-g-t,V2,39/40] tests/kms_setmode: Add XE support
Gupta, Nidhi1
nidhi1.gupta at intel.com
Tue Apr 25 09:22:45 UTC 2023
Looks good to me.
Reviewed-by: Nidhi Gupta <nidhi1.gupta at intel.com>
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>
> ---
> tests/kms_setmode.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
> index bfa108916..a611d9382 100644
> --- a/tests/kms_setmode.c
> +++ b/tests/kms_setmode.c
> @@ -30,6 +30,7 @@
> #include <string.h>
> #include <sys/time.h>
> #include <math.h>
> +#include "xe/xe_query.h"
>
> #define MAX_CONNECTORS 10
> #define MAX_CRTCS 6
> @@ -954,6 +955,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
>
> drm_resources = drmModeGetResources(drm_fd);
> igt_require(drm_resources);
> +
> + if (is_xe_device(drm_fd))
> + xe_device_get(drm_fd);
> }
>
> for (i = 0; i < ARRAY_SIZE(tests); i++) {
> @@ -971,6 +975,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
> igt_fixture {
> drmModeFreeResources(drm_resources);
>
> + if (is_xe_device(drm_fd))
> + xe_device_put(drm_fd);
> +
> close(drm_fd);
> }
> }
--
~Nidhi Gupta
More information about the igt-dev
mailing list