From: "Joshi, Kunal1" <kunal1.joshi@intel.com>
To: "Sharma, Swati2" <swati2.sharma@intel.com>,
<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode
Date: Wed, 17 Jan 2024 11:14:43 +0530 [thread overview]
Message-ID: <8fbaa612-67e2-4d7d-9f0b-eefd394ddf93@intel.com> (raw)
In-Reply-To: <6f95475b-1d5c-43ba-9fe3-310475ef7898@intel.com>
Hello Swati,
On 1/16/2024 5:33 PM, Sharma, Swati2 wrote:
> Hi Kunal,
>
> On 16-Jan-24 5:29 PM, Joshi, Kunal1 wrote:
>> Hello Swati,
>>
>> On 1/16/2024 4:34 PM, Sharma, Swati2 wrote:
>>> Hi Kunal,
>>>
>>> On 15-Jan-24 4:28 PM, Kunal Joshi wrote:
>>>> add support to choose big joiner mode with environment
>>>> variable, use mode with highest clock if no mode with big joiner
>>>> found.
>>>>
>>>> v2: reuse bigjoiner_mode_found (Bhanu)
>>>> v3: avoid returning from multiple places (Bhanu)
>>>> avoid frequent debugfs reads (Bhanu)
>>>>
>>>> Cc: Karthik B S <karthik.b.s@intel.com>
>>>> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>>>> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
>>>> ---
>>>> lib/igt_kms.c | 24 +++++++++++++++++++-----
>>>> 1 file changed, 19 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>>>> index cb6d57c2d..2c4210d4b 100644
>>>> --- a/lib/igt_kms.c
>>>> +++ b/lib/igt_kms.c
>>>> @@ -1771,8 +1771,9 @@ void
>>>> igt_sort_connector_modes(drmModeConnector *connector,
>>>> bool kmstest_get_connector_default_mode(int drm_fd,
>>>> drmModeConnector *connector,
>>>> drmModeModeInfo *mode)
>>>> {
>>>> + bool found;
>>>> char *env;
>>>> - int i;
>>>> + int i, max_dotclock;
>>>> if (!connector->count_modes) {
>>>> igt_warn("no modes for connector %d\n",
>>>> @@ -1781,21 +1782,34 @@ bool kmstest_get_connector_default_mode(int
>>>> drm_fd, drmModeConnector *connector,
>>>> }
>>>> env = getenv("IGT_KMS_RESOLUTION");
>>>> + max_dotclock = igt_get_max_dotclock(drm_fd);
>>>> if (env) {
>>>> /*
>>>> - * Only (0 or 1) and (lowest or highest) are allowed.
>>>> + * Only (0 or 1 or 2) and (lowest or highest or joiner)
>>>> are allowed.
>>>> *
>>>> * 0/lowest: Choose connector mode with lowest possible
>>>> resolution.
>>>> * 1/highest: Choose connector mode with highest possible
>>>> resolution.
>>>> + * 2/joiner: Choose connector mode with bigjoiner support
>>>> or with
>>>> + highest clock if can't support big joiner
>>>
>>> Shouldn't this be only joiner mode?
>>>
>>>
>> You mean can be named as joiner mode because same can be used for big
>> joiner / ultra joiner?
>
> I guess this should be bigjoiner mode only. For ultra there might be
> other restrictions which we need to look at.
>
>> or
>> We are returning the highest clock mode if no big joiner mode found?
>
> Yes, this is my query here. Why are we returning highest clock mode if
> no big joiner mode found?
>
We can return either with highest clock or highest resolution or default
mode,
Since we have the other two already covered used highest clock.
>>>> */
>>>> - if (!strcmp(env, "highest") || !strcmp(env, "1"))
>>>> + if (!strcmp(env, "joiner") || !strcmp(env, "2"))
>>>> + found = bigjoiner_mode_found(drm_fd, connector,
>>>> + sort_drm_modes_by_clk_dsc,mode,
>>>> + max_dotclock) ||
>>>> + bigjoiner_mode_found(drm_fd, connector,
>>>> + sort_drm_modes_by_res_dsc, mode,
>>>> + max_dotclock) ||
>>>> + bigjoiner_mode_found(drm_fd, connector,
>>>> + sort_drm_modes_by_clk_dsc, mode,
>>>> + max_dotclock);
>>>> + else if (!strcmp(env, "highest") || !strcmp(env, "1"))
>>>> igt_sort_connector_modes(connector,
>>>> sort_drm_modes_by_res_dsc);
>>>> else if (!strcmp(env, "lowest") || !strcmp(env, "0"))
>>>> igt_sort_connector_modes(connector,
>>>> sort_drm_modes_by_res_asc);
>>>> else
>>>> goto default_mode;
>>>> -
>>>> - *mode = connector->modes[0];
>>>> + if (!found)
>>>> + *mode = connector->modes[0];
>>>> return true;
>>>> }
WARNING: multiple messages have this Message-ID (diff)
From: "Joshi, Kunal1" <kunal1.joshi@intel.com>
To: "Sharma, Swati2" <swati2.sharma@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode
Date: Wed, 17 Jan 2024 11:14:43 +0530 [thread overview]
Message-ID: <8fbaa612-67e2-4d7d-9f0b-eefd394ddf93@intel.com> (raw)
Message-ID: <20240117054443.psQ18Ppcljyne8Xrm3a2h7dlf4rAeczRF8e8pikZ8e8@z> (raw)
In-Reply-To: <6f95475b-1d5c-43ba-9fe3-310475ef7898@intel.com>
Hello Swati,
On 1/16/2024 5:33 PM, Sharma, Swati2 wrote:
> Hi Kunal,
>
> On 16-Jan-24 5:29 PM, Joshi, Kunal1 wrote:
>> Hello Swati,
>>
>> On 1/16/2024 4:34 PM, Sharma, Swati2 wrote:
>>> Hi Kunal,
>>>
>>> On 15-Jan-24 4:28 PM, Kunal Joshi wrote:
>>>> add support to choose big joiner mode with environment
>>>> variable, use mode with highest clock if no mode with big joiner
>>>> found.
>>>>
>>>> v2: reuse bigjoiner_mode_found (Bhanu)
>>>> v3: avoid returning from multiple places (Bhanu)
>>>> avoid frequent debugfs reads (Bhanu)
>>>>
>>>> Cc: Karthik B S <karthik.b.s@intel.com>
>>>> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>>>> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
>>>> ---
>>>> lib/igt_kms.c | 24 +++++++++++++++++++-----
>>>> 1 file changed, 19 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>>>> index cb6d57c2d..2c4210d4b 100644
>>>> --- a/lib/igt_kms.c
>>>> +++ b/lib/igt_kms.c
>>>> @@ -1771,8 +1771,9 @@ void
>>>> igt_sort_connector_modes(drmModeConnector *connector,
>>>> bool kmstest_get_connector_default_mode(int drm_fd,
>>>> drmModeConnector *connector,
>>>> drmModeModeInfo *mode)
>>>> {
>>>> + bool found;
>>>> char *env;
>>>> - int i;
>>>> + int i, max_dotclock;
>>>> if (!connector->count_modes) {
>>>> igt_warn("no modes for connector %d\n",
>>>> @@ -1781,21 +1782,34 @@ bool kmstest_get_connector_default_mode(int
>>>> drm_fd, drmModeConnector *connector,
>>>> }
>>>> env = getenv("IGT_KMS_RESOLUTION");
>>>> + max_dotclock = igt_get_max_dotclock(drm_fd);
>>>> if (env) {
>>>> /*
>>>> - * Only (0 or 1) and (lowest or highest) are allowed.
>>>> + * Only (0 or 1 or 2) and (lowest or highest or joiner)
>>>> are allowed.
>>>> *
>>>> * 0/lowest: Choose connector mode with lowest possible
>>>> resolution.
>>>> * 1/highest: Choose connector mode with highest possible
>>>> resolution.
>>>> + * 2/joiner: Choose connector mode with bigjoiner support
>>>> or with
>>>> + highest clock if can't support big joiner
>>>
>>> Shouldn't this be only joiner mode?
>>>
>>>
>> You mean can be named as joiner mode because same can be used for big
>> joiner / ultra joiner?
>
> I guess this should be bigjoiner mode only. For ultra there might be
> other restrictions which we need to look at.
>
>> or
>> We are returning the highest clock mode if no big joiner mode found?
>
> Yes, this is my query here. Why are we returning highest clock mode if
> no big joiner mode found?
>
We can return either with highest clock or highest resolution or default
mode,
Since we have the other two already covered used highest clock.
>>>> */
>>>> - if (!strcmp(env, "highest") || !strcmp(env, "1"))
>>>> + if (!strcmp(env, "joiner") || !strcmp(env, "2"))
>>>> + found = bigjoiner_mode_found(drm_fd, connector,
>>>> + sort_drm_modes_by_clk_dsc,mode,
>>>> + max_dotclock) ||
>>>> + bigjoiner_mode_found(drm_fd, connector,
>>>> + sort_drm_modes_by_res_dsc, mode,
>>>> + max_dotclock) ||
>>>> + bigjoiner_mode_found(drm_fd, connector,
>>>> + sort_drm_modes_by_clk_dsc, mode,
>>>> + max_dotclock);
>>>> + else if (!strcmp(env, "highest") || !strcmp(env, "1"))
>>>> igt_sort_connector_modes(connector,
>>>> sort_drm_modes_by_res_dsc);
>>>> else if (!strcmp(env, "lowest") || !strcmp(env, "0"))
>>>> igt_sort_connector_modes(connector,
>>>> sort_drm_modes_by_res_asc);
>>>> else
>>>> goto default_mode;
>>>> -
>>>> - *mode = connector->modes[0];
>>>> + if (!found)
>>>> + *mode = connector->modes[0];
>>>> return true;
>>>> }
next prev parent reply other threads:[~2024-01-17 5:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 10:58 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi
2024-01-15 10:58 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi
2024-01-15 10:58 ` [PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode Kunal Joshi
2024-01-16 11:04 ` Sharma, Swati2
2024-01-16 11:59 ` Joshi, Kunal1
2024-01-16 11:59 ` Joshi, Kunal1
2024-01-16 12:03 ` Sharma, Swati2
2024-01-17 5:44 ` Joshi, Kunal1 [this message]
2024-01-17 5:44 ` Joshi, Kunal1
2024-01-17 8:55 ` Sharma, Swati2
2024-01-17 9:14 ` Joshi, Kunal1
2024-01-18 9:10 ` Modem, Bhanuprakash
2024-01-18 9:14 ` Joshi, Kunal1
2024-01-18 10:38 ` Nautiyal, Ankit K
2024-01-18 11:28 ` Joshi, Kunal1
2024-01-18 14:15 ` Sharma, Swati2
2024-01-15 11:41 ` ✓ CI.xeBAT: success for add support for choosing big joiner mode (rev2) Patchwork
2024-01-15 12:01 ` ✓ Fi.CI.BAT: " Patchwork
2024-01-15 13:24 ` ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-01-18 10:46 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi
2024-01-18 10:46 ` [PATCH i-g-t 2/2] lib/igt_kms: " Kunal Joshi
2024-01-12 8:55 [PATCH i-g-t 0/2] " Kunal Joshi
2024-01-12 8:55 ` [PATCH i-g-t 2/2] lib/igt_kms: " Kunal Joshi
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=8fbaa612-67e2-4d7d-9f0b-eefd394ddf93@intel.com \
--to=kunal1.joshi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@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