Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp303956lqb; Tue, 16 Apr 2024 17:04:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUam0k8KquXglkBQIxpbnkRaBHye7UZKlaDC2wKKz0kX6LEEWu7nEA427EsXsyrMrGW5lLinLVUC2myYr6PvEoY0NUDPt7HboEa2Q31kA== X-Google-Smtp-Source: AGHT+IFEcAUYYIdW/f7ESBAvDSMWnSt21xjugT2TpkgvlxK98XTiCTICUw2hapJM+RRs98oZgPQT X-Received: by 2002:a17:906:f218:b0:a4d:fcc9:905c with SMTP id gt24-20020a170906f21800b00a4dfcc9905cmr10211429ejb.20.1713312284022; Tue, 16 Apr 2024 17:04:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713312283; cv=pass; d=google.com; s=arc-20160816; b=0ntxfr9yIG/zmGP19DPNhsdwzMXcky6qFaJxTibj/YkSe538ZiC+HCXBC5sZXcDsM+ h2KEbXSMLA6h9z0npP+OhmcFIJpNSJb5UCk+db96GZZbP1VoJrBH22ZncGuTJS10nUNP XCAqoXHXZtFLuosxBV59hKUIj72+0B+rcIqtXqfx+tpUjDHgfengtcx9KrW+DcJ/0CjS h8UNFdWpdzk0/vGmLCxknVnXyTD0wky5nBBZawO86eKTeXsP6+SLN8LQIkPYNMCFRh6W uNVfGY1RhdnjP8HFb5FTcI2iK7oi059YI8lmzL6qK5mc/y7d9nQbIbC4nYTNfF28tmG7 zV5A== 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; bh=2/52UNeZQbdT3BmACx8enZo9br5FkqTgi/Jz5xOFnvo=; fh=EaVNV8gKHS73tSa0PfwfCJhAdPfizlMjT2zacFzFq/Y=; b=E71J8ElisjgASCicGmYJR218CXkx7am9EQCa9BTYv/OtCDEVPkNIpbj37BzaUPcgMa xqKMZdCGtnVEqgTQ2HOZC4vp//8mNisUcktZMkgf7HXSOWD9eYnhoJCJ00RkyRHgTpkZ q4g/OrsCyx6M/PuWPCA1axFZ4OzTxmHT1o/JEMafyQpkXNAR5zPAG8De0KOW+6ewRcDH ewn7d1vux5sS0RXkq7mYJekPw0MgUpt+ZtPVpGq+OalpauOvLCEkCPDJS8aFPil7wLw5 LcNKwt5aHzR9Tdbd8WCtOEd1f9lAGDuc/q8orKLe+vdoYghVJNsosl0B5kI0Z58l6Qea UxXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-147778-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147778-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y13-20020a170906070d00b00a55561f67bbsi105725ejb.532.2024.04.16.17.04.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 17:04:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147778-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-147778-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147778-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 92D391F2363C for ; Wed, 17 Apr 2024 00:04:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7355225622; Wed, 17 Apr 2024 00:03:33 +0000 (UTC) Received: from m-r2.th.seeweb.it (m-r2.th.seeweb.it [5.144.164.171]) (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 B874C24B2F for ; Wed, 17 Apr 2024 00:03:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.144.164.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713312213; cv=none; b=YcjOzDs23ggXbbKgrggyfV+suIZ/s2U8tunjyk35TM3rsD19bBFQ5P74snnfLxFNwCPP/uG6asLmUux/wMgLmWHEhjwQxXn1Dxj/QbrnlVPLfimL5Ift5ZkoJKDOh4GBjNzX293cbS4eq4CyRaBKWHYWin/lixZBM4+FnW0jK9E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713312213; c=relaxed/simple; bh=5ttiwjfaLJXNdpmC8bn2ll2jKYVITC5JFxVVth4v55g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VTVDv6KYjjL9t1D10NAb5LqTBpw4KyOi9Rb90Eq/VdSkqM2/hp+lQM8A7q96BLoEayzQcmc7JjKARm4B1qiwbh7MLMqqAfb4G7mTfxyKv6WAp6cK8c4B7Abdo8nq/qWgPFn40yHsuA5TdLCp9nvV1Waix9zCFchkGBt7yr6pcWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org; spf=pass smtp.mailfrom=somainline.org; arc=none smtp.client-ip=5.144.164.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=somainline.org Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id C53143F003; Wed, 17 Apr 2024 01:57:44 +0200 (CEST) From: Marijn Suijten Date: Wed, 17 Apr 2024 01:57:41 +0200 Subject: [PATCH 1/7] drm/msm/dsi: Print dual-DSI-adjusted pclk instead of original mode pclk Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240417-drm-msm-initial-dualpipe-dsc-fixes-v1-1-78ae3ee9a697@somainline.org> References: <20240417-drm-msm-initial-dualpipe-dsc-fixes-v1-0-78ae3ee9a697@somainline.org> In-Reply-To: <20240417-drm-msm-initial-dualpipe-dsc-fixes-v1-0-78ae3ee9a697@somainline.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Archit Taneja , Chandan Uddaraju , Vinod Koul , Sravanthi Kollukuduru Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jordan Crouse , Rajesh Yadav , Jeykumar Sankaran , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten X-Mailer: b4 0.13.0 When dual-DSI (bonded DSI) was added in commit ed9976a09b48 ("drm/msm/dsi: adjust dsi timing for dual dsi mode") some DBG() prints were not updated, leading to print the original mode->clock rather than the adjusted (typically the mode clock divided by two, though more recently also adjusted for DSC compression) msm_host->pixel_clk_rate which is passed to clk_set_rate() just below. Fix that by printing the actual pixel_clk_rate that is being set. Fixes: ed9976a09b48 ("drm/msm/dsi: adjust dsi timing for dual dsi mode") Signed-off-by: Marijn Suijten --- drivers/gpu/drm/msm/dsi/dsi_host.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 9d86a6aca6f2..c80be74cf10b 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -356,8 +356,8 @@ int dsi_link_clk_set_rate_6g(struct msm_dsi_host *msm_host) { int ret; - DBG("Set clk rates: pclk=%d, byteclk=%lu", - msm_host->mode->clock, msm_host->byte_clk_rate); + DBG("Set clk rates: pclk=%lu, byteclk=%lu", + msm_host->pixel_clk_rate, msm_host->byte_clk_rate); ret = dev_pm_opp_set_rate(&msm_host->pdev->dev, msm_host->byte_clk_rate); @@ -430,9 +430,9 @@ int dsi_link_clk_set_rate_v2(struct msm_dsi_host *msm_host) { int ret; - DBG("Set clk rates: pclk=%d, byteclk=%lu, esc_clk=%lu, dsi_src_clk=%lu", - msm_host->mode->clock, msm_host->byte_clk_rate, - msm_host->esc_clk_rate, msm_host->src_clk_rate); + DBG("Set clk rates: pclk=%lu, byteclk=%lu, esc_clk=%lu, dsi_src_clk=%lu", + msm_host->pixel_clk_rate, msm_host->byte_clk_rate, + msm_host->esc_clk_rate, msm_host->src_clk_rate); ret = clk_set_rate(msm_host->byte_clk, msm_host->byte_clk_rate); if (ret) { -- 2.44.0