public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ser, Simon" <simon.ser@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Roper, Matthew D" <matthew.d.roper@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_lowres: Skip if no suitable mode is possible
Date: Tue, 27 Aug 2019 07:46:48 +0000	[thread overview]
Message-ID: <5b979337dee5e5e56dfee60af4b33f68961b6fc7.camel@intel.com> (raw)
In-Reply-To: <20190820141956.31508-1-matthew.d.roper@intel.com>

On Tue, 2019-08-20 at 07:19 -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.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105581
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  tests/kms_plane_lowres.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
> index 68b85025..3f20ed32 100644
> --- a/tests/kms_plane_lowres.c
> +++ b/tests/kms_plane_lowres.c
> @@ -59,8 +59,10 @@ get_lowres_mode(int drmfd, igt_output_t *output, drmModeModeInfo *mode_default)
>  		}
>  	}
>  
> -	if (!found)
> +	if (!found) {
> +		igt_skip_on(limit <= 768);

Instead of hardcoding 768, can we use 1024 - SIZE? This would make it
clearer where this value comes from.

>  		return *igt_std_1024_mode_get();
> +	}
>  
>  	return mode;
>  }
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-08-27  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 14:19 [igt-dev] [PATCH i-g-t] tests/kms_plane_lowres: Skip if no suitable mode is possible Matt Roper
2019-08-20 17:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-08-21  3:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-08-27  7:46 ` Ser, Simon [this message]
2019-08-29 20:52   ` [igt-dev] [PATCH i-g-t v2] " Matt Roper
2019-08-30  7:29     ` Ser, Simon
2019-08-30 15:58       ` Matt Roper
2019-08-29 21:19 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_plane_lowres: Skip if no suitable mode is possible (rev2) Patchwork
2019-08-30 14:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b979337dee5e5e56dfee60af4b33f68961b6fc7.camel@intel.com \
    --to=simon.ser@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox