From patchwork Thu Mar 30 14:16:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 77206 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1171618vqo; Thu, 30 Mar 2023 07:32:36 -0700 (PDT) X-Google-Smtp-Source: AKy350b4y1Y8jdSL2hqVwq8NXN0cMEQT8z2OmypDNwhExgwu8b61kWJXctz1c2lxWWuY2+Eb3k8R X-Received: by 2002:a17:906:49ca:b0:878:545b:e540 with SMTP id w10-20020a17090649ca00b00878545be540mr24766417ejv.51.1680186755907; Thu, 30 Mar 2023 07:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680186755; cv=none; d=google.com; s=arc-20160816; b=ZxIshIEmo/jDRdwWqoCtF2lxKLi36rH3AJjRU9w0+KauzjN+HE+dGJlnfc7BYHCzZG 32edZy1it7B+r40AbyC6AmUsy1LKrQP+Y93u1rfVw6m1mSSvmL465WYVXD2aMn+UG4+w rqd+HruBjPVzd49mJh4mfQhXIIig0p7yD5+7XwDMsuNO+bF8ZDmbL6i2NMTKOsz4fX0q N7UKauqb/9/CRhfBx5jEFxpNPt4t9L/17zvwWHNCbqgA4RqQnrwC1RD32GCo1/IKBMxW SX9UcNbJOW1Oaog13V/+CkcCTQ8DfOlkOm4fjb1mOy2TtSDDO++9jjtQRQmIGAkthXfG JRYg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6FtVoiMV/omg48bRFmqt6pDYPYlhyrqg6evx0w4MWTE=; b=ga4RkpUrXEnIZLSZialCJbdG5tk8iXoD9+0P2zR8GGi7ghk37xs6qbynMmQ+pGbbJz YD+pv1M2lH3OhEX+BgLEgCqDXAB7mRNHnHYi+Irci5JWdPrroktoUoHeyxioQF8AM7aj BWV8449mqw5Clzdg7skm9BdzPWPz0S6Dhhx+tJ+cFwbIrBQ7H6OvgQw9W/MzvjHgSo+Z Hw+nCRxUA3Gx84ZVu05RHfQGYR8EgBpcKrNex3xsWAbcrggPTvVWwzWnAq2ReyJS2ehR LcJ+F3R1F28a52cPM4Lrvr1JQiX4jB5RGsPeZ6bTcEhbK4eXD4hUAMCR6FUFmQka/REp 08cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="lxDdzA/s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a170906688500b009320276666asi33920072ejr.793.2023.03.30.07.32.10; Thu, 30 Mar 2023 07:32:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="lxDdzA/s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232424AbjC3ORA (ORCPT + 99 others); Thu, 30 Mar 2023 10:17:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232266AbjC3OQp (ORCPT ); Thu, 30 Mar 2023 10:16:45 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 238E72681 for ; Thu, 30 Mar 2023 07:16:44 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id EC1E3660318A; Thu, 30 Mar 2023 15:16:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680185800; bh=dxC6MHx3NJXRAEW1ywTcNfOZX7I8dn5v2i9D/PKGK9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lxDdzA/skgD2ZgYdNlhX2IjyvEpd6f4YTDdMHHtsEDnq4u3PwMSSw+jGBl2NgXFOv fH4mkU7RvKer8Fz4LPpZdqJ/SpAkgocyp0wbF8XDnNRs1xF1zngb/WTffZibApmXK9 wcMF08O+71aHB/mjQlkigk+uwSGmwssq5A0aJY0naSk5PgwGh7n6xxiqsogSq7Tgl7 5ngx85N5LQ9KSB6HOVHe0ucb3hWFkndrBOFVIJPfWiCmb4r0L5woxvsw/5Q9t5x7xZ N7x0H4VlheGIcQpatW3ETkuOlzs11cYH9cEH6R5Jm60AJF9bbu6AN/nlOEzih51gfd 7BCMvtRa1IJSA== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, wenst@chromium.org Subject: [PATCH v1 5/8] drm/mediatek: dp: Change logging to dev for mtk_dp_aux_transfer() Date: Thu, 30 Mar 2023 16:16:28 +0200 Message-Id: <20230330141631.190528-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230330141631.190528-1-angelogioacchino.delregno@collabora.com> References: <20230330141631.190528-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761803507489374776?= X-GMAIL-MSGID: =?utf-8?q?1761803507489374776?= Change logging from drm_{err,info}() to dev_{err,info}() in functions mtk_dp_aux_transfer() and mtk_dp_aux_do_transfer(): this will be essential to avoid getting NULL pointer kernel panics if any kind of error happens during AUX transfers happening before the bridge is attached. This may potentially start happening in a later commit implementing aux-bus support, as AUX transfers will be triggered from the panel driver (for EDID) before the mtk-dp bridge gets attached, and it's done in preparation for the same. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index ac21eca0e20e..19b145cf2e05 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -849,7 +849,7 @@ static int mtk_dp_aux_do_transfer(struct mtk_dp *mtk_dp, bool is_read, u8 cmd, u32 phy_status = mtk_dp_read(mtk_dp, MTK_DP_AUX_P0_3628) & AUX_RX_PHY_STATE_AUX_TX_P0_MASK; if (phy_status != AUX_RX_PHY_STATE_AUX_TX_P0_RX_IDLE) { - drm_err(mtk_dp->drm_dev, + dev_err(mtk_dp->dev, "AUX Rx Aux hang, need SW reset\n"); return -EIO; } @@ -2061,7 +2061,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux, is_read = true; break; default: - drm_err(mtk_aux->drm_dev, "invalid aux cmd = %d\n", + dev_err(mtk_dp->dev, "invalid aux cmd = %d\n", msg->request); ret = -EINVAL; goto err; @@ -2077,7 +2077,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux, to_access); if (ret) { - drm_info(mtk_dp->drm_dev, + dev_info(mtk_dp->dev, "Failed to do AUX transfer: %d\n", ret); goto err; }