[igt-dev] [i-g-t 36/45] tests/kms_panel_fitting: Add XE support

Nautiyal, Ankit K ankit.k.nautiyal at intel.com
Fri Apr 21 10:17:31 UTC 2023


LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>

On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
>   tests/kms_panel_fitting.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index 2d0590da2..97ef1ae48 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -23,6 +23,7 @@
>    */
>   
>   #include "igt.h"
> +#include <limits.h>
>   #include <math.h>
>   #include <sys/stat.h>
>   
> @@ -133,7 +134,7 @@ test_panel_fitting_legacy(data_t *d, igt_display_t *display,
>   	igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d->fb2.height-200);
>   	igt_plane_set_position(d->plane2, 100, 100);
>   
> -	if (is_i915_device(display->drm_fd)) {
> +	if (is_intel_device(display->drm_fd)) {
>   		uint32_t devid = intel_get_drm_devid(display->drm_fd);
>   		/*
>   		 * Most of gen7 and all of gen8 doesn't support plane scaling
> @@ -233,10 +234,15 @@ static void test_panel_fitting(data_t *data, enum test_type type)
>   	struct stat sb;
>   
>   	if (type == TEST_ATOMIC) {
> -		igt_require_f(is_i915_device(display->drm_fd), "not valid for non-i915 devices\n");
> +		char path[PATH_MAX];
> +
> +		igt_require_f(is_intel_device(display->drm_fd), "not valid for non-intel devices\n");
>   
>   		/* Until this is force enabled, force modeset evasion. */
> -		if (stat("/sys/module/i915/parameters/fastboot", &sb) == 0)
> +		snprintf(path, PATH_MAX, "/sys/module/%s/parameters/fastboot",
> +					 is_i915_device(data->drm_fd) ? "i915" : "xe");
> +
> +		if (stat(path, &sb) == 0)
>   			igt_set_module_param_int(data->drm_fd, "fastboot", 1);
>   
>   		igt_require(intel_display_ver(intel_get_drm_devid(display->drm_fd)) >= 5);


More information about the igt-dev mailing list