From patchwork Tue Jul 25 07:32:26 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: 125394 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2305564vqg; Tue, 25 Jul 2023 00:53:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHvAiwGnqtwBGsBDQIyfTVOqEKBG7eYFXydsHI5naWU2IKcZT609UnlKk7jM81HG2ifQerZ X-Received: by 2002:a19:e00d:0:b0:4fd:fafd:1ed4 with SMTP id x13-20020a19e00d000000b004fdfafd1ed4mr2472065lfg.2.1690271598169; Tue, 25 Jul 2023 00:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690271598; cv=none; d=google.com; s=arc-20160816; b=cpTs4/gOFjCTPU4ivo/NlEBvC2FT+zS/cxUU0J+plgZCC/sNL9Xcj0uZIOA55ngqAq DCBdd06l6jn/suR9vuuQnh+gLSZhZuqUHG7P1KR4j3jCt+m20A89GT5+5x50sGb+lGlJ aZo8qFOiukY3XU1/4WqvSAYYziiaCu91E+T0sQPRiXxtxkDASBlfS0Yv7z55pLMTBUxH LmQVEn+ttq8nvVpMPNtuFfq7EQSfZUHbKCF+UdNY2BnZVakovLNuRTAwPDuCSkrvodZS 2Z6/rkcRkfCcfCzEhunCHaGL5Otw/10MoUlRGIXIdWN5DGFwO2er+aySoZ5y8abMq0bZ yeHQ== 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=y5VjoMsq4Qzjr2PveOhljJTtuSU+WapIA6WO+2yA9tc=; fh=WlmesBPh9vy2WAKH+Oa8Mq1mzTGfSQhQroZj01YJT/8=; b=zi91k9GJq2ZZV8nk4AI3X2/RIRMabhHX4KmQYFEbhbY8e1S6M6JoFx02NMt0SuwBik o+cLp4MRbVy369By4obUfSDV4qFrk742uw2u1zzrbWXuNkG/Ejk9jlsNLDL0mlezrP1n U6pQfQoVzCRwmj9n6CoNbzHAnjXJm5FkLvlRmt02BVNg8sIYuq58Q040CFv8MPKUHy0P C1iROux90tZxGxW6iFuVHNDXLDhAK0vSWrzqj1NU6gSl/JVLof2Z2PggyGkChd/5T9KF IkXXA++rOjLqBOjb8fVT5+DKPndiO+rqA3yazPVNHp8irbE5y1tNBxXRVFLF7t/jlh25 3AeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=B6UOIAJp; 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 f2-20020a170906494200b009952c411261si7548354ejt.192.2023.07.25.00.52.52; Tue, 25 Jul 2023 00:53:18 -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=B6UOIAJp; 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 S231264AbjGYHfM (ORCPT + 99 others); Tue, 25 Jul 2023 03:35:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbjGYHeK (ORCPT ); Tue, 25 Jul 2023 03:34:10 -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 6DB011BDF for ; Tue, 25 Jul 2023 00:32:50 -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 862716607109; Tue, 25 Jul 2023 08:32:48 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1690270369; bh=H77HX/wkDlDn/Tyn2IeuIqJvhVYehAjg4+GxBa1L05M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B6UOIAJp3t5NTmYheZv9IaD1pOFFnNbV8BHimNehBNmKz60aEfjfyIobQVYsIegJW k+GlSxMt6sUN2yOpfWTL38zf2srTZdN9dMDslDl++wP0BH5GoLXzhjpPnj440+wv0q axZzTrn7AifqGub5jJFTcj0dQo9lEK2NnuhiyamVklaOsd/pPga8dFTn9vLScjPXdk Ld2v3K/fKv8i+q6E4jRVWpwQ6eBdZcmvEHCwfmLksf84YWYAijBa53unNM2yGFqoeT a1Us134EZR7CYEOTi/HDhsc1DV6gArmHbpXYtYhdKIDJAUR0QYl+Yfvof7W3gWyTgh siReJxK8LmC4A== 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, nfraprado@collabora.com, ehristev@collabora.com, CK Hu , Alexandre Mergnat Subject: [PATCH v7 03/11] drm/mediatek: dp: Change logging to dev for mtk_dp_aux_transfer() Date: Tue, 25 Jul 2023 09:32:26 +0200 Message-ID: <20230725073234.55892-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725073234.55892-1-angelogioacchino.delregno@collabora.com> References: <20230725073234.55892-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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: INBOX X-GMAIL-THRID: 1772378231616630326 X-GMAIL-MSGID: 1772378231616630326 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 Tested-by: Chen-Yu Tsai Reviewed-by: CK Hu Reviewed-by: Alexandre Mergnat --- 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 77da0d002e9f..98f63d8230e4 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -847,7 +847,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; } @@ -2054,7 +2054,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; @@ -2070,7 +2070,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux, to_access, &msg->reply); if (ret) { - drm_info(mtk_dp->drm_dev, + dev_info(mtk_dp->dev, "Failed to do AUX transfer: %d\n", ret); goto err; }