From patchwork Thu Mar 30 14:20:32 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: 77216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1178568vqo; Thu, 30 Mar 2023 07:43:25 -0700 (PDT) X-Google-Smtp-Source: AKy350Y9VR1fxKGjAbOlMcYAoU5osq9Dw1zT1pw5O2++3Ob4Z96PxHf9/Q+3J5be1l08bP7/Gz30 X-Received: by 2002:a17:906:3149:b0:884:930:b017 with SMTP id e9-20020a170906314900b008840930b017mr23690555eje.60.1680187405643; Thu, 30 Mar 2023 07:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680187405; cv=none; d=google.com; s=arc-20160816; b=eSomR8fqQ8YO4wlkJl+zIhi0KMLuJsQDCrIKrP8TbVkWX9q56Rm2cI72s9yntwSkoq bpOSelFc27nN5Dk2RK/LlCUsRnMVtFELke9CR8efgW/d0TI7DvPD3BYmMeNzPPI9mIqd 1XbANe28ZuF+k5nGz4rEp9kULJsg9e5ZdF7QEcFhR3Eb5LXEhj+lp5i3czTiukd3m7D/ MMmd4VnSmau5n1hquHA9idkceVtRcxHEUUASXS39n5RhNKhMUQ2iV98bQN3cd44vkkVe 0/AL8Bk5Qj60YYUdeZgIh/hO4XCHIC/4gN3gjDN0FWjL2KjQI8AldFo/izd3CFP2uosk QzXw== 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=gqJCPs5qR7+yBX+9TyHaL/I3c9W5y5t110OtFR+yUpdYITOW9M0tlJVzh5YllIm/nR d2MC/4KQ7zHj3gqWx4v6frUVxanLym0wTOQRF7vngmtINbvCugbF4A3iE5y8nhW4RN6b 5zuocmEZMCl950jrGgiJeg+o08jxXRqiIPAJIS0SXCK9+1MS7q0MbHnQw402OtrWeqkx ezJmqnZE1Dr+qZeRvETJV0r3pWveXd7NMrGRutCEgGsaxrwDfC+fB+FOaWl+UWPoWlCT FIz9bCVgI5CAVng800+I8m2Z3XtEfXSI60wEfuTWL22eVNOc78eW6gQSHC3wAW26ToCS HRyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ddYdW2du; 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 h28-20020a1709070b1c00b0091f4b3423d4si19623576ejl.670.2023.03.30.07.43.01; Thu, 30 Mar 2023 07:43:25 -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=ddYdW2du; 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 S232425AbjC3OVA (ORCPT + 99 others); Thu, 30 Mar 2023 10:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232357AbjC3OUq (ORCPT ); Thu, 30 Mar 2023 10:20:46 -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 81D45EE for ; Thu, 30 Mar 2023 07:20:45 -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 BB7AD66030CD; Thu, 30 Mar 2023 15:20:43 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680186044; bh=dxC6MHx3NJXRAEW1ywTcNfOZX7I8dn5v2i9D/PKGK9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ddYdW2due7/9HVKbxzYtu9mprbB08wIKWQvw7V7jkmkq3Tr9/fDFlQC3KR66FRz8g lE4wuH0bQKrkItvUv+pc5Zb70A4A02tzNvtQTwEcRLWnny8xPpwWZrjNT3QzKmIHQv 9aa/dQlKmuuENG556zDsKvgmZ646n+THpfldeBu6TYfglRdRkOWEQiexg1kKsSUJRB ECqUUtIbWd9WoLI1g2qTsGTSVZeYa/u/YVfAJpodGlxby0xCbzMrJuKy8BSlFGOgHI d3TJKp+Bw60mMFEDn85JzOwAvEH4IBPkP3w4RM9RimqfIYbeEPh2J6rE3xUjbEj3zU ROLlnEE8/NoPQ== 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 v2 5/8] drm/mediatek: dp: Change logging to dev for mtk_dp_aux_transfer() Date: Thu, 30 Mar 2023 16:20:32 +0200 Message-Id: <20230330142035.191399-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230330142035.191399-1-angelogioacchino.delregno@collabora.com> References: <20230330142035.191399-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?1761804188929781516?= X-GMAIL-MSGID: =?utf-8?q?1761804188929781516?= 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; }