From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Mohammed Thasleem <mohammed.thasleem@intel.com>,
<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/kms_lease: Cache xe_device info for lease fd
Date: Fri, 22 Dec 2023 12:34:43 +0530 [thread overview]
Message-ID: <b52a2b39-cc88-4655-955b-f7739f0a778b@intel.com> (raw)
In-Reply-To: <4dadb6ba-89e5-48bd-9de3-548533864c01@intel.com>
On 12/13/2023 11:20 AM, Nautiyal, Ankit K wrote:
>
> On 12/12/2023 3:37 PM, Mohammed Thasleem wrote:
>> Cache xe_device struct info for lease fd before perpare crtc
>> with lessee's fd.
>
> I think we should add why this is required for this test.
>
>
>>
>> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
>> ---
>> tests/kms_lease.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
>> index 8ac58af38..e57aea2a2 100644
>> --- a/tests/kms_lease.c
>> +++ b/tests/kms_lease.c
>> @@ -48,6 +48,8 @@
>> #include <drm.h>
>> #include "igt_device.h"
>> +#include "xe_drm.h"
>> +#include "xe/xe_query.h"
>> /**
>> * SUBTEST: atomic-implicit-crtc
>> @@ -305,6 +307,10 @@ static void simple_lease(data_t *data)
>> /* Create a valid lease */
>> igt_assert_eq(make_lease(data), 0);
>> + /* Cache xe_device struct */
>> + if (is_xe_device(data->lease.fd))
>> + xe_device_get(data->lease.fd);
>
>
> I wonder this will be required for other subtests too.
>
> I think we should call this in make_lease(), after create_lease() is
> successful and we get file descriptor for the lease.
Missed to mention, we also need to remove it with xe_device_put, while
terminating the lease.
Regards,
Ankit
>
>
> Regards,
>
> Ankit
>
>
>
>> +
>> igt_display_require(&data->lease.display, data->lease.fd);
>> /* Set a mode on the leased output */
>> @@ -772,6 +778,10 @@ static void lease_revoke(data_t *data)
>> /* Create a valid lease */
>> igt_assert_eq(make_lease(data), 0);
>> + /* Cache xe_device struct */
>> + if (is_xe_device(data->lease.fd))
>> + xe_device_get(data->lease.fd);
>> +
>> igt_display_require(&data->lease.display, data->lease.fd);
>> /* try to revoke an invalid lease */
WARNING: multiple messages have this Message-ID (diff)
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Mohammed Thasleem <mohammed.thasleem@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/kms_lease: Cache xe_device info for lease fd
Date: Fri, 22 Dec 2023 12:34:43 +0530 [thread overview]
Message-ID: <b52a2b39-cc88-4655-955b-f7739f0a778b@intel.com> (raw)
Message-ID: <20231222070443.0vxPplmNMWQ-JoaQ1WX-9rvjb_KV1GK-iPpRGUDO_do@z> (raw)
In-Reply-To: <4dadb6ba-89e5-48bd-9de3-548533864c01@intel.com>
On 12/13/2023 11:20 AM, Nautiyal, Ankit K wrote:
>
> On 12/12/2023 3:37 PM, Mohammed Thasleem wrote:
>> Cache xe_device struct info for lease fd before perpare crtc
>> with lessee's fd.
>
> I think we should add why this is required for this test.
>
>
>>
>> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
>> ---
>> tests/kms_lease.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
>> index 8ac58af38..e57aea2a2 100644
>> --- a/tests/kms_lease.c
>> +++ b/tests/kms_lease.c
>> @@ -48,6 +48,8 @@
>> #include <drm.h>
>> #include "igt_device.h"
>> +#include "xe_drm.h"
>> +#include "xe/xe_query.h"
>> /**
>> * SUBTEST: atomic-implicit-crtc
>> @@ -305,6 +307,10 @@ static void simple_lease(data_t *data)
>> /* Create a valid lease */
>> igt_assert_eq(make_lease(data), 0);
>> + /* Cache xe_device struct */
>> + if (is_xe_device(data->lease.fd))
>> + xe_device_get(data->lease.fd);
>
>
> I wonder this will be required for other subtests too.
>
> I think we should call this in make_lease(), after create_lease() is
> successful and we get file descriptor for the lease.
Missed to mention, we also need to remove it with xe_device_put, while
terminating the lease.
Regards,
Ankit
>
>
> Regards,
>
> Ankit
>
>
>
>> +
>> igt_display_require(&data->lease.display, data->lease.fd);
>> /* Set a mode on the leased output */
>> @@ -772,6 +778,10 @@ static void lease_revoke(data_t *data)
>> /* Create a valid lease */
>> igt_assert_eq(make_lease(data), 0);
>> + /* Cache xe_device struct */
>> + if (is_xe_device(data->lease.fd))
>> + xe_device_get(data->lease.fd);
>> +
>> igt_display_require(&data->lease.display, data->lease.fd);
>> /* try to revoke an invalid lease */
next prev parent reply other threads:[~2023-12-22 7:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 10:07 [PATCH i-g-t] tests/kms_lease: Cache xe_device info for lease fd Mohammed Thasleem
2023-12-12 11:49 ` ✗ Fi.CI.BAT: failure for " Patchwork
2023-12-12 12:16 ` ✓ CI.xeBAT: success " Patchwork
2023-12-13 5:50 ` [PATCH i-g-t] " Nautiyal, Ankit K
2023-12-22 7:04 ` Nautiyal, Ankit K [this message]
2023-12-22 7:04 ` Nautiyal, Ankit K
2023-12-22 13:07 ` [PATCH i-g-t v2] " Mohammed Thasleem
2023-12-26 8:09 ` Mohammed Thasleem
2023-12-26 8:47 ` Nautiyal, Ankit K
2023-12-26 8:47 ` Nautiyal, Ankit K
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=b52a2b39-cc88-4655-955b-f7739f0a778b@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mohammed.thasleem@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