Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp711808pxv; Thu, 15 Jul 2021 14:09:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0Uo6NL+dV4eR6sjbJI7MR+ZCU6MC9nRxQQGriPtrvlRJi9A3zOGbIcELXVyRItDBkl/Fd X-Received: by 2002:aa7:c3d0:: with SMTP id l16mr9773230edr.225.1626383391120; Thu, 15 Jul 2021 14:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383391; cv=none; d=google.com; s=arc-20160816; b=gV3E0dH3momKPniY9JhfsnnoUlVdOcHr7Qsifbs12L+sxGQ52pLD5ca+wBEzINeOyJ FwtZ4DmP4E2FubLwbNSHOOnJv/GtVOn2b784hl6iTem8FcT4kv7/j+F6HURQOB5KfFTX eEiGM+dteV4OvqkUy9jU8rkvtjiEicmj6v4aj5kTsYWNKYFySqT4d3j6Bulof4M2yySL CgCsA2yxUlTU8dJV07l3hyWJKTa4amxKmjd2vLraxQZPdjDG2QqSRwEM2gja5pirS1bi upia1zJ86umPSNii0lNvezjGjwD2VRRUH/C6fM3yBY6IpE6qpyISWt0hXVgCf30Ue8WG TURw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=espsZ0E1jTHzy6/cAe+W1TzTTR35+kuzykblWdMPanU=; b=GMHf26CUvifQCmBmzyhTTKkUZMRPln2uuncv21wXAU5+hbNCfdH0nVQOcey2KxX2/a WG7UvhOYQeDu2MkLx8qioWqG3birtIjebg8ql1CkkhfFAu7tIXvHkH+HjWdpei3v62bw RDceWKwEIuS+5Dhb6mQBExSUTHBgbwn7QjsymmlezpVo8UrLF3N0uYhxwYxqG2zGV+Kz /znRBkUZ8p4nJHzgZo+UF9m6n8oP24I/J4ZzglHuEPu3hNP5tnYfwMcMaQRSMpTFlHID 5PbLIqSf8HLfjlD2vcXoI6v/AdL5h0XoJmAkIQEgdXQRnT4y/jn3Rg5agTOQiG1dWwPl Z+BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SIUpxo19; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kj17si8751402ejc.159.2021.07.15.14.09.25; Thu, 15 Jul 2021 14:09:51 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SIUpxo19; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245356AbhGOTTj (ORCPT + 99 others); Thu, 15 Jul 2021 15:19:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:38830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240737AbhGOTEk (ORCPT ); Thu, 15 Jul 2021 15:04:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9A8D1601FE; Thu, 15 Jul 2021 19:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375645; bh=NE56XfDYBzeQRAQsBT8J3evwNYFGUI9IN8n1ZYPDVDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SIUpxo19xqeYSm8pycs3l8u/NLwhfo6uIR9Gbf5D6nYzrS4KkvnffA47jjv+x7da2 PslT9lcCi8+FzOTd3+kswnswVHsOIjLdkCegvvgGQy6uN+nPSfGitvv37DCm/XG+TP wfIVK3wm5werrPpFCLrVtDCesmcWc1peU2We9EQs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Thomas Zimmermann , "H . Nikolaus Schaller" Subject: [PATCH 5.12 176/242] drm/ingenic: Fix pixclock rate for 24-bit serial panels Date: Thu, 15 Jul 2021 20:38:58 +0200 Message-Id: <20210715182624.203982376@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil commit 60a6b73dd821e98fe958b2a83393ccd724b306b1 upstream. 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 Tested-by: H. Nikolaus Schaller # CI20/jz4780 (HDMI) and Alpha400/jz4730 (LCD) Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210323144008.166248-1-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -341,7 +341,7 @@ static void ingenic_drm_crtc_atomic_flus 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); }