[v2,8/9] drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found
Message ID | 20240229-anx7625-defer-log-no-dsi-host-v2-8-00506941049a@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-87726-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp762736dyb; Thu, 29 Feb 2024 16:14:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUfqvl+NJf7/PwZiKkIRc/tFAbhH0PxVteRLnSPn2Ga92QsixUz9za//Wi5idF3kmo5bNr3HzCeJR9Tja9EANFSKsgJw== X-Google-Smtp-Source: AGHT+IGx4LNTIvn1mr9f8QD14kusHd7ILbHGVKH+7Z392najBwBF4XPi1GWqZFKjjfWsYjK0EeYk X-Received: by 2002:a05:6358:7f17:b0:17b:62ac:1ddb with SMTP id p23-20020a0563587f1700b0017b62ac1ddbmr27936rwn.23.1709252064412; Thu, 29 Feb 2024 16:14:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709252064; cv=pass; d=google.com; s=arc-20160816; b=n5D/ZT7kpYAaErfH+Zjlu/vnX6BuygU7fESgmkpZyPP+4zsoaLjbTCHv6RUJ6KjM/h uH6rTYkxUmRCt24wxoFtm1kIg35ZuH1KEZFCWxVkYylyV77hX0PVr0Au9pYRNkUhQivo kkfRSvVDVVdFQnZ23USnk8Ps1TTZhmt+9eQOIvUTxJgLukUZ6Dimb+i33K8yy2dPRu63 CTwDp++7MsWOcHg9pWB/aTknOl4bXkNKe8n/XjSBkTTaEMK2fsgR9S0ocM6cMAKWoFOU nJsbNB0MG8HQtDFh1QMNC1BE0yxPF1r9x3knjVe1UTPUCtmztVsuWwn26BroSmFJIwl1 64Ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=zz5kR7mG6e5NsdwpqHbvSi3t4GCs4tZxByx2jgHJBHo=; fh=EPbsNJMLwlXYTg/MTuk9bwilsoK94uNp6NRacKCAfCI=; b=KH0Sx3bXSUXu6lYOa7LVLVmB430nvAQxxa11Bdtjy5EbfNrB5ZYU8PNLJMImRL60BV h/lMrwh1AkssY/93kea6/Yy8sNYB1w+C/dL8bv9eOPPEMf/Is2ou+pVBjP/kvxCggm9R /03CkoNfmAcgc7EH0McVvTRY3fEg+N/rTisQvIAiizbPm6pjNMn0L/lUAGJBlgF8QY3/ DEedz6QBJPfnOxhbQ7+mrzT7/KE/u+kOakI9cxZHOu80jrCRv2FK7d4MdPAkrsxwrK6I M0t0T7sbBsXB+lTAMlkflMd88WC56zpf/6YVSL4G5KafebxkhP+hx4buOp3FuNSjXRdM BiwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=M1YLZif1; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-87726-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gu4-20020a056214260400b0068cdb0ede35si2486620qvb.399.2024.02.29.16.14.24 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 16:14:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87726-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=M1YLZif1; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-87726-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3485D1C2138A for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 00:14:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58FDC8464; Fri, 1 Mar 2024 00:13:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="M1YLZif1" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 0EF2E6AA2 for <linux-kernel@vger.kernel.org>; Fri, 1 Mar 2024 00:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709251983; cv=none; b=PjNoqHezDXdCJt5aEEWDnbZzu+bTcJxTAJrtcptndmq2HZZitKR3/Dcsw36zpPOkwBIpnoWcVypCPUnY3+3H39jM/F2SP92OFBb+L2zioasvsS+RFTMQAHlOWmC14ZciTyZXW5NQKpxX4UiZ1zoHNH8H/fPqeC89FYGPsJGc4EY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709251983; c=relaxed/simple; bh=MYKBxuR+aJph7D9FYI37RGyFCJkN1zgdY0Ybz9nXzqY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ahWqfKuZiMbQWqWcdOqD3w5Eg3MDMiyD/gnjyBTD1Hl/tfNTea5hGIl4Xs/7VmtRlX2WM4v4tOR+Ea9kfP57NwdegbeI5fUAi/3MUsklLXKq2OSfQd4KhU+7U30dGaJQbjvzMikA0IlxmV6gX86BWxRwEhPzXTOeFuMO1XvLDxM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=M1YLZif1; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709251980; bh=MYKBxuR+aJph7D9FYI37RGyFCJkN1zgdY0Ybz9nXzqY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=M1YLZif1WED+vvuhoA+scIcRTPnw98+XmpYskhv7KfiRTZHliAuL/NFFZwRaikprw 5/kPyPgu+FNAttkzLubD2cCK2Y9EseyttFZrq32z3e+tH4VM4XT1a8lzAl+2JJTiY2 a3MYMdMeHRYcS+hzq0bi5oKBS832zjV9QIzM0svssSolLEF/cgs6mIzRhzPuPcgVXq 3/HWsNnvmiEj4DMlbMpsd7mbO5Cv9QFxBslrY99kO2YhDnq9/EhRKsxC8Cxo5qbeeK CRlZvaITDZW6gdhNvOyuXjmGggHb+LlsoZzZqLWGkPpyW8/lxG0s3JjW4kM+Vq37a/ mdGKQOqTVEt5A== Received: from [192.168.1.205] (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 31A22378000E; Fri, 1 Mar 2024 00:12:56 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> Date: Thu, 29 Feb 2024 19:12:14 -0500 Subject: [PATCH v2 8/9] drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240229-anx7625-defer-log-no-dsi-host-v2-8-00506941049a@collabora.com> References: <20240229-anx7625-defer-log-no-dsi-host-v2-0-00506941049a@collabora.com> In-Reply-To: <20240229-anx7625-defer-log-no-dsi-host-v2-0-00506941049a@collabora.com> To: Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, owen <qwt9588@gmail.com>, Jagan Teki <jagan@amarulasolutions.com>, Marek Vasut <marex@denx.de>, Adrien Grassein <adrien.grassein@gmail.com>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Sam Ravnborg <sam@ravnborg.org>, Bjorn Andersson <andersson@kernel.org>, Vinod Koul <vkoul@kernel.org>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Vinay Simha BN <simhavcs@gmail.com>, Christopher Vollo <chris@renewoutreach.org>, Jessica Zhang <quic_jesszhan@quicinc.com>, Marijn Suijten <marijn.suijten@somainline.org>, AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> Cc: kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> X-Mailer: b4 0.13.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792280692551901375 X-GMAIL-MSGID: 1792280692551901375 |
Series |
drm: Switch from dev_err to dev_err_probe for missing DSI host error path
|
|
Commit Message
Nícolas F. R. A. Prado
March 1, 2024, 12:12 a.m. UTC
Given that failing to find a DSI host causes the driver to defer probe,
make use of dev_err_probe() to log the reason. This makes the defer
probe reason available and avoids alerting userspace about something
that is not necessarily an error.
Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels")
Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
Hi Nicolas, Thank you for the patch. On Thu, Feb 29, 2024 at 07:12:14PM -0500, Nícolas F. R. A. Prado wrote: > Given that failing to find a DSI host causes the driver to defer probe, > make use of dev_err_probe() to log the reason. This makes the defer > probe reason available and avoids alerting userspace about something > that is not necessarily an error. > > Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels") > Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> > --- > drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c > index 648ce9201426..028fdac293f7 100644 > --- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c > +++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c > @@ -556,10 +556,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi) > } > dsi_r_host = of_find_mipi_dsi_host_by_node(dsi_r); > of_node_put(dsi_r); > - if (!dsi_r_host) { > - dev_err(dev, "Cannot get secondary DSI host\n"); > - return -EPROBE_DEFER; > - } > + if (!dsi_r_host) > + return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n"); return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n"); With this, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info); > if (!nt->dsi[1]) { >
Il 01/03/24 01:12, Nícolas F. R. A. Prado ha scritto: > Given that failing to find a DSI host causes the driver to defer probe, > make use of dev_err_probe() to log the reason. This makes the defer > probe reason available and avoids alerting userspace about something > that is not necessarily an error. > > Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels") > Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> > --- > drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c > index 648ce9201426..028fdac293f7 100644 > --- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c > +++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c > @@ -556,10 +556,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi) > } > dsi_r_host = of_find_mipi_dsi_host_by_node(dsi_r); > of_node_put(dsi_r); > - if (!dsi_r_host) { > - dev_err(dev, "Cannot get secondary DSI host\n"); > - return -EPROBE_DEFER; > - } > + if (!dsi_r_host) > + return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n"); Nicolas, this is going over 100 columns, which is not ok. Please fix. > > nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info); > if (!nt->dsi[1]) { >
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c index 648ce9201426..028fdac293f7 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c @@ -556,10 +556,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi) } dsi_r_host = of_find_mipi_dsi_host_by_node(dsi_r); of_node_put(dsi_r); - if (!dsi_r_host) { - dev_err(dev, "Cannot get secondary DSI host\n"); - return -EPROBE_DEFER; - } + if (!dsi_r_host) + return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n"); nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info); if (!nt->dsi[1]) {