From patchwork Wed Jul 3 12:27:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13722181 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 EA204C2BD09 for ; Wed, 3 Jul 2024 12:27:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E45810E7D3; Wed, 3 Jul 2024 12:27:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=tq-group.com header.i=@tq-group.com header.b="Q87YfAmi"; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="hSE1Xdbm"; dkim-atps=neutral Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 16BF810E7D3 for ; Wed, 3 Jul 2024 12:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1720009646; x=1751545646; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8jq6y7aA7RK3dKCehG+wrp8fblOjHLald6MD0wxTNHc=; b=Q87YfAmiqoUNOhFD/DUPCAfhLT3lRIaTl0eVUcWTfq2T7tGM/4aBOU1X L6GPTljqvIRzoLRvlSQ+tvKB4njamET1KKGNCCuuD6/AgppWp41avOkUH 7LzisG9K2Ke045RX//DfhcLgf2Rt12EiuYv/Fvj2ik+CbrzL2gmckX2O2 h5ejWKbx0K8/o7x5bQP3vgmFzMrXZ8NHRjvSsswryj0L5geZdE2qpci63 gYUXOJ208K5Dt0+1dX/uXxivomdn5yzx9gfwLFxnTX7PMyBxq6A6/0HqI Z/rE1VBQwCzQolJWSbfkpooETvo/qpmEnRizFQlRLheMNi9Er48f7JodR w==; X-CSE-ConnectionGUID: dggba+NXRHGpeBGX8BmCdw== X-CSE-MsgGUID: 4YDp7SzqSiiu6+kXLImTLg== X-IronPort-AV: E=Sophos;i="6.09,182,1716242400"; d="scan'208";a="37726416" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 03 Jul 2024 14:27:24 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2CFEB165C89; Wed, 3 Jul 2024 14:27:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1720009640; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=8jq6y7aA7RK3dKCehG+wrp8fblOjHLald6MD0wxTNHc=; b=hSE1XdbmneKXrssEo+FANb1s0MTPKTkv5oqLVPlNZInBXXbawo4s4SqNnJzA+yJvypaQ19 Vb+jHRREaLBRFfid6YbAapkxKwAS8L5dJr9laEbWmj/n4t7zX6Ongda1Gga0NuCVFsjVhz mGFcR88QfJIWnBcp3EILNfnUsabJAUjDZT8L3H4ZD5SlppkoZScNj64Bd6sIQJjYT3dW+N Pxlq1LJE5y5REEp3r4M6CS2OhT5cZnI5befFk4xEXzM6rvzzENX2yNjHpuKUOST29kn2er d1ySPaHSvL0g7XJiCURqIY3ewKXd0xlpXNd8Db4PtO55Dn+ciS+r84RSRN1hQg== From: Alexander Stein To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: Alexander Stein , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/1] drm/bridge: Silence error messages upon probe deferral Date: Wed, 3 Jul 2024 14:27:15 +0200 Message-Id: <20240703122715.4004765-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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" When -EPROBE_DEFER is returned do not raise an error, but silently return this error instead. Fixes error like this: [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@30800000/mipi-dsi@30a00000 to encoder None-34: -517 [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@30800000/mipi-dsi@30a00000 to encoder None-34: -517 Signed-off-by: Alexander Stein Reviewed-by: Robert Foss --- Changes in v5: * Added dev_err_probe() call if probe deferral occurs drivers/gpu/drm/drm_bridge.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index d44f055dbe3e7..c6af46dd02bfa 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -353,8 +353,13 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge, bridge->encoder = NULL; list_del(&bridge->chain_node); - DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n", - bridge->of_node, encoder->name, ret); + if (ret != -EPROBE_DEFER) + DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n", + bridge->of_node, encoder->name, ret); + else + dev_err_probe(encoder->dev->dev, -EPROBE_DEFER, + "failed to attach bridge %pOF to encoder %s\n", + bridge->of_node, encoder->name); return ret; }