From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Micah Fedke <micah.fedke@collabora.com>,
Intel GFX discussion <intel-gfx@lists.freedesktop.org>,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
Daniel Stone <daniels@collabora.com>,
Emil Velikov <emil.velikov@collabora.com>
Subject: Re: [i-g-t PATCH v1 08/14] lib: Add igt_create_bo_with_dimensions
Date: Thu, 10 Nov 2016 16:23:31 +0000 [thread overview]
Message-ID: <c58134e8-3233-d606-e467-fd7a69761245@linux.intel.com> (raw)
In-Reply-To: <CAAObsKA-6E6AQAH=ktvFBLZroNde2U6a06=vsMxKRjHmbiF7NA@mail.gmail.com>
On 10/11/2016 13:17, Tomeu Vizoso wrote:
> On 1 November 2016 at 16:44, Tvrtko Ursulin <tursulin@ursulin.net> wrote:
>>
>> Hi,
>>
>>
>>
>> On 02/03/16 14:00, Tomeu Vizoso wrote:
>>>
>>> igt_create_bo_with_dimensions() is intended to abstract differences
>>> between drivers in buffer object creation.
>>>
>>> The driver-specific ioctls will be called if the driver that is being
>>> tested can satisfy the needs of the calling subtest, or it will be
>>> skipped otherwise.
>>>
>>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>>> ---
>>>
>>> lib/igt_fb.c | 83
>>> ++++++++++++++++++++++++++++++++++++++++++------------------
>>> lib/igt_fb.h | 6 +++++
>>> 2 files changed, 65 insertions(+), 24 deletions(-)
>>>
>>> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
>>> index cd1605308308..0a3526f4e4ea 100644
>>> --- a/lib/igt_fb.c
>>> +++ b/lib/igt_fb.c
>>> @@ -174,30 +174,66 @@ void igt_calc_fb_size(int fd, int width, int height,
>>> int bpp, uint64_t tiling,
>>> *size_ret = size;
>>> }
>>>
>>> +int igt_create_bo_with_dimensions(int fd, int width, int height,
>>> + uint32_t format, uint64_t modifier,
>>> + unsigned stride, unsigned *size_ret,
>>> + unsigned *stride_ret, bool *is_dumb)
>>> +{
>>> + int bpp = igt_drm_format_to_bpp(format);
>>> + int bo;
>>> +
>>> + igt_assert((modifier && stride) || (!modifier && !stride));
>>> +
>>> + if (modifier) {
>>> + unsigned size, calculated_stride;
>>> +
>>> + igt_calc_fb_size(fd, width, height, bpp, modifier, &size,
>>> + &calculated_stride);
>>> + if (stride == 0)
>>> + stride = calculated_stride;
>>> +
>>> + if (is_dumb)
>>> + *is_dumb = false;
>>> +
>>> + if (is_i915_device(fd)) {
>>> +
>>> + bo = gem_create(fd, size);
>>> + gem_set_tiling(fd, bo, modifier, stride);
>>
>>
>> This is broken, gem_set_tiling does not take a fb modifier but an object
>> tiling mode.
>>
>> You can demonstrate the failure if you got a Skylake system with:
>>
>> tests/kms_flip_tiling --r flip-changes-tiling-Yf
>
> Hi,
>
> that subtest fails occasionally here due to CRC issues, but the one
> that fails due to the tiling constant passed to gem_set_tiling is
> flip-Yf-tiled.
>
> Have fixed it by converting the modifier to a tiling mode, but I also
> needed to make sure that we don't pass to the kernel the Yf or Ys
> constants as the kernel doesn't know about those.
>
> Both fixes have been pushed already.
With the two patches you pushed flip-changes-tiling-Yf is still broken
due the tiling mode mismatch, not the CRC.
Perhaps you tested with all three patches you posted today?
>> I would like to be able to tell you that all subtests there should pass,
>> since they have been at some point, but I have a feeling that there are
>> other breakages affecting it these days. :(
>
> Yeah, at least I can say that they are passing now in this particular
> machine (i3-6100U).
>
> To make such issues less likely in the future, I have sent a patch
> that makes clear when a variable contains a fb modifier constant, and
> when a tiling mode. Haven't pushed it because I'm not 100% sure it's
> worth it, so I would appreciate any opinions.
I will look at that one later.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-11-10 16:23 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 14:00 [i-g-t PATCH v1 00/14] Get a few more tests to run on !i915 Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 01/14] lib: add igt_require_intel Tomeu Vizoso
2016-03-02 14:18 ` Chris Wilson
2016-03-02 14:00 ` [i-g-t PATCH v1 02/14] lib: Have gem_set_tiling require intel Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 03/14] lib: Expose is_i915_device Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 04/14] lib: Have intel_get_drm_devid call igt_require_intel Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 05/14] lib: Call intel_get_drm_devid only from intel code Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 06/14] lib: Add wrapper for DRM_IOCTL_MODE_CREATE_DUMB Tomeu Vizoso
2016-03-05 12:21 ` Daniel Vetter
2016-03-02 14:00 ` [i-g-t PATCH v1 07/14] lib: Map dumb buffers Tomeu Vizoso
2016-03-02 14:21 ` Chris Wilson
2016-03-02 14:22 ` Daniel Stone
2016-03-02 14:39 ` Chris Wilson
2016-03-02 14:40 ` Daniel Stone
2016-03-02 14:54 ` Chris Wilson
2016-03-02 15:41 ` Daniel Stone
2016-03-05 12:24 ` Daniel Vetter
2016-03-05 12:27 ` Daniel Vetter
2016-03-02 14:00 ` [i-g-t PATCH v1 08/14] lib: Add igt_create_bo_with_dimensions Tomeu Vizoso
2016-03-05 12:30 ` Daniel Vetter
2016-03-07 16:19 ` Tomeu Vizoso
2016-03-07 16:25 ` Ville Syrjälä
2016-03-08 11:45 ` Daniel Stone
2016-11-01 15:44 ` Tvrtko Ursulin
2016-11-10 13:17 ` Tomeu Vizoso
2016-11-10 16:23 ` Tvrtko Ursulin [this message]
2016-11-11 11:23 ` Tomeu Vizoso
2016-11-11 11:33 ` Tvrtko Ursulin
2016-11-11 13:14 ` Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 09/14] tests: Open any driver Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 10/14] kms_addfb_basic: call igt_create_bo_with_dimensions Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 11/14] kms_addfb_basic: move tiling functionality into each subtest Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 12/14] kms_addfb_basic: Split tiling_tests off Tomeu Vizoso
2016-03-05 12:33 ` Daniel Vetter
2016-03-07 16:08 ` Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 13/14] kms_addfb_basic: Move calls to gem_set_tiling to the subtests Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 14/14] kms_addfb_basic: Get intel gen from within subtest Tomeu Vizoso
2016-03-05 12:34 ` [i-g-t PATCH v1 00/14] Get a few more tests to run on !i915 Daniel Vetter
2016-04-14 12:56 ` Daniel Stone
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=c58134e8-3233-d606-e467-fd7a69761245@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=daniels@collabora.com \
--cc=emil.velikov@collabora.com \
--cc=gustavo.padovan@collabora.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=micah.fedke@collabora.com \
--cc=tomeu.vizoso@collabora.com \
--cc=tursulin@ursulin.net \
/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.