Re: [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 22, 2016 at 09:32:41AM +0100, Chris Wilson wrote:
> Before we start trying random combinations of connectors and CRTCs, we
> should first ensure we have a blank slate so that if we only change a
> subset of the CRTC we do not conflict with a residual setup on the other
> CRTC.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  tests/kms_setmode.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
> index 24fb34c..df958f0 100644
> --- a/tests/kms_setmode.c
> +++ b/tests/kms_setmode.c
> @@ -268,6 +268,10 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf,
>  	int i;
>  	int encoder_usage_count[resources->count_encoders];
>  
> +	for (i = 0; i < resources->count_crtcs; i++)
> +		drmModeSetCrtc(drm_fd, resources->crtcs[i],
> +			       0, 0, 0, 0, 0, NULL);

Shouldn't this be in some modeset helper library, or is kms_setmode not
using that one? Especially with atomic it's much neater to just clear our
software state (and then applying all the changes we want in one go).

But it does get the job done meanwhile, so ack.
-Daniel
> +
>  	i = 0;
>  	crtc_count = 0;
>  	crtc = crtcs;
> -- 
> 2.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux