Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4305323pxf; Tue, 23 Mar 2021 07:42:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw15TU+pyEyVwfBqLKo+SwJ8lqP1LkP8P3JHwitdPQftVJfaguEn/97BbSSjqk5oY20gQZX X-Received: by 2002:a05:6402:10c6:: with SMTP id p6mr4847027edu.241.1616510570266; Tue, 23 Mar 2021 07:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616510570; cv=none; d=google.com; s=arc-20160816; b=bqSBTSXYlMiamBJ/Z20lyPpLSwzE5LfqCKEQ/F/9NQcuj+O1MCK9RPGPVSTWpSJ/+H kQNxMz9RIeNMq69TauEXSHAo0l+wH1zrVUR9MO8smzGhAe8Xwf7eXfP1F0p/JIUOm3m+ u6caLZ4Ug43duowVYeD6l+uHoAIlB4fdFu3Ox68LIxnNsk0dnAAGmrbziDEoE24Z7MdC DKt6SSFVoIOISKL0GnVpT3m4vxrn7NNNMFgpXgCYHdPtwwDlVHB6W8ztgJPQlVVcCgtg 5Q30PIOY8jZPbZZwTrhJNJIImNIAKxmaebi3okNJk8Jhb6J5CK8uk0BekqEfV2//MoWp 5ItA== 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 :message-id:date:subject:cc:to:from; bh=ThY+8Kfa+bQhDfSCqhluDJGrSKCuKIiulX1+1vuqDKg=; b=t5gmHEbtbBfVf/3GQ2awX94+Ex5N6mGz8pfXL0TwwC3DH+LrZ9WVgaSyQDAT84MZsT yOVPo99OR0nMINjjuUOhaIAk9Ljw2u2XVzuJR3YZRRr6HLBo98mXQDEus1Xx/2zrNjBj Mn+a+cowHObn98Fm5ljdUV8rm8yVGobXiYboztXsSiDdUHXqxoLvinSPzsYw1Xu29kcl K7VU+j/nqkl4xiGU3okHTXAoeP8v8HON3vER0TGIuG0+t9lBnT/Iac2JRfRgLLExBZd5 3AbKrO/Dz2oO/A+25u36B2J5uWudhSPZVlQTtpvgUJL5igvF0AfVelxXHMBSfcWwI1l4 n+Zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay5si14165913ejb.692.2021.03.23.07.42.26; Tue, 23 Mar 2021 07:42:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232317AbhCWOk4 (ORCPT + 99 others); Tue, 23 Mar 2021 10:40:56 -0400 Received: from aposti.net ([89.234.176.197]:56082 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232037AbhCWOkg (ORCPT ); Tue, 23 Mar 2021 10:40:36 -0400 From: Paul Cercueil To: David Airlie , Daniel Vetter Cc: Sam Ravnborg , od@zcrc.me, linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Paul Cercueil , stable@vger.kernel.org Subject: [PATCH] drm/ingenic: Fix pixclock rate for 24-bit serial panels Date: Tue, 23 Mar 2021 14:40:08 +0000 Message-Id: <20210323144008.166248-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When using a 24-bit panel on a 8-bit serial bus, the pixel clock requested by the panel has to be multiplied by 3, since the subpixels are shifted sequentially. The code (in ingenic_drm_encoder_atomic_check) already computed crtc_state->adjusted_mode->crtc_clock accordingly, but clk_set_rate() used crtc_state->adjusted_mode->clock instead. Fixes: 28ab7d35b6e0 ("drm/ingenic: Properly compute timings when using a 3x8-bit panel") Cc: stable@vger.kernel.org # v5.10 Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index d60e1eefc9d1..cba68bf52ec5 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -342,7 +342,7 @@ static void ingenic_drm_crtc_atomic_flush(struct drm_crtc *crtc, if (priv->update_clk_rate) { mutex_lock(&priv->clk_mutex); clk_set_rate(priv->pix_clk, - crtc_state->adjusted_mode.clock * 1000); + crtc_state->adjusted_mode.crtc_clock * 1000); priv->update_clk_rate = false; mutex_unlock(&priv->clk_mutex); } -- 2.30.2