Hi Jani,

On Tue, Nov 24, 2026 at 01:23:51PM +0200, Jani Nikula wrote:
> On Tue, 24 Nov 2026, Maxime Ripard <[email protected]> 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: signature.asc
Description: PGP signature

Reply via email to