All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kahola, Mika" <mika.kahola@intel.com>
To: "Gupta, Nidhi1" <nidhi1.gupta@intel.com>,
	"B S, Karthik" <karthik.b.s@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_concurrent: Skip the subtest if the resolution is not supported
Date: Fri, 6 May 2022 11:39:18 +0000	[thread overview]
Message-ID: <240619292efa44059e2ead6af300af02@intel.com> (raw)
In-Reply-To: <4721666085d64da6a6ef73b7540bc680@intel.com>

> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Gupta,
> Nidhi1
> Sent: Thursday, May 5, 2022 3:30 PM
> To: B S, Karthik <karthik.b.s@intel.com>; igt-dev@lists.freedesktop.org
> Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_concurrent: Skip the subtest if the
> resolution is not supported
> 
> 
> 
> -----Original Message-----
> From: B S, Karthik <karthik.b.s@intel.com>
> Sent: Thursday, May 5, 2022 11:24 AM
> To: Gupta, Nidhi1 <nidhi1.gupta@intel.com>; igt-dev@lists.freedesktop.org
> Subject: Re: [PATCH i-g-t] tests/kms_concurrent: Skip the subtest if the
> resolution is not supported
> 
> On 5/5/2022 3:30 AM, Nidhi Gupta wrote:
> > The kms_concurrent is about testing mode setting with reducing the
> > resolution and then again increasing it, for this the test will take
> > the high resolution supported by the connector and then calculate the
> > lowest resolution, if the calculated resolution is not supported by
> > the connector it will assign the default resolution of 1024x 768
> > without checking.
> >
> > Adding the check to skip the subtest if the default resolution is not
> > supported by the connector.
> 
> Hi,
> 
> Please update the commit message. We're skipping if , "mode_lo->vdisplay  >
> mode_hi->vdisplay". Mention the same.
> 
> Also, I think its better to move this check inside "get_lowres_mode()". Before
> returning 1024x768 mode, we could use the same check used in the loop,
> "mode->vdisplay < limit", and skip the test if this is not met.
> 
> Thanks,
> Karthik.B.S
> >
> > Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
> > ---
> >   tests/kms_concurrent.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c index
> > 82b2021e..fdef6b26 100644
> > --- a/tests/kms_concurrent.c
> > +++ b/tests/kms_concurrent.c
> > @@ -272,6 +272,8 @@ test_resolution_with_output(data_t *data, enum pipe
> pipe, int max_planes, igt_ou
> >   		mode_hi = igt_output_get_mode(output);
> >   		mode_lo = get_lowres_mode(data, mode_hi, output);
> >
> > +		igt_skip_on(mode_lo->vdisplay > mode_hi->vdisplay);
> > +
> >   		/* switch to lower resolution */
> >   		igt_output_override_mode(output, mode_lo);
> >   		free(mode_lo);
> Hi Karthik,
> 
> Thanks for your review, but if I use mode->vdisplay < limit, its skipping for eDP
> also, because for eDP mode with resolution less then limit (limit =
> mode_default->vdisplay - SIZE_PLANE) is not available but 1024x768 is available.
> 
> I tried to execute also below are the results:
> gta@sad-gta-dut:~/drivers.gpu.i915.igt-gpu-tools$ sudo
> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/x86_64-linux-gnu/
> build/tests/kms_concurrent
> IGT-Version: 1.26-g6ba88471c25 (x86_64) (Linux: 5.10.54-DII_5677-
> gd13fb75fff37+ x86_64) Opened device: /dev/dri/card0 Starting subtest: pipe-A
> Starting dynamic subtest: eDP-1 Testing resolution with connector eDP-1 using
> pipe A with seed 1651753436 Test requirement not met in function
> get_lowres_mode, file ../tests/kms_concurrent.c:256:
> Test requirement: !(mode->vdisplay > limit) Dynamic subtest eDP-1: SKIP (0.003s)
> Starting dynamic subtest: HDMI-A-1 Testing resolution with connector HDMI-A-1
> using pipe A with seed 1651753436 Test requirement not met in function
> get_lowres_mode, file ../tests/kms_concurrent.c:256:
> Test requirement: !(mode->vdisplay > limit) Dynamic subtest HDMI-A-1: SKIP
> (0.003s)

Hi!

I had as similar idea in mind that Karthik already had. But obviously this is approach is not really working if default mode 1024x768 is supported by the panel.

Originally, this get_lowres_mode() function as a direct copy from the one used by kms_plane_lowres.c. At some point of time, these two get_lowres_mode() functions evolved to be a bit different. Maybe, this would be a time and a place to unify these two different get_lowres_mode() functions or even move this function to be part of a library routines.

Anyway, back with the igt_skip_on(). 

Maybe we could add a comment on igt_skip_on() to give a reason, why we skipped. Maybe something like "No suitable resolution was found". 

Cheers,
Mika

  reply	other threads:[~2022-05-06 11:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 22:00 [igt-dev] [PATCH i-g-t] tests/kms_concurrent: Skip the subtest if the resolution is not supported Nidhi Gupta
2022-05-04 22:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-05-05  3:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-05-05  5:53 ` [igt-dev] [PATCH i-g-t] " Karthik B S
2022-05-05 12:30   ` Gupta, Nidhi1
2022-05-06 11:39     ` Kahola, Mika [this message]
2022-05-09 12:01 Nidhi Gupta

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=240619292efa44059e2ead6af300af02@intel.com \
    --to=mika.kahola@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    --cc=nidhi1.gupta@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 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.