[Intel-gfx] [PATCH i-g-t v2 01/15] igt_kms: Remove kmstest_connector_config.crtc_idx

Daniel Vetter daniel at ffwll.ch
Wed Jul 13 12:13:07 UTC 2016


On Wed, Jul 06, 2016 at 11:55:41AM +0200, Maarten Lankhorst wrote:
> This is the same as using config.pipe because the order of crtcs will
> never change.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>

In the interest of generic igt, I'm somewhat inclined to instead nuke
crtc->pipe (it's an Intelism) instead of crtc->idx. I also thought there's
some work from Robert Foss (still uncommented) to reorganize this.
-Daniel

> ---
>  lib/igt_kms.c       | 4 +---
>  lib/igt_kms.h       | 1 -
>  tests/testdisplay.c | 4 +---
>  3 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 8f9ac2da43ff..c16e40ea273b 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -854,9 +854,7 @@ static bool _kmstest_connector_config(int drm_fd, uint32_t connector_id,
>  	config->connector = connector;
>  	config->encoder = found;
>  	config->crtc = drmModeGetCrtc(drm_fd, resources->crtcs[pipe]);
> -	config->crtc_idx = pipe;
> -	config->pipe = kmstest_get_pipe_from_crtc_id(drm_fd,
> -						     config->crtc->crtc_id);
> +	config->pipe = pipe;
>  
>  	drmModeFreeResources(resources);
>  
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 829615d70874..4882075430c8 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -118,7 +118,6 @@ struct kmstest_connector_config {
>  	bool connector_dpms_changed;
>  	uint32_t atomic_props_crtc[IGT_NUM_CRTC_PROPS];
>  	uint32_t atomic_props_connector[IGT_NUM_CONNECTOR_PROPS];
> -	int crtc_idx;
>  	int pipe;
>  	unsigned valid_crtc_idx_mask;
>  };
> diff --git a/tests/testdisplay.c b/tests/testdisplay.c
> index 45280e4cad82..a974f42be9f1 100644
> --- a/tests/testdisplay.c
> +++ b/tests/testdisplay.c
> @@ -112,7 +112,6 @@ struct connector {
>  	drmModeEncoder *encoder;
>  	drmModeConnector *connector;
>  	int crtc;
> -	int crtc_idx;
>  	int pipe;
>  };
>  
> @@ -211,7 +210,6 @@ static void connector_find_preferred_mode(uint32_t connector_id,
>  	c->connector = config.connector;
>  	c->encoder = config.encoder;
>  	c->crtc = config.crtc->crtc_id;
> -	c->crtc_idx = config.crtc_idx;
>  	c->pipe = config.pipe;
>  
>  	if (mode_num != -1) {
> @@ -497,7 +495,7 @@ int update_display(bool probe)
>  
>  			if (test_preferred_mode || force_mode ||
>  			    specified_mode_num != -1)
> -				crtc_idx_mask &= ~(1 << connector->crtc_idx);
> +				crtc_idx_mask &= ~(1 << connector->pipe);
>  
>  		}
>  	}
> -- 
> 2.5.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list