From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 A4C1C192D9D for ; Thu, 6 Mar 2025 08:21:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741249268; cv=none; b=l7u703j9501XjlZmwbJTGj5eBxpXuuA2p5iZOhy0PbytBoGnaS3IdmfTwdyLxWRWkb2l/YqxWoOqwtStbw7qUHywSBjqP+n1KvBa9ScWwvGOJm+i7WnEWFSl/zQE0ZSbF6rq+/GY6g+Y2k+x4Ub77SNiI5XF49uRj21wkOaTYpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741249268; c=relaxed/simple; bh=waGNypVG8QBKLqjVvp6fgOObN1x5Fb4QVWKFnsMd65E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=git/943S/Td6YYLMIWCs69PwE/GKFqD48azjAsUqrrKYOADvZixSJViPP/Uhi2BzJITMcMSH6z7JAM1DjCkbMfkcOvuWQ8Gu3xFmbiiIvFzLkx4Ri/YLEy1uAZm7uL1fiG6Bwek8JrwvWhQNZFUOnm4YyWKHlp+icCFIdC7gTTk= 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=cotuQ391; arc=none smtp.client-ip=217.70.183.196 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="cotuQ391" Received: by mail.gandi.net (Postfix) with ESMTPSA id 1775F443EF; Thu, 6 Mar 2025 08:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1741249264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=477azTeILJMHJbPuzL3O9g7l+T0x51meEHGTEhodXtI=; b=cotuQ391r97jESnp54sLMEE/H58/aOC+YaNt0GWbUCOhBIKRPh2DZb1p2QqO5cm3n+o/R/ VHxzTmUT+HV5il0Bk+aVQ88ZKoe/AZZl8kEFvbtHJJ9uOrQJnyDQpXaSAweu2egzT6qL56 4K5v8ldvhVLzDGfljPGSWWR0NMCRKpUpiIk+q8b0DoMP5zGD4pCcuJ8j0pJYMMKakElz6l CzqhwAxtfOq5IG9igj6kVGlr1Oe35QEPSAHAYFU4m7BpDFZOVMFoSkIvPT9gBi9uUNFwfN Fr6FxvT9PfpYU/VDKkOh4thfmoycPng+1Q3vUX80rfg3b9lvwlIxsFRQdA54AQ== Date: Thu, 6 Mar 2025 09:21:02 +0100 From: Herve Codina To: Maxime Ripard Cc: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Douglas Anderson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Simona Vetter Subject: Re: [PATCH v5 04/16] drm/atomic: Introduce helper to lookup connector by encoder Message-ID: <20250306092102.77583816@bootlin.com> In-Reply-To: <20250304-bridge-connector-v5-4-aacf461d2157@kernel.org> References: <20250304-bridge-connector-v5-0-aacf461d2157@kernel.org> <20250304-bridge-connector-v5-4-aacf461d2157@kernel.org> Organization: Bootlin X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejvdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfgjfhhoofggtgfgsehtkeeftdertdejnecuhfhrohhmpefjvghrvhgvucevohguihhnrgcuoehhvghrvhgvrdgtohguihhnrgessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepveefkeegteduhedvgeffieejfffgtdffgfduvedtveelkeegvedufedutdevveffnecukfhppedvrgdtudemvgdtrgemvdegieemjeejledtmedviegtgeemvgdvvdemiedtfegumeehkegrnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegvtdgrmedvgeeimeejjeeltdemvdeitgegmegvvddvmeeitdefugemheekrgdphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhephhgvrhhvvgdrtghoughinhgrsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeduiedprhgtphhtthhopehmrhhiphgrrhgusehkvghrnhgvlhdrohhrghdprhgtphhtthhopehmrggrrhhtvghnrdhlrghnkhhhohhrshhtsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohepthiiihhmmhgvrhhmrghnnhesshhushgvrdguvgdprhgtphhtthhopegrihhrlhhiv ggusehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhimhhonhgrsehffhiflhhlrdgthhdprhgtphhtthhopegrnhgurhiivghjrdhhrghjuggrsehinhhtvghlrdgtohhmpdhrtghpthhtohepnhgvihhlrdgrrhhmshhtrhhonhhgsehlihhnrghrohdrohhrghdprhgtphhtthhopehrfhhoshhssehkvghrnhgvlhdrohhrgh X-GND-Sasl: herve.codina@bootlin.com Hi Maxime, Hi Maxime, On Tue, 04 Mar 2025 12:10:47 +0100 Maxime Ripard wrote: > With the bridges switching over to drm_bridge_connector, the direct > association between a bridge driver and its connector was lost. > > This is mitigated for atomic bridge drivers by the fact you can access > the encoder, and then call drm_atomic_get_old_connector_for_encoder() or > drm_atomic_get_new_connector_for_encoder() with drm_atomic_state. > > This was also made easier by providing drm_atomic_state directly to all > atomic hooks bridges can implement. > > However, bridge drivers don't have a way to access drm_atomic_state > outside of the modeset path, like from the hotplug interrupt path or any > interrupt handler. > > Let's introduce a function to retrieve the connector currently assigned > to an encoder, without using drm_atomic_state, to make these drivers' > life easier. > > Reviewed-by: Dmitry Baryshkov > Co-developed-by: Simona Vetter > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/drm_atomic.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ > include/drm/drm_atomic.h | 3 +++ > 2 files changed, 48 insertions(+) > Tested the drm_atomic_get_connector_for_encoder() in the context of the ti-sn65dsi83 driver recovery process (later modification in this series). Tested-by: Herve Codina Best regards, Hervé