From: Aradhya Bhatia <aradhya.bhatia@linux.dev>
To: Jayesh Choudhary <j-choudhary@ti.com>,
jyri.sarha@iki.fi, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de,
dri-devel@lists.freedesktop.org, devarsht@ti.com,
tomi.valkeinen@ideasonboard.com
Cc: airlied@gmail.com, simona@ffwll.ch, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/tidss: oldi: convert to devm_drm_bridge_alloc() API
Date: Wed, 9 Jul 2025 23:07:09 +0100 [thread overview]
Message-ID: <b28cb9d6-a280-4d27-a987-d707ee0dadce@linux.dev> (raw)
In-Reply-To: <20250701055002.52336-1-j-choudhary@ti.com>
Hi Jayesh,
Thank you for testing the OLDI series out, and finding and reporting the
issue.
On 01/07/25 06:50, Jayesh Choudhary wrote:
> DRM bridges now uses "devm_drm_bridge_alloc()" for allocation and
> initialization. "devm_kzalloc()" is not allowed anymore and it results
> in WARNING. So convert it.
>
> Fixes: 7246e0929945 ("drm/tidss: Add OLDI bridge support")
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> ---
>
> Warning log:
> <https://gist.github.com/Jayesh2000/e42c235bb57cb0f0af06c8c3bf886ef2>
>
> drivers/gpu/drm/tidss/tidss_oldi.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c b/drivers/gpu/drm/tidss/tidss_oldi.c
> index 8223b8fec8ce..b0f99656e87e 100644
> --- a/drivers/gpu/drm/tidss/tidss_oldi.c
> +++ b/drivers/gpu/drm/tidss/tidss_oldi.c
> @@ -534,11 +534,10 @@ int tidss_oldi_init(struct tidss_device *tidss)
> continue;
> }
>
> - oldi = devm_kzalloc(tidss->dev, sizeof(*oldi), GFP_KERNEL);
> - if (!oldi) {
> - ret = -ENOMEM;
> - goto err_put_node;
> - }
> + oldi = devm_drm_bridge_alloc(tidss->dev, struct tidss_oldi, bridge,
> + &tidss_oldi_bridge_funcs);
> + if (IS_ERR(oldi))
> + return PTR_ERR(oldi);
The 'child' and 'oldi_parent' device nodes need to be put back before
the error is returned.
This should do it.
ret = PTR_ERR(oldi);
goto err_put_node;
>
> oldi->parent_vp = parent_vp;
> oldi->oldi_instance = oldi_instance;
> @@ -577,7 +576,6 @@ int tidss_oldi_init(struct tidss_device *tidss)
> /* Register the bridge. */
> oldi->bridge.of_node = child;
> oldi->bridge.driver_private = oldi;
> - oldi->bridge.funcs = &tidss_oldi_bridge_funcs;
> oldi->bridge.timings = &default_tidss_oldi_timings;
>
> tidss->oldis[tidss->num_oldis++] = oldi;
With that changed,
Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
--
Regards
Aradhya
prev parent reply other threads:[~2025-07-09 22:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 5:50 [PATCH] drm/tidss: oldi: convert to devm_drm_bridge_alloc() API Jayesh Choudhary
2025-07-08 6:21 ` Devarsh Thakkar
2025-07-09 22:07 ` Aradhya Bhatia [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=b28cb9d6-a280-4d27-a987-d707ee0dadce@linux.dev \
--to=aradhya.bhatia@linux.dev \
--cc=airlied@gmail.com \
--cc=devarsht@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=j-choudhary@ti.com \
--cc=jyri.sarha@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--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 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.