From: Jani Nikula <jani.nikula@intel.com>
To: Melissa Wen <mwen@igalia.com>,
Petri Latvala <adrinael@adrinael.net>,
Arkadiusz Hiler <arek@hiler.eu>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
Bhanuprakash Modem <bhanuprakash.modem@gmail.com>,
Ashutosh Dixit <ashutosh.dixit@intel.com>,
Karthik B S <karthik.b.s@intel.com>
Cc: igt-dev@lists.freedesktop.org, kernel-dev@igalia.com,
Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
Alex Hung <alex.hung@amd.com>,
Swati Sharma <swati2.sharma@intel.com>,
John Harrison <John.Harrison@Igalia.com>,
Rodrigo Siqueira <siqueira@igalia.com>,
Simon Ser <contact@emersion.fr>, Xaver Hugl <xaver.hugl@kde.org>,
Harry Wentland <harry.wentland@amd.com>,
Uma Shankar <uma.shankar@intel.com>
Subject: Re: [PATCH i-g-t v5 8/8] lib/igt_kms: add macros to iterate color pipelines and colorops
Date: Wed, 09 Sep 2026 11:31:56 +0300 [thread overview]
Message-ID: <110476a208e2b02296b9aff130db98487252ca3a@intel.com> (raw)
In-Reply-To: <956430d0a9eb201f13c963575556568bc89fc1b3@intel.com>
On Thu, 03 Sep 2026, Jani Nikula <jani.nikula@intel.com> wrote:
> On Wed, 02 Sep 2026, Melissa Wen <mwen@igalia.com> wrote:
>> @@ -1027,6 +1028,31 @@ uint64_t igt_colorop_get_prop(igt_display_t *display, igt_colorop_t *colorop, en
>> igt_colorop_set_prop_changed(colorop, prop); \
>> } while (0)
>>
>> +/**
>> + * for_each_color_pipeline:
>> + * @plane: plane to which the color pipelines belong
>> + * @color_pipeline: the color pipeline to iterate
>> + *
>> + * Iterates through all color pipelines supported by @plane. If no color
>> + * pipeline is supported, nothing happens.
>> + */
>> +#define for_each_color_pipeline(plane, color_pipeline) \
>> + for (int igt_unique(__i) = 0; \
>> + igt_unique(__i) < (plane)->num_color_pipelines && \
>> + ((color_pipeline) = (plane)->color_pipelines[igt_unique(__i)], true); \
>> + igt_unique(__i)++)
>
> Hmm, I wonder if this is robust. igt_unique() is currently based on
> __LINE__, and that might work through being expanded based on the macro
> instantiation line instead of the macro definition lines here. If
> igt_unique() ever becomes truly unique, it certainly breaks, because the
> above will contain four different unique identifiers instead of one. But
> it's not silent, it'll break the build.
Okay, looks like there's a lot of this type of igt_unique() usage in
igt. Not sure how I feel about it. :/
It's all exposed by making igt_unique() actually unique:
#define igt_unique(prefix) \
- igt_tokencat(igt_tokencat(__igt_unique__, prefix), __LINE__)
+ igt_tokencat(igt_tokencat(__igt_unique__, prefix), __COUNTER__)
So I guess the patch at hand doesn't make things any worse, really.
BR,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-09-09 8:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 17:58 [PATCH i-g-t v5 0/8] test/kms_colorop_helper: don't request colorop updates indefinitely Melissa Wen
2026-09-02 17:58 ` [PATCH i-g-t v5 1/8] lib/igt_kms: clear colorop-changed flag after commit Melissa Wen
2026-09-02 17:58 ` [PATCH i-g-t v5 2/8] tests/kms_colorop_helper: only check if a given enum value exists Melissa Wen
2026-09-02 17:58 ` [PATCH i-g-t v5 3/8] tests/kms_properties: don't check colorop if no plane color pipeline prop Melissa Wen
2026-09-02 17:58 ` [PATCH i-g-t v5 4/8] tests/kms_properties: give non-primary planes their own fb Melissa Wen
2026-09-02 17:58 ` [PATCH i-g-t v5 5/8] lib/igt_kms: extend igt_plane_set_color_pipeline to accept Bypass Melissa Wen
2026-09-09 7:54 ` Borah, Chaitanya Kumar
2026-09-02 17:58 ` [PATCH i-g-t v5 6/8] tests/kms_properties: check colorop properties on active color pipelines Melissa Wen
2026-09-09 7:55 ` Borah, Chaitanya Kumar
2026-09-02 17:58 ` [PATCH i-g-t v5 7/8] tests/intel/kms_color_pipeline: move driver-specific test to intel's folder Melissa Wen
2026-09-08 19:17 ` Sharma, Swati2
2026-09-09 7:56 ` Borah, Chaitanya Kumar
2026-09-02 17:58 ` [PATCH i-g-t v5 8/8] lib/igt_kms: add macros to iterate color pipelines and colorops Melissa Wen
2026-09-03 10:44 ` Jani Nikula
2026-09-09 8:31 ` Jani Nikula [this message]
2026-09-09 7:56 ` Borah, Chaitanya Kumar
2026-09-02 23:19 ` ✓ Xe.CI.BAT: success for test/kms_colorop_helper: don't request colorop updates indefinitely (rev3) Patchwork
2026-09-02 23:22 ` ✗ i915.CI.BAT: failure " Patchwork
2026-09-03 15:30 ` ✗ 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=110476a208e2b02296b9aff130db98487252ca3a@intel.com \
--to=jani.nikula@intel.com \
--cc=John.Harrison@Igalia.com \
--cc=adrinael@adrinael.net \
--cc=alex.hung@amd.com \
--cc=arek@hiler.eu \
--cc=ashutosh.dixit@intel.com \
--cc=bhanuprakash.modem@gmail.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=contact@emersion.fr \
--cc=harry.wentland@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=karthik.b.s@intel.com \
--cc=kernel-dev@igalia.com \
--cc=mwen@igalia.com \
--cc=siqueira@igalia.com \
--cc=swati2.sharma@intel.com \
--cc=uma.shankar@intel.com \
--cc=xaver.hugl@kde.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 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.