From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] igt/kms_addfb_basic: New subtest to check for fb modifier and tiling mode mismatch
Date: Fri, 16 Oct 2015 12:06:56 +0100 [thread overview]
Message-ID: <5620DA50.2030606@linux.intel.com> (raw)
In-Reply-To: <20151015181046.719adb12@vkasired-desk2.amr.corp.intel.com>
Hi,
On 16/10/15 02:10, Vivek Kasireddy wrote:
>>>>> On 07/10/15 03:35, Vivek Kasireddy wrote:
>>>>>> This new subtest will validate a Y-tiled object's tiling mode
>>>>>> against its associated fb modifier.
>>>>>>
>>>>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>>> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
>>>>>> ---
>>>>>> tests/kms_addfb_basic.c | 9 +++++++++
>>>>>> 1 file changed, 9 insertions(+)
>>>>>>
>>>>>> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
>>>>>> index d466e4d..7ca1add 100644
>>>>>> --- a/tests/kms_addfb_basic.c
>>>>>> +++ b/tests/kms_addfb_basic.c
>>>>>> @@ -373,6 +373,15 @@ static void addfb25_ytile(int fd, int gen)
>>>>>> f.handles[0] = gem_bo;
>>>>>> }
>>>>>>
>>>>>> + igt_subtest("addfb25-Y-tiled-X-modifier-mismatch") {
>>>>>> + igt_require(gen >= 9);
>>>>>> + igt_require_fb_modifiers(fd);
>>>>>> + gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4);
>>>>>> +
>>>>>> + f.modifier[0] = LOCAL_I915_FORMAT_MOD_X_TILED;
>>>>>> + igt_assert(drmIoctl(fd,
>>>>>> LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) < 0 && errno == EINVAL);
>>>>>> + }
>>>>>> +
>>>>>> igt_subtest("addfb25-Y-tiled") {
>>>>>> igt_require_fb_modifiers(fd);
>>>>>>
>>>>>
>>>>> Wasn't the original WARN triggered by Y tiled object and Y fb
>>>>> modifier?
>>>>
>>>> Creating a new fb using a Y-tiled object and Y/X fb modifier will
>>>> not trigger the original WARN. It'll be triggered only if the fb
>>>> is going to be pinned -- and flipped. I am not sure how to get
>>>> that WARN to be triggered with the existing suite of igt tests.
>>>
>>> Ah yes, you would need to attempt display it, not even necessarily
>>> flip it. I am sure there are tests which do that. :) I know from
>>> recent activity kms_rotation_crc for example creates a Y tiled FB
>>> and displays it. So maybe borrow some code to start with from there.
>>
>> Even better, kms_flip_tiling does the majority of what is needed here
>> already. Just drop in a subtest which will do set_tiling and that
>> should be good.
>
> I have realized that I cannot get the the map_and_fenceable WARN to be
> triggered with any of the IGT tests. This is because the WARN is
> triggered only when pinning/fencing a Y-tiled fb that has a rotated
> view (90/270 degree rotation) that none of the IGT tests can do. I
> looked at and wrote a subtest in kms_rotation_crc but the WARN was not
> triggered because IGT does not support atomic flip/commit yet.
> Currently, since it does a SetPlane first, the object has a normal view
> and its map_and-fenceable bit is set, however, when the rotation
> property is applied, the object though has a rotated view, its
> map_and-fenceable bit never gets updated and stays 1 and hence the
> warning doesn't get triggered. I am copying the subtest code below for
> reference.
It is possible and it looks like you have been on the right track. If
you just avoided rendering to the fb (paint_squares) I think it might
have worked.
Unfortunately before reading your e-mail thoroughly I rushed and
developed my own POC so you will now see a patch series I copied you on.
That triggers the WARN nicely.
But your approach, localized changes to kms_rotation_crc, is probably
better. So feel free to refine your test case and we can drop my patch
series.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-16 11:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 2:35 [PATCH] igt/kms_addfb_basic: New subtest to check for fb modifier and tiling mode mismatch Vivek Kasireddy
2015-10-07 14:07 ` Tvrtko Ursulin
2015-10-07 21:07 ` Vivek Kasireddy
2015-10-08 8:55 ` Tvrtko Ursulin
2015-10-09 8:34 ` Tvrtko Ursulin
2015-10-10 0:46 ` Vivek Kasireddy
2015-10-16 1:10 ` Vivek Kasireddy
2015-10-16 11:06 ` Tvrtko Ursulin [this message]
2015-10-19 9:50 ` Daniel Vetter
2015-10-20 1:19 ` Vivek Kasireddy
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=5620DA50.2030606@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vivek.kasireddy@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.