From patchwork Tue Sep 22 20:31:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicente Bergas X-Patchwork-Id: 11793055 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19AA0618 for ; Tue, 22 Sep 2020 20:31:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C532B2388B for ; Tue, 22 Sep 2020 20:31:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zYet+YoV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CoXHm0ea" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C532B2388B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lQqsh1gedNejmkqRCzoeXj6AkpCA44cCPcGXdvFSgV8=; b=zYet+YoVro3HMFdsayzj7Wp5k 5Pg8haGLNjCGmIDxe/ECUD/mgJgEq7HJ0NZu2CC+uoz1fCD0QXIAsIV1ppIx3zUwUdx3sloRZYB7Z 9/5RM504/rjzeonOe7Q5mQF3mnpQmSSCIaUD18QQVokFS89MRbVJ4mEzqFZzuBeVyDrjvvAVuSZnx 3aUXxKbXBB2fZHz1Snnru47m024gYPbxtQo8GoqTP+siHOkh8KJj+6YsnVcfkx62UYbHKJI219vD6 Y7fR8ysEu6YDfCvJd6YWacIxFGQQ6H4mN8D9o54aptV49eNno7n/CgKHW7TEV8/AJAD2bVVSpL80t HrwM0u63A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKowi-0003rA-Fd; Tue, 22 Sep 2020 20:31:28 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKowe-0003pL-IR for linux-rockchip@lists.infradead.org; Tue, 22 Sep 2020 20:31:25 +0000 Received: by mail-wr1-x441.google.com with SMTP id c18so18522169wrm.9 for ; Tue, 22 Sep 2020 13:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WFdc4SH1Iulou9qYgYBQGfoZtnnhVU1CnDj8vAu45kc=; b=CoXHm0eaOneQq4NOeA+r/ftMb0wf9sIVBeynoAxaeqawgA39as5IwJfpGsqCGWrUK4 zG1CsoWq7MqNSHgxictCRpJlOY7LjwqnGrKkfuQvToF1vsxmQh9mam33dAEUT6mNK7Ba u5h7dvQix55Kuw4FZuBQxMOh7ymb7CIAevecuv2vLW1q4e1+76YftuMEavlFpLLpY5Au SJ3k18lbu/QsI/+YiwoTy5ZMSvAlYcBb3BOueGrTFVmgQiLGgQGhMa2z0BwtGD/4XX9e CjfMdtfO25dsvzPzXaKPtjxya5n2Xr3QYbtbQzW73pTkeoDDBq+zHr07O67fYr8vIhwv Yqcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WFdc4SH1Iulou9qYgYBQGfoZtnnhVU1CnDj8vAu45kc=; b=ExQU//0ySD6QSdIe1M9Htj8Sw+gQT2EYqA2/fY1+m2aCiIe0OSYWnT+9lUn7ne/IoR 0Jahx1qUfVcO/bFQ56H+LtLLukWsjmHxy1P8k0BNrxpv1kJQZRg6rUuGTN2REPhqzp0u AxpRmyjGGHHf5lLy9p0QA+4uuB9PXwOCSg36Kn12nJLsnaSc+Rz++tsbiI5L0WB06jck CxhWHqDJlE4xAmYf1vMgefNGKGNzf9mHrJBKkEp9PGutcKKTLCb1QOyPVyjxxm8F85q5 BYpv88njRwE2ab0Zpfecs5Xsxp5hrncnh5ykkzfT9NHROg0Npdh0xWckhNAHyxi8X1YM t8Hw== X-Gm-Message-State: AOAM533yNZpX74k4G6FXBp81h48N898mWfOvV1PeC6kfyIpEnI+pkrB4 vnhQNb0iHDk9MwFy6ClEWet9xBiflWqKNw== X-Google-Smtp-Source: ABdhPJz1a/9PvGrBgYj/xTM5peJkjvqZ6wo444zg84ZzKqMUizLT0jDE3tcOqaLR/ocL4N+77TX/XQ== X-Received: by 2002:adf:e3cf:: with SMTP id k15mr6764290wrm.291.1600806683396; Tue, 22 Sep 2020 13:31:23 -0700 (PDT) Received: from localhost.localdomain ([170.253.46.69]) by smtp.gmail.com with ESMTPSA id r14sm27256849wrn.56.2020.09.22.13.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 13:31:22 -0700 (PDT) From: Vicente Bergas To: Doug Anderson , crj , Andy Yan , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v2 1/3] drm: rockchip: hdmi: fix clock rounding code Date: Tue, 22 Sep 2020 22:31:05 +0200 Message-Id: <20200922203107.2932-2-vicencb@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200922203107.2932-1-vicencb@gmail.com> References: <20200922203107.2932-1-vicencb@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200922_163124_678073_DE473F23 X-CRM114-Status: GOOD ( 13.07 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [vicencb[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vicente Bergas Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Under certain conditions vop_crtc_mode_fixup rounds the clock 148500000 to 148501000 which leads to the following error: dwhdmi-rockchip ff940000.hdmi: PHY configuration failed (clock 148501000) The issue was found on RK3399 booting with u-boot. U-boot configures the display at 2560x1440 and then linux comes up with a black screen. A workaround was to un-plug and re-plug the HDMI display. Signed-off-by: Vicente Bergas Tested-by: Vicente Bergas Reviewed-by: Douglas Anderson --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index c80f7d9fd13f..92efbd899dee 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1176,12 +1176,9 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc, * * 2. Get the clock framework to round the rate for us to tell us * what it will actually make. - * - * 3. Store the rounded up rate so that we don't need to worry about - * this in the actual clk_set_rate(). */ rate = clk_round_rate(vop->dclk, adjusted_mode->clock * 1000 + 999); - adjusted_mode->clock = DIV_ROUND_UP(rate, 1000); + adjusted_mode->clock = rate / 1000; return true; } @@ -1380,7 +1377,7 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc, VOP_REG_SET(vop, intr, line_flag_num[0], vact_end); - clk_set_rate(vop->dclk, adjusted_mode->clock * 1000); + clk_set_rate(vop->dclk, adjusted_mode->clock * 1000 + 999); VOP_REG_SET(vop, common, standby, 0); mutex_unlock(&vop->vop_lock); From patchwork Tue Sep 22 20:31:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicente Bergas X-Patchwork-Id: 11793059 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27784618 for ; Tue, 22 Sep 2020 20:31:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAAFD235FD for ; Tue, 22 Sep 2020 20:31:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="v1VeOsSw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OagBs5Mr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAAFD235FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nW+lZmLIWRUz1OH1K3PBzPu/GbDXecePDaDqukhiluk=; b=v1VeOsSwuzIcgglVajoN2cHOW MdMdfdLbS/jNHmpBtkiW/eCpfzioX0aP2iGFdsiWavuHpdakN57nbKePtONvPqU7CQdVvcQjMRUcU hoIJ1Dr+Np0ffzLl981YDflsWnmKFAkMuL07sXJJ5AfeHTfPq1VpVdJZ0pM3KHhQPRh4LqGV/I/xL Ckkun0cl8syecFDGGj87LN6Az0+wJBYLQX6lFNqHC1yDMK98zW4MgAqlp/WSg6oA7skzoKrhzjB7O MkAjU+SLkjAbaoH6qm8ug4R7AOLhmZn6ZqglhGQAItBzXUSN3gVRivqC/JcJATrpY3cz9uYJWg+xa QvtAGiI4A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKowk-0003rm-DS; Tue, 22 Sep 2020 20:31:30 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKowf-0003px-Ia for linux-rockchip@lists.infradead.org; Tue, 22 Sep 2020 20:31:26 +0000 Received: by mail-wr1-x441.google.com with SMTP id a17so18496496wrn.6 for ; Tue, 22 Sep 2020 13:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K7apNRD9MQ+dEbnQVbfSw0In2eqPMXGuCV372ylb3ZQ=; b=OagBs5Mr581914UQu8F6d9SAwSkG5/gcggEYnmLSooih5w9+pvahrzoIo2l+4uXwRw wjaY4E8zGIqTlotqJhMU8FHlmwguHxCbYQKhPJYXCRYfYeFeeUYVCGEbyRRAAeLMpDPJ HSe8JFQioKful9hDEQIeYIMkv2sUsxjDpYInrA9RfSc17XwQ3IUqXuHcX2s0v3dkg/2J nNijXALVdV8Jufj78uqr2Q2Jyh2HwnAaTdTSA5wJ958V4f6P3ovWd2t3URWp0bHmqw0E V5uRcAHj+NbxkdGvpdwu3JllgyS0RkuQpFv2URaWLwDYNTVlAaGuqW1ZTQUWip7PVARJ NlYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K7apNRD9MQ+dEbnQVbfSw0In2eqPMXGuCV372ylb3ZQ=; b=B5pI5UKUnTy3xEYyNG/+G0rhCvspy34XuJiiOBqIrJYJ+xeOhhtFdqxUhQw6pltGVf h70QUSf+Bv3HnjRXVU/3p+bduQqx/KQLRYe2Pu8AN1pmDdWUKFPBhrRZX4DfFbu4N+C6 3SdSvplfH6DWd2X+wATYCcvHlKhziBdpVPNAe6AO7ORoj4LJf73oLU+nfQoFy+voeIPx 3GIssFX8ObOYjXXNRHWda0CUaFj4LQW533v4QqYO2xsJqPo7SvChv+wsQXd44HNctY0T HvOrpY4Dy/yyrtZnvEW+8VZiVdY+q1/sjq3NVdaVAe2Shg4kZr4Ygj7eKRG1McGahYU3 h1Zg== X-Gm-Message-State: AOAM530S6Hv1bV9u+J3viU/S02MRaGl0rVLGWmWD2usLagtstNHaaQ1y yddbIgtSGA9IQptZ+pQow04= X-Google-Smtp-Source: ABdhPJx50jBkOlmQ/FbMgVAs/A5mIKKUMOJHkjBKcDGQzYUJcDfEyFDWSptl/aeOyIz3/TeA/+7d7g== X-Received: by 2002:adf:81c6:: with SMTP id 64mr7064800wra.176.1600806684782; Tue, 22 Sep 2020 13:31:24 -0700 (PDT) Received: from localhost.localdomain ([170.253.46.69]) by smtp.gmail.com with ESMTPSA id r14sm27256849wrn.56.2020.09.22.13.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 13:31:24 -0700 (PDT) From: Vicente Bergas To: Doug Anderson , crj , Andy Yan , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v2 2/3] drm: rockchip: hdmi: allow any clock that is within the range Date: Tue, 22 Sep 2020 22:31:06 +0200 Message-Id: <20200922203107.2932-3-vicencb@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200922203107.2932-1-vicencb@gmail.com> References: <20200922203107.2932-1-vicencb@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200922_163125_731651_6F61E61B X-CRM114-Status: GOOD ( 14.45 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [vicencb[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vicente Bergas Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org For a video mode to work it suffices that the available bandwidth is large enough. There is no need to have an exact match. This greatly expands the list of supported monitors. Signed-off-by: Vicente Bergas Tested-by: Vicente Bergas --- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 23de359a1dec..87a9198f7494 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -230,7 +230,7 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data, int i; for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) { - if (pclk == mpll_cfg[i].mpixelclock) { + if (pclk <= mpll_cfg[i].mpixelclock) { valid = true; break; } From patchwork Tue Sep 22 20:31:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicente Bergas X-Patchwork-Id: 11793061 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9724492C for ; Tue, 22 Sep 2020 20:31:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38765235FD for ; Tue, 22 Sep 2020 20:31:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lVkylUmz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vVA6LLgG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38765235FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gz7vSY1j1JemrhGA5MmXoNSLfar46qxWcuuQn6etEIU=; b=lVkylUmzFCaL+FoiJag58w29X EK05seNxKJS+Enfp+B1GtyVieiPyPdBpyETdHIEMuDIzrjUZPj8Ko1odVtG3zNe0hwf8xhVCiHG/m Zml5alJX07qS+wIAEtL7dF+3GRbnx87lSLt2WX98uy++ufJTbwMf/LkROBqgTcdda2eOGk5ZMADH9 ReaQ6KyRRnnUx6YNSTHfQip+zU8KdZYWSh/lGFz0U2nNTjO60kZTmypLx7gk2tykTWxAWh8mTC/4M ndwlCimUqvfHndXGp8Y5d72HU9HHjA4fzenpC33gfxL4uNZTXKmZyo/ofDXEjP10sudXWbu8ngKT2 9+ySWtQ9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKown-0003sp-0Z; Tue, 22 Sep 2020 20:31:33 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKowh-0003qW-0l for linux-rockchip@lists.infradead.org; Tue, 22 Sep 2020 20:31:28 +0000 Received: by mail-wr1-x443.google.com with SMTP id s12so18517986wrw.11 for ; Tue, 22 Sep 2020 13:31:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/ACUgjSRhezgf6ut/YNpIRBfmecqG58PBv3yXYOEimo=; b=vVA6LLgG8jwWQguQZR4gVTXEp160a50BMNzyRiQUhwEHIgxAB3qPPlwvXKmyIOLqe4 EWMSpiGjRuH22WiVKvFPxKzQE7p86aevN4bPO+wsC8YTKf3Qkrtcpg1rrrghvnvCU5rC BntTw3iKjTUEZHEfM1+dN0dfr2lx6kHCh89CMV20OYneUhftADpnifhJlZtu3K/GyJ+o TSPDXnTKUJhRtACorada1t6yRQtVHeIBd9mvGGiYLXqvd3ooDC2XZcW03Dkpu9EGolM5 iTFZ2sj8Pfn0QZ6u0BcsxLjcSnyY+BCINk/6Gk9S9wqH28+HL9VuBfUqmcQwTf+yrj92 EN6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/ACUgjSRhezgf6ut/YNpIRBfmecqG58PBv3yXYOEimo=; b=idKhtYmxNh5CFfhaFk+WxhSv4cefVQidvFM14ox4JkI/inBAaFs4QqtEdlPn+TtNmk njoHwXwI//KiYQ6Gr8ka2UEK0SVlolNQUgD/LQ8qfrkYlHYy4wqSIIcTSzyY/9R9Ovgq 54PybBX9+miVwUIaV8kgqPiAvTQPzs8mjtAOoz/zAw8WZ7Q9PtzYFRZ8fbyHVufVnS+t WuzKC/OPhplj7s7HRxck0yGWhBz30U54Razt9OiNMXyAO8ExQ+03Mfb1UELRHi/HJErH roi8XepqoLR+0ChxJpc/9+/MdYzr5isGRGviOt2mqEf7ioNXaHHwQU2zaQp7Ox+PgCMh FzFw== X-Gm-Message-State: AOAM531M1s8jdnUGGkatoLqEigxMxHX11WlFnoMfpbkIlbP6xiNpaMfS xNKTnW7ykKPseeejcNZg81M= X-Google-Smtp-Source: ABdhPJwMq1POLzNAD4zYPSd4peQ88XtIsnbU+Onjj8ugiHJj2wP7WLd6U6NDUDY46Zv9Szf68UPXRQ== X-Received: by 2002:adf:f544:: with SMTP id j4mr7176078wrp.74.1600806686189; Tue, 22 Sep 2020 13:31:26 -0700 (PDT) Received: from localhost.localdomain ([170.253.46.69]) by smtp.gmail.com with ESMTPSA id r14sm27256849wrn.56.2020.09.22.13.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 13:31:25 -0700 (PDT) From: Vicente Bergas To: Doug Anderson , crj , Andy Yan , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v2 3/3] drm: rockchip: hdmi: add higher pixel clock frequencies Date: Tue, 22 Sep 2020 22:31:07 +0200 Message-Id: <20200922203107.2932-4-vicencb@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200922203107.2932-1-vicencb@gmail.com> References: <20200922203107.2932-1-vicencb@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200922_163127_125736_B4B851E3 X-CRM114-Status: GOOD ( 12.94 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [vicencb[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vicente Bergas Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org In order to support video resolutions beyond FHD more bandwidth is needed. The new entry values have been taken from u-boot: https://gitlab.denx.de/u-boot/u-boot/-/blob/ba2a0cbb053951ed6d36161989d38da724696b4d/drivers/video/rockchip/rk_hdmi.c#L63 Signed-off-by: Vicente Bergas Tested-by: Vicente Bergas --- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 87a9198f7494..db4a946f92aa 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -148,6 +148,10 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = { { 0x214c, 0x0003}, { 0x4064, 0x0003} }, + }, { + 272000000, { + { 0x0040, 0x0003}, + }, }, { ~0UL, { { 0x00a0, 0x000a }, @@ -173,6 +177,8 @@ static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = { 146250000, { 0x0038, 0x0038, 0x0038 }, }, { 148500000, { 0x0000, 0x0038, 0x0038 }, + }, { + 272000000, { 0x0000, }, }, { ~0UL, { 0x0000, 0x0000, 0x0000}, }