mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Aradhya Bhatia <aradhya.bhatia@linux.dev>
Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
	Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Swamil Jain <s-jain1@ti.com>, Devarsh Thakkar <devarsht@ti.com>,
	Louis Chauvet <louis.chauvet@bootlin.com>
Subject: Re: [PATCH v4 09/14] drm/tidss: oldi: Fix cleanup on a failed init
Date: Mon, 2 Nov 2026 13:46:32 +0200	[thread overview]
Message-ID: <15b7bfd9-8da4-4cd0-9f8b-634c03f46c5e@ideasonboard.com> (raw)
In-Reply-To: <c12f6a9f-983d-4704-a90b-3453ce984a2c@linux.dev>

Hi,

On 01/11/2026 16:14, Aradhya Bhatia wrote:
> Hi Tomi,
> 
> On 29/10/26 10:18, Tomi Valkeinen wrote:
>> tidss_oldi_init() registers a bridge for each OLDI TX in turn. If a later
>> OLDI TX fails, the bridges registered for the earlier ones are not
>> removed.
>>
>> Fix this by calling tidss_oldi_deinit() in the error path.
>>
>> Fixes: 7246e0929945 ("drm/tidss: Add OLDI bridge support")
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>> ---
>>   drivers/gpu/drm/tidss/tidss_oldi.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c b/drivers/gpu/drm/tidss/tidss_oldi.c
>> index 506507e83112..7344d86e1f13 100644
>> --- a/drivers/gpu/drm/tidss/tidss_oldi.c
>> +++ b/drivers/gpu/drm/tidss/tidss_oldi.c
>> @@ -638,5 +638,6 @@ int tidss_oldi_init(struct tidss_device *tidss)
>>   err_put_node:
>>   	of_node_put(child);
>>   	of_node_put(oldi_parent);
>> +	tidss_oldi_deinit(tidss);
>>   	return ret;
>>   }
>>
> 
> Since tidss_probe() (in tidss_drv.c) calls tidss_oldi_init(), it also
> calls tidss_oldi_deinit() in its error exit path.
Yes, but not if tidss_oldi_init() itself fails.

If we have two OLDI TXes, and the loop in tidss_oldi_init() inits the 
first one, then the second one's init fails, the code jumps to 
err_put_node. If we don't call tidss_oldi_deinit() there, the first OLDI 
TX will not be "deinited".

  Tomi


  reply	other threads:[~2026-11-02 11:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 10:18 [PATCH v4 00/14] drm/tidss: Add BeagleY-AI display support (and some more) Tomi Valkeinen
2026-10-29 10:18 ` [PATCH v4 01/14] dt-bindings: display: ti,am65x-dss: Add AM62P DSS Tomi Valkeinen
2026-11-01 13:49   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 02/14] drm/tidss: Add helper to identify the AM65x OLDI video port Tomi Valkeinen
2026-11-01 13:50   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 03/14] drm/tidss: Stop using vp_bus_type for directly connected panels Tomi Valkeinen
2026-11-01 14:07   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 04/14] drm/tidss: Drop the tied off video port check from mode validation Tomi Valkeinen
2026-11-01 14:07   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 05/14] drm/tidss: Remove the unused vp_bus_type feat Tomi Valkeinen
2026-11-01 14:09   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 06/14] drm/tidss: oldi: Drop unnecessary forward declaration Tomi Valkeinen
2026-11-01 14:11   ` Aradhya Bhatia
2026-11-02 11:41     ` Tomi Valkeinen
2026-10-29 10:18 ` [PATCH v4 07/14] drm/tidss: oldi: Fix wrong return value from tidss_oldi_mode_valid() Tomi Valkeinen
2026-11-01 14:17   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 08/14] drm/tidss: oldi: Fix serial clock reference leak Tomi Valkeinen
2026-11-01 14:17   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 09/14] drm/tidss: oldi: Fix cleanup on a failed init Tomi Valkeinen
2026-11-01 14:14   ` Aradhya Bhatia
2026-11-02 11:46     ` Tomi Valkeinen [this message]
2026-11-02 13:30       ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 10/14] drm/tidss: oldi: Move the setup of one OLDI TX to its own function Tomi Valkeinen
2026-11-02 13:31   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 11/14] drm/tidss: oldi: Add power domain support Tomi Valkeinen
2026-11-02 13:45   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 12/14] drm/tidss: Add support for AM62P display subsystem Tomi Valkeinen
2026-11-02 14:02   ` Aradhya Bhatia
2026-10-29 10:18 ` [PATCH v4 13/14] arm64: dts: ti: k3-am62p-j722s-common-main: Add support for DSS Tomi Valkeinen
2026-10-29 10:19 ` [PATCH v4 14/14] arm64: dts: ti: beagley-ai: Enable HDMI display and audio Tomi Valkeinen

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=15b7bfd9-8da4-4cd0-9f8b-634c03f46c5e@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=aradhya.bhatia@linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=s-jain1@ti.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®