[igt-dev] [i-g-t] tests/kms_rotation_crc: Remove hardcoding of platforms in igt_require()
Srivatsa, Anusha
anusha.srivatsa at intel.com
Wed Feb 14 17:57:00 UTC 2018
>-----Original Message-----
>From: Kahola, Mika
>Sent: Wednesday, February 14, 2018 3:40 AM
>To: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>; Srivatsa, Anusha
><anusha.srivatsa at intel.com>; igt-dev at lists.freedesktop.org
>Subject: Re: [i-g-t] tests/kms_rotation_crc: Remove hardcoding of platforms in
>igt_require()
>
>On Wed, 2018-02-14 at 10:08 +0100, Maarten Lankhorst wrote:
>> Op 14-02-18 om 08:40 schreef Srivatsa, Anusha:
>> >
>> >
>> > >
>> > > -----Original Message-----
>> > > From: Srivatsa, Anusha
>> > > Sent: Tuesday, February 13, 2018 5:09 PM
>> > > To: igt-dev at lists.freedesktop.org
>> > > Cc: Srivatsa, Anusha <anusha.srivatsa at intel.com>; Sripada,
>> > > Radhakrishna <radhakrishna.sripada at intel.com>; Vetter, Daniel
>> > > <daniel.vetter at i ntel.com>; Vivi, Rodrigo
>> > > <rodrigo.vivi at intel.com>; Maarten Lankhorst
>> > > <maarten.lankhorst at linux.intel.com>; Kahola, Mika <mika.kahola at in
>> > > tel.com>
>> > > Subject: [i-g-t] tests/kms_rotation_crc: Remove hardcoding of
>> > > platforms in
>> > > igt_require()
>> > >
>> > > Rework the rotate and reflect subtests by checking the crtc
>> > > supported properties against the ones that the test is testing.
>> > > Remove the hardcoded platform names in
>> > > igt_require()
>> > >
>> > > Cc: Radhakrishna Sripad <radhakrishna.sripada at intel.com>
>> > > Cc: Daniel Vetter <daniel.vetter at intel.com>
>> > > Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
>> > > Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>> > > Cc: Mika Kahola <mika.kahola at intel.com>
>> > > Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
>> > > ---
>> > > tests/kms_rotation_crc.c | 12 +++---------
>> > > 1 file changed, 3 insertions(+), 9 deletions(-)
>> > >
>> > > diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
>> > > index
>> > > 0cd5c6e..49d57a2 100644
>> > > --- a/tests/kms_rotation_crc.c
>> > > +++ b/tests/kms_rotation_crc.c
>> > > @@ -373,9 +373,6 @@ static void test_plane_rotation(data_t *data,
>> > > int plane_type, bool test_bad_form
>> > > igt_plane_t *plane;
>> > > int i, j;
>> > >
>> > > - if (IS_CHERRYVIEW(data->devid) && pipe !=
>> > > PIPE_B)
>> > > - continue;
>> > > -
>> > > igt_output_set_pipe(output, pipe);
>> > >
>> > > plane = igt_output_get_plane_type(output, plane_type); @@ -
>> > > 558,9 +555,7 @@ igt_main
>> > > igt_subtest_f("%s-rotation-%s",
>> > > plane_test_str(subtest->plane),
>> > > rot_test_str(subtest->rot)) {
>> > > - igt_require(!(subtest->rot &
>> > > - (IGT_ROTATION_90 |
>> > > IGT_ROTATION_270)) ||
>> > > - gen >= 9);
>> > > + igt_require(igt_plane_get_prop(data.disp
>> > > lay.pipes-
>> > > >
>> > > > planes,
>> > > +IGT_PLANE_ROTATION) & subtest->rot);
>> > Mika, Maarten,
>> > Any comments?
>> igt_plane_get_prop returns the current value, not all supported
>> rotations. I've retried the patch series, but if it still doesn't run
>> you'll see a lot of PASS change to SKIP.
>What if we loop through all rotations and check this that way? Perhaps use just
>igt_plane_has_prop() to do this and keep a list of supported rotations.
>
Igt_plane_has_prop() will just tell if property exists...but what we need Is the value/metadata of the property so igt_plane_has_prop() will not be enough..
Anusha
>-Mika-
>
>>
>> ~Maarten
More information about the igt-dev
mailing list