[PATCH i-g-t 1/4] tests/intel/kms_joiner: refactor set_all_master_pipes_for_platform

B, Jeevan jeevan.b at intel.com
Tue Feb 18 07:51:44 UTC 2025


LGTM. 

Reviewed-by: Jeevan B <jeevan.b at intel.com>

> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Kunal
> Joshi
> Sent: Monday, February 17, 2025 12:13 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Joshi, Kunal1 <kunal1.joshi at intel.com>
> Subject: [PATCH i-g-t 1/4] tests/intel/kms_joiner: refactor
> set_all_master_pipes_for_platform
> 
> refactor set_all_master_pipes_for_platform for readable code movement.
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
> ---
>  tests/intel/kms_joiner.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/intel/kms_joiner.c b/tests/intel/kms_joiner.c index
> 062a0e49d..080e8ff52 100644
> --- a/tests/intel/kms_joiner.c
> +++ b/tests/intel/kms_joiner.c
> @@ -106,13 +106,13 @@ typedef struct {
> 
>  static int max_dotclock;
> 
> -static void set_all_master_pipes_for_platform(data_t *data)
> +static void set_all_master_pipes_for_platform(igt_display_t *display,
> +uint32_t *master_pipes)
>  {
>  	enum pipe pipe;
> 
>  	for (pipe = PIPE_A; pipe < IGT_MAX_PIPES - 1; pipe++) {
> -		if (data->display.pipes[pipe].enabled && data-
> >display.pipes[pipe + 1].enabled) {
> -			data->master_pipes |= BIT(pipe);
> +		if (display->pipes[pipe].enabled && display->pipes[pipe +
> 1].enabled) {
> +			*master_pipes |= BIT(pipe);
>  			igt_info("Found master pipe %s\n",
> kmstest_pipe_name(pipe));
>  		}
>  	}
> @@ -561,7 +561,7 @@ igt_main
>  		data.drm_fd = drm_open_driver_master(DRIVER_INTEL |
> DRIVER_XE);
>  		kmstest_set_vt_graphics_mode();
>  		igt_display_require(&data.display, data.drm_fd);
> -		set_all_master_pipes_for_platform(&data);
> +		set_all_master_pipes_for_platform(&data.display,
> &data.master_pipes);
>  		igt_require(data.display.is_atomic);
>  		max_dotclock = igt_get_max_dotclock(data.drm_fd);
> 
> --
> 2.25.1



More information about the igt-dev mailing list