Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9090832pxu; Mon, 28 Dec 2020 06:24:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUNAqxxO76y3IMaT25M7M7Yq2YeYiWAnj/Bu/kjAi/9zQ4GFg/rBGL8ctTW/ihRu92+IsO X-Received: by 2002:a05:6402:22e1:: with SMTP id dn1mr43283101edb.347.1609165489012; Mon, 28 Dec 2020 06:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165489; cv=none; d=google.com; s=arc-20160816; b=r5qT9n3vMlNrkikG7D7br9d4NaTkXlqVOKhyRHx8LceM9i8PitQ2l1MHwzETmz4v4Z wYPvCV9jgcRSNVJxmxIrrVazZgugcNTCDNtDsj8Rd+bUoFnuWx5tIHNvNCqR3emqel0J LUHOgbsR+1/nTEiP8HLcE4NjgGlK/730wWbgQzoNwZ9hCHHGw0zhtU41DIVBuYx8F2a/ viTZNghV6KolAKpdVzz76J3l9COo3ViMWkmTj0Typ/IXz4si+rkNnu9a6+wfXXxegVmt hHorG9tEwrINQIhyspBqyatPOyHIhLNt38ecAuFq87aBSRsOC6aFfxCcSsd5rjVSh/jE bD/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y5cR1d3Wft5Dyfh626NLjy0Zg/Qo/j96q5ey+FjMEYY=; b=iq90SB6kzc/biuM7fvXmufORsXEcc3JV4Xo4FwfdniS6YZknwaVXYvR5zQGrHzQ04P sssIp8g7GJ8UZNAM22w3ZFqwCbGptR8dKPdbaaW9oQhUY0HNYJdz6Qg3iBSnTS/d6TI7 tt0QWbGq+W2TIyA3D4I/KlHFAZtReHqLvJdaSjwdadfgtVE7cWFaDHG97cHh93OkxHBK 9H00oQtxcmmFFB777FE8ppzfs40Nh0bDve7GUELOouSpDIIIK2Y5TJnoy7WbwcH33m/g QVmd96+X1HR4WlApl+hW/ehTBKv3yJnK68x7+MckneGB1lbRP9tF7NQsPloxJoRGkbAx CVuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yvN3dsk+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si10321254edf.490.2020.12.28.06.24.23; Mon, 28 Dec 2020 06:24:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yvN3dsk+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502625AbgL1OWT (ORCPT + 99 others); Mon, 28 Dec 2020 09:22:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:57902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439186AbgL1OWP (ORCPT ); Mon, 28 Dec 2020 09:22:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 10F79206E5; Mon, 28 Dec 2020 14:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165294; bh=bSlfWckOwMJnm/EAO2K31nscYWvG7pqH5XCo0KjMKzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yvN3dsk+3r/JZVIrtuYosldFgRJFKQW+NTJHCMiMkEhhEdyc0qff7E8IYFoKqzpSG 5XbaMvvWVZJqJmxeKRo2SIU47X7ceEQdbcEok1TlV9dlvxB5QYuJ59K4dEMiey2usj OhF4N7CEL4ifv3LClpQcYjBiRA+ZCaTS86qE6zjc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Guido=20G=C3=BCnther?= , Daniel Vetter , Sasha Levin Subject: [PATCH 5.10 441/717] drm: mxsfb: Silence -EPROBE_DEFER while waiting for bridge Date: Mon, 28 Dec 2020 13:47:19 +0100 Message-Id: <20201228125042.097307585@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guido Günther [ Upstream commit ee46d16d2e40bebc2aa790fd7b6a056466ff895c ] It can take multiple iterations until all components for an attached DSI bridge are up leading to several: [ 3.796425] mxsfb 30320000.lcd-controller: Cannot connect bridge: -517 [ 3.816952] mxsfb 30320000.lcd-controller: [drm:mxsfb_probe [mxsfb]] *ERROR* failed to attach bridge: -517 Silence this by checking for -EPROBE_DEFER and using dev_err_probe() so we set a deferred reason in case a dependency fails to probe (which quickly happens on small config/DT changes due to the rather long probe chain which can include bridges, phys, panels, backights, leds, etc.). This also removes the only DRM_DEV_ERROR() usage, the rest of the driver uses dev_err(). Signed-off-by: Guido Günther Fixes: c42001e357f7 ("drm: mxsfb: Use drm_panel_bridge") Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/d5761eb871adde5464ba112b89d966568bc2ff6c.1608020391.git.agx@sigxcpu.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 35122aef037b4..17f26052e8450 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -134,11 +134,8 @@ static int mxsfb_attach_bridge(struct mxsfb_drm_private *mxsfb) return -ENODEV; ret = drm_bridge_attach(&mxsfb->encoder, bridge, NULL, 0); - if (ret) { - DRM_DEV_ERROR(drm->dev, - "failed to attach bridge: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(drm->dev, ret, "Failed to attach bridge\n"); mxsfb->bridge = bridge; @@ -212,7 +209,8 @@ static int mxsfb_load(struct drm_device *drm, ret = mxsfb_attach_bridge(mxsfb); if (ret) { - dev_err(drm->dev, "Cannot connect bridge: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(drm->dev, "Cannot connect bridge: %d\n", ret); goto err_vblank; } -- 2.27.0