From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
<igt-dev@lists.freedesktop.org>,
Kunal Joshi <kunal1.joshi@intel.com>
Subject: Re: [PATCH i-g-t 1/6] tests/intel/kms_mst_helper: add helper for MST-related functions
Date: Tue, 11 Feb 2025 18:14:21 +0530 [thread overview]
Message-ID: <95f3a5e7-f8e9-42d2-ad2e-ae2138a71b50@intel.com> (raw)
In-Reply-To: <20250211083412.vzt4pgqoyy4fpjwq@kamilkon-desk.igk.intel.com>
On 2/11/2025 2:04 PM, Kamil Konieczny wrote:
> Hi Nautiyal,,
> On 2025-02-11 at 09:27:31 +0530, Nautiyal, Ankit K wrote:
> one nit about years in copyrights, see below.
>
>> On 2/11/2025 12:26 AM, Kunal Joshi wrote:
>>> Add helper to centralize commonly used MST-related logic.
>>> igt_find_all_mst_output_in_topology() enumerates MST outputs
>>> that share the same root connector id.
>>>
>>> v2: fix docs (Ankit)
>>> change return type to int (Ankit)
>>> split patch (Ankit)
>>>
>>> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>>> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
>>> ---
>>> tests/intel/kms_mst_helper.c | 49 ++++++++++++++++++++++++++++++++++++
>>> tests/intel/kms_mst_helper.h | 15 +++++++++++
>>> 2 files changed, 64 insertions(+)
>>> create mode 100644 tests/intel/kms_mst_helper.c
>>> create mode 100644 tests/intel/kms_mst_helper.h
>>>
>>> diff --git a/tests/intel/kms_mst_helper.c b/tests/intel/kms_mst_helper.c
>>> new file mode 100644
>>> index 000000000..fb5aaab77
>>> --- /dev/null
>>> +++ b/tests/intel/kms_mst_helper.c
>>> @@ -0,0 +1,49 @@
>>> +/* SPDX-License-Identifier: MIT */
>>> +/*
>>> + * Copyright © 2023 Intel Corporation
>> s/2023/2025
>>
> Please do not remove old years, rather add new one(s), imho:
>
> s/ 2023 / 2023-2025 /
This is a new file created this year. So there is no old year as far as
I understand.
Regards,
Ankit
>
> Regards,
> Kamil
>
>>> + */
>>> +
>>> +#include "kms_mst_helper.h"
>>> +
>>> +/*
>>> + * @drm_fd: DRM file descriptor
>>> + * @display: pointer to #igt_display_t structure
>>> + * @output: target output
>>> + * @mst_outputs: filled with mst output of same toplogy as @output
>>> + * @num_mst_outputs: filled with count of mst outputs found in topology
>>> + *
>>> + * Iterates over all connected outputs and adds each DP MST
>>> + * output that shares the same MST connector ID as @output
>>> + * into @mst_outputs.
>>> + *
>>> + * Returns: 0 on success, -1 on failure
>> Just return the ERROR code.
>>
>>
>>> + */
>>> +int igt_find_all_mst_output_in_topology(int drm_fd, igt_display_t *display,
>>> + igt_output_t *output,
>>> + igt_output_t *mst_outputs[],
>>> + int *num_mst_outputs)
>>> +{
>>> + int output_root_id, root_id;
>>> + igt_output_t *connector_output;
>>> +
>>> + if (!igt_check_output_is_dp_mst(output))
>>> + return -1;
>> return -EINVAL
>>
>>
>>> +
>>> + output_root_id = igt_get_dp_mst_connector_id(output);
>>> + if (output_root_id == -EINVAL)
>>> + return -1;
>> return -EINVAL
>>
>>
>>> +
>>> + /*
>>> + * If output is MST, check all other connected output which shares
>>> + * same path and fill mst_outputs and num_mst_outputs
>>> + */
>>> + for_each_connected_output(display, connector_output) {
>>> + if (!igt_check_output_is_dp_mst(connector_output))
>>> + continue;
>>> +
>>> + root_id = igt_get_dp_mst_connector_id(connector_output);
>>> + if (((*num_mst_outputs) < IGT_MAX_PIPES) && root_id == output_root_id)
>>> + mst_outputs[(*num_mst_outputs)++] = connector_output;
>>> + }
>>> + return 0;
>>> +}
>>> diff --git a/tests/intel/kms_mst_helper.h b/tests/intel/kms_mst_helper.h
>>> new file mode 100644
>>> index 000000000..637ca696e
>>> --- /dev/null
>>> +++ b/tests/intel/kms_mst_helper.h
>>> @@ -0,0 +1,15 @@
>>> +/* SPDX-License-Identifier: MIT */
>>> +/*
>>> + * Copyright © 2023 Intel Corporation
>> s/2023/2025
>>
>>
>> Regards,
>>
>> Ankit
>>
>>> + */
>>> +
>>> +#ifndef KMS_MST_HELPER_H
>>> +#define KMS_MST_HELPER_H
>>> +
>>> +#include "igt.h"
>>> +
>>> +int igt_find_all_mst_output_in_topology(int drm_fd, igt_display_t *display,
>>> + igt_output_t *output,
>>> + igt_output_t *mst_outputs[],
>>> + int *num_mst_outputs);
>>> +#endif
next prev parent reply other threads:[~2025-02-11 12:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 18:56 [PATCH i-g-t 0/6] add dsc-fallback test Kunal Joshi
2025-02-10 18:56 ` [PATCH i-g-t 1/6] tests/intel/kms_mst_helper: add helper for MST-related functions Kunal Joshi
2025-02-11 3:57 ` Nautiyal, Ankit K
2025-02-11 8:34 ` Kamil Konieczny
2025-02-11 12:44 ` Nautiyal, Ankit K [this message]
2025-02-10 18:56 ` [PATCH i-g-t 2/6] tests/intel/kms_dp_linktrain_fallback: reuse from mst helper lib Kunal Joshi
2025-02-11 4:03 ` Nautiyal, Ankit K
2025-02-10 18:56 ` [PATCH i-g-t 3/6] tests/intel/kms_dp_linktrain_fallback: refactor dp-fallback subtest Kunal Joshi
2025-02-11 5:04 ` Nautiyal, Ankit K
2025-02-10 18:56 ` [PATCH i-g-t 4/6] tests/intel/kms_dp_linktrain_fallback: add dsc-fallback test Kunal Joshi
2025-02-11 5:27 ` Nautiyal, Ankit K
2025-02-10 18:56 ` [PATCH i-g-t 5/6] tests/intel/kms_dp_linktrain_fallback: disable ignore long hpd Kunal Joshi
2025-02-11 5:30 ` Nautiyal, Ankit K
2025-02-10 18:56 ` [PATCH i-g-t 6/6] HAX: Do not merge Kunal Joshi
2025-02-10 23:59 ` ✗ i915.CI.BAT: failure for add dsc-fallback test (rev3) Patchwork
2025-02-11 0:04 ` ✗ Xe.CI.BAT: " Patchwork
2025-02-11 11:15 ` ✗ Xe.CI.Full: " Patchwork
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=95f3a5e7-f8e9-42d2-ad2e-ae2138a71b50@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=kunal1.joshi@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