From: Maxime Ripard <mripard@kernel.org>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, "Syrjala,
Ville" <ville.syrjala@intel.com>
Subject: Re: [PATCH 2/6] drm/i915: Use the STATE_CHECK_* macros in the pipe config comparison
Date: Tue, 24 Nov 2026 14:18:34 +0100 [thread overview]
Message-ID: <awWEUcxy-DwDxu2H@houat> (raw)
In-Reply-To: <60d2980ef8dfe909b30186396b90b6eac01df3ed@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2662 bytes --]
Hi Jani,
On Tue, Nov 24, 2026 at 01:23:51PM +0200, Jani Nikula wrote:
> On Tue, 24 Nov 2026, Maxime Ripard <mripard@kernel.org> wrote:
> > The state readout framework provides the STATE_CHECK_* macros and
> > drm_atomic_helper_print_state_mismatch() to compare two state
> > instances field by field and report the mismatches through a drm
> > printer.
> >
> > intel_pipe_config_compare() implements the very same thing with its
> > own set of PIPE_CONF_CHECK_* macros printing through the
> > pipe_config_mismatch() helper, duplicating the framework.
> >
> > Rework the plain field checks on top of the STATE_CHECK_* macros,
> > sorting every PIPE_CONF_CHECK_I() and PIPE_CONF_CHECK_X() call site
> > onto the variant matching its field type: STATE_CHECK_BOOL(), _S32(),
> > _ENUM(), _U8(), _U16(), _U32(), _U64() and _PTR(), along with the
> > _U8_X(), _U16_X() and _U32_X() hexadecimal counterparts. The
> > static_assert() of each macro then checks the field type at compile
> > time, which the untyped PIPE_CONF_CHECK_I() and _X() macros couldn't
> > do, and PIPE_CONF_CHECK_LLI() becomes a STATE_CHECK_U64() based check
> > that also prints its u64 fields properly.
> >
> > The checks without a framework counterpart, namely the masked, flags,
> > M/N, DPLL, timings, rectangle, infoframe, DP SDP, ELD buffer, color
> > LUT and CSC ones, along with the infoframe, SDP, buffer and PLL
> > mismatch reporters, print their header through
> > drm_atomic_helper_print_state_mismatch() instead.
> > pipe_config_mismatch() isn't needed anymore and gets removed.
> >
> > The mismatch messages change format in the process, from
> >
> > [CRTC:31:pipe A] fastset requirement not met in hw.enable (expected yes, found no)
> >
> > to
> >
> > pipe A configuration mismatch in hw.enable (expected yes, got no)
>
> I think the "fastset requirement not met" vs. "mismatch" distinction has
> been a useful one. People tend to think a "mismatch" is always an error,
> regardless of the loglevel. We know, because we deliberately added the
> distinction about three years ago to unconfuse people...
>
> We've also put in a lot of effort to have a fairly uniform drm object
> logging prefix all over the place. It would be a shame to lose it,
> because over time you get used to searching the dmesg with that format.
So I guess your preference would be for the new framework code to follow
the same convention?
And it looks like the "fastset" path doesn't really translate to
anything (yet?) in the helpers, so maybe we could only convert the
pipe_config_mismatch() path for now?
How does that sound?
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2026-11-24 13:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 10:59 [PATCH 0/6] drm/i915: Support DRM_MODE_ATOMIC_RESET Maxime Ripard
2026-11-24 10:59 ` [PATCH 1/6] drm/atomic-state-helper: Provide more STATE_CHECK_* variants Maxime Ripard
2026-11-24 10:59 ` [PATCH 2/6] drm/i915: Use the STATE_CHECK_* macros in the pipe config comparison Maxime Ripard
2026-11-24 11:23 ` Jani Nikula
2026-11-24 13:18 ` Maxime Ripard [this message]
2026-11-24 10:59 ` [PATCH 3/6] drm/i915: Implement CRTC atomic_create_state Maxime Ripard
2026-11-24 11:26 ` sashiko-bot
2026-11-24 10:59 ` [PATCH 4/6] drm/i915: Implement plane atomic_create_state Maxime Ripard
2026-11-24 11:19 ` sashiko-bot
2026-11-24 10:59 ` [PATCH 5/6] drm/i915: Implement connector atomic_create_state Maxime Ripard
2026-11-24 11:21 ` sashiko-bot
2026-11-24 10:59 ` [PATCH 6/6] drm/i915: Carry the current state over created states Maxime Ripard
2026-11-24 11:40 ` sashiko-bot
2026-11-24 13:29 ` Ville Syrjälä
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=awWEUcxy-DwDxu2H@houat \
--to=mripard@kernel.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
--cc=ville.syrjala@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