From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Lofstedt, Marta" <marta.lofstedt@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Fix Y alignment in the scaledprimary subtest, v3.
Date: Wed, 28 Mar 2018 13:39:15 +0200 [thread overview]
Message-ID: <5ea482d5-e5b5-aa11-b1d3-48d063f7594b@linux.intel.com> (raw)
In-Reply-To: <CA5F6A4B62957246A95956419746064382B7BFF9@IRSMSX106.ger.corp.intel.com>
Op 28-03-18 om 12:50 schreef Lofstedt, Marta:
> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
>
>> -----Original Message-----
>> From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
>> Maarten Lankhorst
>> Sent: Tuesday, March 20, 2018 9:39 AM
>> To: igt-dev@lists.freedesktop.org
>> Subject: [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Fix Y
>> alignment in the scaledprimary subtest, v3.
>>
>> This is hidden behind the other kms_frontbuffer_tracking failures, but is its
>> own fail.
>>
>> On gen9/gen10 we fail the scaledprimary tests because FBC refuses to be
>> enabled with "plane Y offset is misaligned".
>> Looking at the kernel, this is a workaround for FIFO underruns which can be
>> tested as well. Test that with the right alignment, FBC is enabled and with
>> misalignment FBC is disabled on <= gen10.
>>
>> Changes since v1:
>> - Always check both alignments.
>> Changes since v2:
>> - Fix gen assignment.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> tests/kms_frontbuffer_tracking.c | 18 ++++++++++++++++--
>> 1 file changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/kms_frontbuffer_tracking.c
>> b/tests/kms_frontbuffer_tracking.c
>> index 454103d367c7..5576b058b852 100644
>> --- a/tests/kms_frontbuffer_tracking.c
>> +++ b/tests/kms_frontbuffer_tracking.c
>> @@ -2751,8 +2751,10 @@ static void scaledprimary_subtest(const struct
>> test_mode *t)
>> struct igt_fb new_fb, *old_fb;
>> struct modeset_params *params = pick_params(t);
>> struct fb_region *reg = ¶ms->primary;
>> + int gen = intel_gen(intel_get_drm_devid(drm.fd));
>> + int src_y_upscale = ALIGN(reg->h / 4, 4);
>>
>> - igt_require_f(intel_gen(intel_get_drm_devid(drm.fd)) >= 9,
>> + igt_require_f(gen >= 9,
>> "Can't test primary plane scaling before gen
>> 9\n");
>>
>> prepare_subtest(t, NULL);
>> @@ -2801,11 +2803,23 @@ static void scaledprimary_subtest(const struct
>> test_mode *t)
>>
>> /* Destination doesn't fill the entire CRTC, upscaling. */
>> igt_fb_set_position(&new_fb, reg->plane,
>> - reg->x + reg->w / 4, reg->y +
>> reg->h / 4);
>> + reg->x + reg->w / 4, reg->y +
>> src_y_upscale);
>> igt_fb_set_size(&new_fb, reg->plane, reg->w / 2, reg->h / 2);
>> igt_display_commit2(&drm.display, COMMIT_UNIVERSAL);
>> do_assertions(DONT_ASSERT_CRC);
>>
>> + /*
>> + * On gen <= 10 HW, FBC is not enabled on a plane with a Y
>> offset
>> + * that isn't divisible by 4, because it causes FIFO underruns.
>> + *
>> + * Check that FBC is disabled.
>> + */
>> + igt_fb_set_position(&new_fb, reg->plane,
>> + reg->x + reg->w / 4, reg->y +
>> src_y_upscale + 3);
>> + igt_fb_set_size(&new_fb, reg->plane, reg->w / 2, reg->h / 2);
>> + igt_display_commit2(&drm.display, COMMIT_UNIVERSAL);
>> + do_assertions(DONT_ASSERT_CRC | (gen <= 10 ?
>> ASSERT_FBC_DISABLED :
>> +0));
>> +
>> /* Back to the good and old blue fb. */
>> igt_plane_set_fb(reg->plane, old_fb);
>> igt_plane_set_position(params->primary.plane, 0, 0);
>> --
>> 2.16.2
>>
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
Thanks, pushed.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-03-28 11:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 14:23 [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Fix Y alignment in the scaledprimary subtest Maarten Lankhorst
2018-03-19 14:35 ` [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Fix Y alignment in the scaledprimary subtest, v2 Maarten Lankhorst
2018-03-20 7:39 ` [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Fix Y alignment in the scaledprimary subtest, v3 Maarten Lankhorst
2018-03-26 13:24 ` Maarten Lankhorst
2018-03-28 10:50 ` Lofstedt, Marta
2018-03-28 11:39 ` Maarten Lankhorst [this message]
2018-03-19 20:35 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Fix Y alignment in the scaledprimary subtest. (rev2) Patchwork
2018-03-19 23:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-03-20 8:32 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Fix Y alignment in the scaledprimary subtest. (rev3) Patchwork
2018-03-20 9:53 ` [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=5ea482d5-e5b5-aa11-b1d3-48d063f7594b@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=marta.lofstedt@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