From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DF52EE6427 for ; Wed, 31 Dec 2025 10:50:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92B0B10E079; Wed, 31 Dec 2025 10:50:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="SsqIb5ow"; dkim-atps=neutral Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by gabe.freedesktop.org (Postfix) with ESMTPS id A36EF10E079 for ; Wed, 31 Dec 2025 10:50:30 +0000 (UTC) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id D2CD4C1AE22; Wed, 31 Dec 2025 10:50:02 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4A06060744; Wed, 31 Dec 2025 10:50:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 52745113B0761; Wed, 31 Dec 2025 11:50:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1767178226; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=o/Z1oWMJuqMZIoKFGfzInyQtaixm68ScowVMHojeTZ4=; b=SsqIb5ow7v/6UFYF34MR3rDUSBx3YczuZw7xKUxdk+tgkyoQgTiXQNv11eRgnwbhpuarKw UeIQgJ1dioQ7o1MXOWuHqmtVIrpWKfvK5sqXw8geFXGwRo1gINFkN+RfKVIvRjG+HRbFNT 7RVR5xnIwrJ9zLALAGWwVBqa72bYwfYaH/9s8czYbZ8C97aQMKiEXHKI1WcGf1tsxNi6AW h3tACyEXkQgbWLG61NjtwwWBjENblxG4eY2cmCq9ed9jeUVexoG931bT7Cx9Xt+UXBZdV1 d7+IE+kBV+JgFf93zyVPI/DpCiIdUX2tl4nMm0jVJT1oXZ700jLDDOVoRCqavw== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 31 Dec 2025 11:50:15 +0100 Message-Id: Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , To: "Damon Ding" , , , From: "Luca Ceresoli" Subject: Re: [PATCH v8 01/18] drm/display: bridge_connector: Ensure last bridge determines EDID/modes detection capabilities X-Mailer: aerc 0.20.1 References: <20251217093321.3108939-1-damon.ding@rock-chips.com> <20251217093321.3108939-2-damon.ding@rock-chips.com> In-Reply-To: <20251217093321.3108939-2-damon.ding@rock-chips.com> X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed Dec 17, 2025 at 10:33 AM CET, Damon Ding wrote: > When multiple bridges are present, EDID detection capability > (DRM_BRIDGE_OP_EDID) takes precedence over modes detection > (DRM_BRIDGE_OP_MODES). To ensure the above two capabilities are > determined by the last bridge in the chain, we handle three cases: > > Case 1: The later bridge declares only DRM_BRIDGE_OP_MODES > - If the previous bridge declares DRM_BRIDGE_OP_EDID, set > &drm_bridge_connector.bridge_edid to NULL and set > &drm_bridge_connector.bridge_modes to the later bridge. > - Ensure modes detection capability of the later bridge will not > be ignored. > > Case 2: The later bridge declares only DRM_BRIDGE_OP_EDID > - If the previous bridge declares DRM_BRIDGE_OP_MODES, set > &drm_bridge_connector.bridge_modes to NULL and set > &drm_bridge_connector.bridge_edid to the later bridge. > - Although EDID detection capability has higher priority, this > operation is for balance and makes sense. > > Case 3: the later bridge declares both of them > - Assign later bridge as &drm_bridge_connector.bridge_edid and > and &drm_bridge_connector.bridge_modes to this bridge. > - Just leave transfer of these two capabilities as before. > > Signed-off-by: Damon Ding > Suggested-by: Dmitry Baryshkov > Tested-by: Marek Szyprowski Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com