From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [Intel-gfx] [PATCH igt 2/2] igt/gem_eio: Drop DRM_MASTER so we can reacquire it in the subtests
Date: Fri, 6 Apr 2018 10:18:12 +0100 [thread overview]
Message-ID: <b64828f6-7ed6-9237-efcd-4a4d12813ff6@linux.intel.com> (raw)
In-Reply-To: <152300470941.28413.3252867475457294393@mail.alporthouse.com>
On 06/04/2018 09:51, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-04-06 09:35:41)
>>
>> On 05/04/2018 19:47, Chris Wilson wrote:
>>> As we reopen the fd for each subtest, and we need a DRM_MASTER, we need
>>> to drop master on the original before we are allowed to claim DRM_MASTER
>>> on the second.
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> ---
>>> tests/gem_eio.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/tests/gem_eio.c b/tests/gem_eio.c
>>> index 9599e73d..66d8c18a 100644
>>> --- a/tests/gem_eio.c
>>> +++ b/tests/gem_eio.c
>>> @@ -41,6 +41,7 @@
>>> #include <drm.h>
>>>
>>> #include "igt.h"
>>> +#include "igt_device.h"
>>> #include "igt_sysfs.h"
>>> #include "sw_sync.h"
>>>
>>> @@ -674,6 +675,7 @@ igt_main
>>>
>>> igt_fixture {
>>> fd = drm_open_driver(DRIVER_INTEL);
>>> + igt_device_drop_master(fd);
>>
>>
>> Is it master by default? I can't spot a place which would set master
>> either in igt/lib/ or in drm.
>
> First person to open /dev/dri/cardN gets DRM_MASTER.
Weird. And I missed to spot that magic while browsing around.
>> But in any case, should we have gem_reopen_driver attempt to drop master
>> before re-opening? And if it was successful, drop it again after
>> re-opening to end up in the same state?
>
> Not sure. I can argue the alternative as well, what if we were testing
> authentication and wanted to keep DRM_MASTER and spawn a !MASTER fd.
> My first thought was the same, gem_reopen_fd() should try to ensure the
> new fd has the same caps as the original, but API they be tricky to rule
> out surprises. For me it's easier to say, gem_reopen_fd() follows the
> DRM convention in that the second fd will not be DRM_MASTER unless you
> play the DRM games. Then you can choose what games to play?
Okay, pragmatic response says:
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Apologies for causing breakage.
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-04-06 9:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 18:47 [igt-dev] [PATCH igt 1/2] lib: Acquire master for pollable spinbatch on gen4/5 Chris Wilson
2018-04-05 18:47 ` [igt-dev] [PATCH igt 2/2] igt/gem_eio: Drop DRM_MASTER so we can reacquire it in the subtests Chris Wilson
2018-04-06 8:35 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin
2018-04-06 8:51 ` Chris Wilson
2018-04-06 9:18 ` Tvrtko Ursulin [this message]
2018-04-05 19:19 ` [igt-dev] ✗ Fi.CI.BAT: warning for series starting with [1/2] lib: Acquire master for pollable spinbatch on gen4/5 Patchwork
2018-04-06 8:24 ` [igt-dev] [Intel-gfx] [PATCH igt 1/2] " Tvrtko Ursulin
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=b64828f6-7ed6-9237-efcd-4a4d12813ff6@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@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