From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6A1E3D3481 for ; Mon, 9 Mar 2026 17:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773078926; cv=none; b=J++DbtPGM0LVJa4vJ2mrC+/ISKeDxm+r48mMeU4cHPi7OeAX3wP3Vg/RuOLujSI58UfvkkcoZ/d9xF90ldFczuynwtA+5/8dqHddPRorTTbpjZghHrcbU5CaifTMR4s1tIAS+DhZj7KO4AW08FILSvazaGfpEFA4eEYEyzSyD/w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773078926; c=relaxed/simple; bh=UMVl9WrGBV23nQR8BGtjO/Wbc8sqTMrUypr3DjqnMvc=; h=Mime-Version:Content-Type:Date:Message-Id:To:From:Subject: References:In-Reply-To; b=WTJekrqvTUEdMX47pE0wXzQCSxReJgihW1iMtARyT3E7IHGeq4W9MCO+vy4naRiDw9JJSoKGpcPrVSBhATqlQ90UG4IdydzFIVnTcnr6XHrRuuhBdl4GNpnGeVesw1Muey6k60zAE5pkTJ/L/W8eBD6/CvR3SWN+5GfAm1pfASI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=R5qTUPqm; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="R5qTUPqm" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id ADEDF1A2D66; Mon, 9 Mar 2026 17:55:16 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7C8A55FFB8; Mon, 9 Mar 2026 17:55:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 844DD103696F1; Mon, 9 Mar 2026 18:55:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1773078914; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=UMVl9WrGBV23nQR8BGtjO/Wbc8sqTMrUypr3DjqnMvc=; b=R5qTUPqmT4PTHzeeGFLQKX7qqOPKeZ5S7LgOjZOXO4/2KihGAOxBycYQpJD0Hpog5PrlFz tXgiRScgMMMK0eHRcMTzVNowTUPyGJJjWlAuO7SZAZPPFixT9hpoXo5E58vZ1W38ffQMG3 aHXb1ZMZbtBYvREu09tYFKccVBII/LQ3CccEAWxfzPfn7bTuYUxQw5VzLCrTowQ1zT0SqM ipkJfHsbuz1TDDUlft2GXxfYfYjK8TzOqIdKaxqKkUZ+jIUNcuR/ncOoKMnfa+VoiazFmm GNVv7EjZDdd2J+gJ9AsGXIahdC5KkoOirUerZaHapOjcOFawYwXvaTjnVF182w== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 09 Mar 2026 18:55:03 +0100 Message-Id: To: "Harikrishna Shenoy" , , , , , , , , , , , , , , , , , , , , , , , , , From: "Luca Ceresoli" Subject: Re: [PATCH v10 1/6] drm/bridge: cadence: cdns-mhdp8546-core: Set the mhdp connector earlier in atomic_enable() X-Mailer: aerc 0.20.1 References: <20251209120332.3559893-1-h-shenoy@ti.com> <20251209120332.3559893-2-h-shenoy@ti.com> In-Reply-To: <20251209120332.3559893-2-h-shenoy@ti.com> X-Last-TLS-Session-Version: TLSv1.3 On Tue Dec 9, 2025 at 1:03 PM CET, Harikrishna Shenoy wrote: > From: Jayesh Choudhary > > In case if we get errors in cdns_mhdp_link_up() or cdns_mhdp_reg_read() > in atomic_enable, we will go to cdns_mhdp_modeset_retry_fn() and will hit > NULL pointer while trying to access the mutex. We need the connector to > be set before that. Unlike in legacy cases with flag > !DRM_BRIDGE_ATTACH_NO_CONNECTOR, we do not have connector initialised > in bridge_attach(), so add the mhdp->connector_ptr in device structure > to handle both cases with DRM_BRIDGE_ATTACH_NO_CONNECTOR and > !DRM_BRIDGE_ATTACH_NO_CONNECTOR, set it in atomic_enable() earlier to > avoid possible NULL pointer dereference in recovery paths like > modeset_retry_fn() with the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag set. > > Fixes: c932ced6b585 ("drm/tidss: Update encoder/bridge chain connect mode= l") > Signed-off-by: Jayesh Choudhary > Signed-off-by: Harikrishna Shenoy Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com