From: Javier Martinez Canillas <javierm@redhat.com>
To: Maxime Ripard <mripard@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Anusha Srivatsa <asrivats@redhat.com>,
Francesco Dolcini <francesco@dolcini.it>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Maxime Ripard <mripard@kernel.org>
Subject: Re: [PATCH v2 3/5] drm/panel: panel-simple: Make panel_simple_probe return its panel
Date: Fri, 27 Jun 2025 11:10:53 +0200 [thread overview]
Message-ID: <875xghczxe.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20250626-drm-panel-simple-fixes-v2-3-5afcaa608bdc@kernel.org>
Maxime Ripard <mripard@kernel.org> writes:
> In order to fix the regession introduced by commit de04bb0089a9
> ("drm/panel/panel-simple: Use the new allocation in place of
> devm_kzalloc()"), we need to move the panel_desc lookup into the common
> panel_simple_probe() function.
>
> There's two callers for that function, the probe implementations of the
> platform and MIPI-DSI drivers panel-simple implements.
>
> The MIPI-DSI driver's probe will need to access the current panel_desc
> to initialize properly, which won't be possible anymore if we make that
> lookup in panel_simple_probe().
>
> However, we can make panel_simple_probe() return the initialized
> panel_simple structure it allocated, which will contain a pointer to the
> associated panel_desc in its desc field.
>
> This doesn't fix de04bb0089a9 ("drm/panel/panel-simple: Use the new
> allocation in place of devm_kzalloc()") still, but makes progress
> towards that goal.
>
> Fixes: de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()")
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
[...]
> -static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
> +static struct panel_simple *panel_simple_probe(struct device *dev, const struct panel_desc *desc)
> {
[...]
>
> ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
> if (ddc) {
> panel->ddc = of_find_i2c_adapter_by_node(ddc);
> of_node_put(ddc);
>
> if (!panel->ddc)
> - return -EPROBE_DEFER;
> + return ERR_PTR(-EPROBE_DEFER);
Not related with your patch, but it would be great to also add a
dev_err_probe() here to record the reason of this probe deferral.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2025-06-27 9:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 10:04 [PATCH v2 0/5] drm/panel: panel-simple: Fix panel-dpi probe error Maxime Ripard
2025-06-26 10:04 ` [PATCH v2 1/5] drm/mipi-dsi: Add dev_is_mipi_dsi function Maxime Ripard
2025-06-27 9:04 ` Javier Martinez Canillas
2025-06-27 9:25 ` Maxime Ripard
2025-06-27 9:34 ` Javier Martinez Canillas
2025-06-26 10:05 ` [PATCH v2 2/5] drm/panel: panel-simple: make panel_dpi_probe return a panel_desc Maxime Ripard
2025-06-27 9:06 ` Javier Martinez Canillas
2025-06-26 10:05 ` [PATCH v2 3/5] drm/panel: panel-simple: Make panel_simple_probe return its panel Maxime Ripard
2025-06-27 9:10 ` Javier Martinez Canillas [this message]
2025-06-26 10:05 ` [PATCH v2 4/5] drm/panel: panel-simple: Add function to look panel data up Maxime Ripard
2025-06-27 9:12 ` Javier Martinez Canillas
2025-06-26 10:05 ` [PATCH v2 5/5] drm/panel: panel-simple: get rid of panel_dpi hack Maxime Ripard
2025-06-27 9:13 ` Javier Martinez Canillas
2025-06-26 10:21 ` [PATCH v2 0/5] drm/panel: panel-simple: Fix panel-dpi probe error Francesco Dolcini
2025-06-27 9:24 ` Maxime Ripard
2025-06-27 9:24 ` Maxime Ripard
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=875xghczxe.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=asrivats@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=francesco@dolcini.it \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®