[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-igt-dev
Subject:    Re: [igt-dev] [PATCH i-g-t v2] tests/kms_plane_lowres: Skip if no suitable mode is possible
From:       Matt Roper <matthew.d.roper () intel ! com>
Date:       2019-08-30 15:58:58
Message-ID: 20190830155858.GY13677 () mdroper-desk ! amr ! corp ! intel ! com
[Download RAW message or body]

On Fri, Aug 30, 2019 at 12:29:25AM -0700, Ser, Simon wrote:
> On Thu, 2019-08-29 at 13:52 -0700, Matt Roper wrote:
> > When choosing a low resolution mode to switch to, we search the
> > connector's mode list for a mode that's small enough that a plane
> > positioned in the bottom left corner of the screen in the original mode
> > will be fully offscreen in the new, smaller mode.  However if no
> > suitable modes are found in the modelist, we blindly fall back to a 10x7
> > mode without actually checking that the canary plane will now be
> > offscreen.  If, for example, the original mode was 13x7, then switching
> > to 10x7 will leave the plane visible onscreen, causing the test to fail.
> > 
> > Before falling back to a 10x7 mode, check whether that's actually small
> > enough.  If it isn't just skip this subtest.
> > 
> > v2: Restructure the skip condition to make it more obvious why this size
> >     limitation is important.  (Simon)
> > 
> > Cc: Simon Ser <simon.ser@intel.com>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105581
> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> 
> Thanks!
> 
> Reviewed-by: Simon Ser <simon.ser@intel.com>

Pushed, thanks for the review.


Matt

> 
> > ---
> >  tests/kms_plane_lowres.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
> > index 68b85025..1a316c84 100644
> > --- a/tests/kms_plane_lowres.c
> > +++ b/tests/kms_plane_lowres.c
> > @@ -59,8 +59,12 @@ get_lowres_mode(int drmfd, igt_output_t *output, drmModeModeInfo *mode_default)
> >  		}
> >  	}
> >  
> > -	if (!found)
> > +	if (!found) {
> > +		igt_require_f(mode_default->vdisplay - SIZE > 768,
> > +			      "Current mode not tall enough; plane would still be onscreen after switch to 10x7.\n");
> > +
> >  		return *igt_std_1024_mode_get();
> > +	}
> >  
> >  	return mode;
> >  }

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic