All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test
@ 2016-10-22  8:32 Chris Wilson
  2016-10-24  9:04 ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2016-10-22  8:32 UTC (permalink / raw)
  To: intel-gfx

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@chris-wilson.co.uk>
---
 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);
+
 	i = 0;
 	crtc_count = 0;
 	crtc = crtcs;
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test
  2016-10-22  8:32 [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test Chris Wilson
@ 2016-10-24  9:04 ` Daniel Vetter
  2016-10-24  9:17   ` Chris Wilson
  2016-10-24 10:11   ` Ville Syrjälä
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Vetter @ 2016-10-24  9:04 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

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@chris-wilson.co.uk>
> ---
>  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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test
  2016-10-24  9:04 ` Daniel Vetter
@ 2016-10-24  9:17   ` Chris Wilson
  2016-10-24 10:11   ` Ville Syrjälä
  1 sibling, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2016-10-24  9:17 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Mon, Oct 24, 2016 at 11:04:35AM +0200, Daniel Vetter wrote:
> 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@chris-wilson.co.uk>
> > ---
> >  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).

Otoh, something as simple as kms_setmode, one can argue should just be
using (cleanly and clearly, ofc) the raw interfaces and iterating over them.

	kms_setmode_legacy / kms_setcrtc / drm_setcrtc,
	kms_setmode_atomic,
	igt_setmode / kms_setmode

would all then serve slightly different purposes (both testing and
pedagogy).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test
  2016-10-24  9:04 ` Daniel Vetter
  2016-10-24  9:17   ` Chris Wilson
@ 2016-10-24 10:11   ` Ville Syrjälä
  2016-10-24 10:22     ` Chris Wilson
  1 sibling, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2016-10-24 10:11 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Mon, Oct 24, 2016 at 11:04:35AM +0200, Daniel Vetter wrote:
> 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@chris-wilson.co.uk>
> > ---
> >  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?

Like kmstest_unset_all_crtcs() ?

> 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@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test
  2016-10-24 10:11   ` Ville Syrjälä
@ 2016-10-24 10:22     ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2016-10-24 10:22 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On Mon, Oct 24, 2016 at 01:11:49PM +0300, Ville Syrjälä wrote:
> On Mon, Oct 24, 2016 at 11:04:35AM +0200, Daniel Vetter wrote:
> > 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@chris-wilson.co.uk>
> > > ---
> > >  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?
> 
> Like kmstest_unset_all_crtcs() ?

Done.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-24 10:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22  8:32 [PATCH igt] igt/kms_setmode: Clear all connectors before starting the test Chris Wilson
2016-10-24  9:04 ` Daniel Vetter
2016-10-24  9:17   ` Chris Wilson
2016-10-24 10:11   ` Ville Syrjälä
2016-10-24 10:22     ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.