[igt-dev] [PATCH i-g-t 1/3] test: i915_pm_rpm: init devid in setup_envirnoment

Dixit, Ashutosh ashutosh.dixit at intel.com
Thu Apr 21 23:26:22 UTC 2022


On Thu, 21 Apr 2022 10:02:43 -0700, Anshuman Gupta wrote:
>
> Refactor out devid initialization out of init_mode_set_data().
> Initialize it in setup_environment().

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

> Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
>  tests/i915/i915_pm_rpm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index 461730e8a..2cc89eef2 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -409,7 +409,6 @@ static void init_mode_set_data(struct mode_set_data *data)
>	}
>
>	igt_display_require(&data->display, drm_fd);
> -	data->devid = intel_get_drm_devid(drm_fd);
>	init_modeset_cached_params(&ms_data);
>  }
>
> @@ -797,6 +796,8 @@ static bool setup_environment(bool display_disabled)
>	debugfs = igt_debugfs_dir(drm_fd);
>	igt_require(debugfs != -1);
>
> +	ms_data.devid = intel_get_drm_devid(drm_fd);
> +
>	if (!display_disabled)
>		init_mode_set_data(&ms_data);
>
> --
> 2.26.2
>


More information about the igt-dev mailing list