From: Maxime Ripard <mripard@kernel.org>
To: "Màxim Pedraza Padilla" <maximpedraza@gmail.com>
Cc: "Neil Armstrong" <neil.armstrong@linaro.org>,
"Jessica Zhang" <jesszhan0024@gmail.com>,
"Jyri Sarha" <jyri.sarha@iki.fi>,
"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Robert Foss" <rfoss@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] drm/tilcdc: Implement state readout
Date: Mon, 16 Nov 2026 17:50:31 +0100 [thread overview]
Message-ID: <avszNevIGlq-SKmp@houat> (raw)
In-Reply-To: <20261116142707.1299360-1-maximpedraza@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3962 bytes --]
On Mon, Nov 16, 2026 at 03:27:03PM +0100, Màxim Pedraza Padilla wrote:
> Hi Maxime,
>
> Following your suggestion in the boot logo thread ("just implement readout
> then"), this implements hardware state readout for tilcdc on top of your
> v7:
>
> https://lore.kernel.org/r/20261029-drm-state-readout-v7-0-25e5163d75c3@kernel.org
Awesome, thanks a lot for that. I was working on sending v9 today, so
it's a nice timing :)
There's some redundancy with some work I sent since v7, but it looks
pretty ok.
> The goal is that the kernel takes over the display as U-Boot left it, so
> the boot logo stays on screen with no blanking or flicker until userspace
> replaces it.
>
> Patch 1 adds an atomic_sro_install_state hook to bridges, and patch 2 uses
> it in the panel bridge, which also reads out the connector and bridge
> state: without that, the core discards the readout of any driver behind a
> panel. Patch 3 is the tilcdc readout itself: CRTC mode from the raster
> timings, primary plane with a non-GEM framebuffer (as tidss does), encoder
> and hw_reset. Patch 4 keeps panel-simple from turning the panel off at
> probe by driving its enable GPIO low.
>
> For the backlight, pwm-tiecap needs a .get_state(), otherwise pwm_bl sees
> the PWM disabled and sets duty 0 until the panel is enabled. I sent that
> one separately to Uwe and linux-pwm:
>
> https://lore.kernel.org/r/20261116142251.1296742-1-maximpedraza@gmail.com
>
> Tested on an AM335x board (Fides T075, out-of-tree DT) with U-Boot
> leaving an 800x480 RGB565 logo:
> - The logo stays on screen, untouched, from U-Boot to userspace, with the
> backlight on all along.
> - The U-Boot mode doesn't match the one in the DT (16.94 MHz pixel clock
> and slightly different timings), so the first commit with the panel
> mode does a full modeset, as expected.
I'm not quite sure I understand what you meant here. If it does a full
modeset, I would expect to see some flicker?
> - First commits from userspace: a framebuffer flip without modeset, a full
> modeset to the panel mode, and ACTIVE=0 then 1. No WARN or oops.
> - With drm.atomic_readout=0 the old behaviour comes back: the raster stops
> and the first commit does a full modeset.
> - Without video set up by U-Boot nothing is adopted and the normal path is
> taken.
> - The SGX530 driver and a Qt EGLFS application take over from the adopted
> logo without visible glitches.
>
> The DT needs a reserved-memory node for the U-Boot framebuffer, and
> ti,no-reset-on-init on the GPIO banks (and on the PWMSS) so that ti-sysc
> doesn't reset the panel enable and backlight lines.
>
> The backlight needs some care. With the PWM configured by the bootloader
> and the pin muxed to it, the handover is seamless. If the bootloader drives
> the backlight some other way, for instance with the pin as a plain GPIO and
> the PWM stopped, the light goes off when the kernel muxes the pin to the
> PWM, until the panel is enabled. The bootloader has to leave the backlight
> in the state the kernel will read back.
>
> After each commit, the comparison still reports some mismatches. As far as
> I can tell they come from the core rather than from tilcdc, but I'd
> appreciate your view:
> - connector_mask and encoder_mask, on a commit that only changes the
> framebuffer: the connector is not part of the commit, so it's not read
> back.
Yeah, that's because I wasn't supporting partial pipeline updates in v7.
It should be fixed in v8 onwards.
> - mode_blob, after a modeset: the memcmp() includes the mode type, and
> DRM_MODE_TYPE_PREFERRED can't be read from the hardware.
Same thing here.
> - With ACTIVE=0: crtc, fb, enable, best_encoder and the bridge bus_cfg.
> The readout sees the raster stopped and can't tell enable=1/active=0
> from disabled.
Ditto.
I'll review each patches individually
Thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
prev parent reply other threads:[~2026-11-16 16:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 14:27 [RFC PATCH 0/4] drm/tilcdc: Implement state readout Màxim Pedraza Padilla
2026-11-16 14:27 ` [RFC PATCH 1/4] drm/bridge: Add atomic_sro_install_state hook Màxim Pedraza Padilla
2026-11-16 16:58 ` Maxime Ripard
2026-11-16 14:27 ` [RFC PATCH 2/4] drm/panel: Implement state readout in the panel bridge Màxim Pedraza Padilla
2026-11-16 16:59 ` Maxime Ripard
2026-11-16 14:27 ` [RFC PATCH 3/4] drm/tilcdc: Implement state readout support Màxim Pedraza Padilla
2026-11-16 17:12 ` Maxime Ripard
2026-11-16 14:27 ` [RFC PATCH 4/4] drm/panel: simple: Keep the enable GPIO as left by the bootloader Màxim Pedraza Padilla
2026-11-16 16:50 ` Maxime Ripard [this message]
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=avszNevIGlq-SKmp@houat \
--to=mripard@kernel.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jesszhan0024@gmail.com \
--cc=jonas@kwiboo.se \
--cc=jyri.sarha@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maximpedraza@gmail.com \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=ukleinek@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox