From nobody Mon Feb 9 17:56:17 2026 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 8F53415DBBA for ; Sun, 26 Jan 2025 19:17:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737919063; cv=none; b=Bf/Qt+3geLtOMzqhxYn2rHs3NbYoajKLnUENRlM8UDbsQL9F4SN0uSVT+Ivf9ftl90DRfYSt52t3ppG+mZQxcCQOQEN+oHc44MFxolfqk0p5vHcm4XX2TQLKYK9Hf1hIg4DL3jqHEeYRiUH/8zzDkYdnmvJrZitwcbwMO1w1tE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737919063; c=relaxed/simple; bh=YK4gtsHkbUmUfhJYzVeq9a3dd8LgOYAPTY6ChoNcoI4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dnDKasvQSDOy9PHabxDHaJraddKdXNzShueU/M8nHwLHjwyaSuT2+gXR5Y+Lixk803YAdFbxO1KsK8Tdw6XY3OarHJbbMu8kp12hRW60mmqmcnvvPLq3dGfsu/rIYdeZxd7XYg0GYGiB7gEQrWwrGf0clO9/s2L91RlupPxim5A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=vBUQGZK2; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="vBUQGZK2" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1737919059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7tdtqi361Vos6YQGa/wlcxUmhGl8Ksw9TwvAVqGUT4Q=; b=vBUQGZK2RhmHNeuQ7OK57Ey/3KZAtxhKELnh6YsaKXxrip7NWVPuA0SaymNVlktKHA4Z/I 7PtpNxXWlAZmEF7DuVrVyPjyZNsWnh1cV4FT1CI4fmTQGa2EXKtPQxP15ZeKamEjSRdADL l23v8pegD+aCA5S95cGE5v6abWiugA4= From: Aradhya Bhatia To: Tomi Valkeinen , Dmitry Baryshkov , Laurent Pinchart , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Praneeth Bajjuri , Udit Kumar , Jayesh Choudhary , DRI Development List , Linux Kernel List , Aradhya Bhatia Subject: [PATCH v8 12/13] drm/atomic-helper: Re-order bridge chain pre-enable and post-disable Date: Mon, 27 Jan 2025 00:45:50 +0530 Message-Id: <20250126191551.741957-13-aradhya.bhatia@linux.dev> In-Reply-To: <20250126191551.741957-1-aradhya.bhatia@linux.dev> References: <20250126191551.741957-1-aradhya.bhatia@linux.dev> 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 X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Move the bridge pre_enable call before crtc enable, and the bridge post_disable call after the crtc disable. The sequence of enable after this patch will look like: bridge[n]_pre_enable ... bridge[1]_pre_enable crtc_enable encoder_enable bridge[1]_enable ... bridge[n]_enable And, the disable sequence for the display pipeline will look like: bridge[n]_disable ... bridge[1]_disable encoder_disable crtc_disable bridge[1]_post_disable ... bridge[n]_post_disable The definition of bridge pre_enable hook says that, "The display pipe (i.e. clocks and timing signals) feeding this bridge will not yet be running when this callback is called". Since CRTC is also a source feeding the bridge, it should not be enabled before the bridges in the pipeline are pre_enabled. Fix that by re-ordering the sequence of bridge pre_enable and bridge post_disable. Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Acked-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/drm_atomic_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atom= ic_helper.c index f5532e3646e1..d2f19df9f418 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1298,9 +1298,9 @@ disable_outputs(struct drm_device *dev, struct drm_at= omic_state *old_state) { encoder_bridge_disable(dev, old_state); =20 - encoder_bridge_post_disable(dev, old_state); - crtc_disable(dev, old_state); + + encoder_bridge_post_disable(dev, old_state); } =20 /** @@ -1635,10 +1635,10 @@ encoder_bridge_enable(struct drm_device *dev, struc= t drm_atomic_state *old_state void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, struct drm_atomic_state *old_state) { - crtc_enable(dev, old_state); - encoder_bridge_pre_enable(dev, old_state); =20 + crtc_enable(dev, old_state); + encoder_bridge_enable(dev, old_state); =20 drm_atomic_helper_commit_writebacks(dev, old_state); --=20 2.34.1