public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_rotation: align rendered image correctly for rotation
Date: Tue, 18 Dec 2018 14:33:28 +0200	[thread overview]
Message-ID: <6102a96b-a7db-5b3a-bc2b-a052c9cecbf8@gmail.com> (raw)
In-Reply-To: <154513420528.1108.5851380459326757601@skylake-alporthouse-com>

On 18.12.2018 13.56, Chris Wilson wrote:
> Quoting Juha-Pekka Heikkila (2018-12-18 11:30:03)
>> rendered test image had off-by-one error in size calculation
>> which was failing some tests on certain resolutions and plane
>> sizes.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109016
>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>> ---
>>   tests/kms_rotation_crc.c | 11 +++++++++--
>>   1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
>> index c67f608..8edf9aa 100644
>> --- a/tests/kms_rotation_crc.c
>> +++ b/tests/kms_rotation_crc.c
>> @@ -126,6 +126,9 @@ paint_squares(data_t *data, igt_rotation_t rotation,
>>          unsigned int h = fb->height;
>>          rgb_color_t tl, tr, bl, br;
>>   
>> +       igt_assert_f(!(w&1), "rotation image must be even width, now attempted %d\n", w);
>> +       igt_assert_f(!(h&1), "rotation image must be even height, now attempted %d\n", h);
>> +
>>          cr = igt_get_cairo_ctx(data->gfx_fd, fb);
>>   
>>          set_color(&tl, o, 0.0f, 0.0f);
>> @@ -439,8 +442,12 @@ static void get_multiplane_crc(data_t *data, igt_output_t *output,
>>                  planes[c].plane = igt_output_get_plane_type(output,
>>                                                              planeinfo[c].planetype);
>>   
>> -               w = planeinfo[c].width;
>> -               h = planeinfo[c].height;
>> +               /*
>> +                * make plane and fb width and height always even due to
>> +                * test image rendering
>> +                */
>> +               w = (planeinfo[c].width | 1) + 1;
>> +               h = (planeinfo[c].height | 1) + 1;
> 
> Is expanding safe? &~1 to trim instead?

I think expanding should be ok as fb is created on following lines but 
I'm fine both ways. I'll send new version.


/Juha-Pekka
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-12-18 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 11:30 [igt-dev] [PATCH i-g-t] tests/kms_rotation: align rendered image correctly for rotation Juha-Pekka Heikkila
2018-12-18 11:56 ` Chris Wilson
2018-12-18 12:33   ` Juha-Pekka Heikkila [this message]
2018-12-18 12:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-12-18 12:58 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkila
2018-12-18 13:19 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_rotation: align rendered image correctly for rotation (rev2) Patchwork
2018-12-18 16:44 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_rotation: align rendered image correctly for rotation Patchwork
2018-12-18 18:01 ` [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_rotation: align rendered image correctly for rotation (rev2) 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=6102a96b-a7db-5b3a-bc2b-a052c9cecbf8@gmail.com \
    --to=juhapekka.heikkila@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    /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