Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13473592ybl; Sun, 29 Dec 2019 12:45:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxM7dDGgpC0m+NBIPB4Kr3CMy2fSjzQW00Q6Gbte1qYi4OUqCVcOWuKHBOEFYhyd7061bC9 X-Received: by 2002:a9d:784b:: with SMTP id c11mr66676097otm.246.1577652350635; Sun, 29 Dec 2019 12:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652350; cv=none; d=google.com; s=arc-20160816; b=arBV1MWg3YbxXXviD2ydcUBrDXBdaIni6T/5dHahVjvkWsOrXDqUfdfFu5+7NyxRI/ czWZ0ZMAqt/VgYf8Ow7dvoq4Ws/BJAACxpvSR9UJ0wd4z+YmCb6cCu+4Cn/jZdTikYsq r8nrV5CbNl1vkWsm9p3Me7C2s49jsDrVIH61ZjUxnvWSObKh+5YHJNFKiivGR1v2c//H rWOpISmhevk2Rj1kCCRfKJ2ShWxDkFSOQ+6dfAC7hWoue2emlwnng0+QwHUeLtDVKe9N C8NPD724nj0j1Qfp++aGDBHjhhNGkgeUJB2I+AEHvTgjlIQyijC+MgXDOhh73J7ERqqE 6Oig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mY9hho1+UkAKjVM8Nb97Rz9SGBT+rpzxiko0+1hEMRo=; b=LZc0csYA5B+/m66rYoPyO1voLvB9/HELS+LQeR5b5vg/fUysxCdRADSn5V6JqR2tpi 1nFqWVSSf43Jsj04P3QdATzE7f1ThZXyC22gVhoP0UsDKDYvqvVpcvmf3QZ3B3EVTumv JcfWETyXqLeuHlQXlEDiJyczunNqQ6T8bxl//bI/mci8+Z/V2Op0eUFPCXCufwUZGteU KedfBBH+LO93/m11jARskfBvrtRXouUSr/eSTQZlG1ZB5IO5XPrbl8qGUUg3pZp1Hmqj TcnqiEb3dk72zhUxLXdafLkJxuhFYn7hNguKcJir8XWdhOADb1ecDdOzvTKLRFVUt/FW wvXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jGmyPA4i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w29si25095139oth.313.2019.12.29.12.45.39; Sun, 29 Dec 2019 12:45:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jGmyPA4i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730889AbfL2RpY (ORCPT + 99 others); Sun, 29 Dec 2019 12:45:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:54362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730547AbfL2RpV (ORCPT ); Sun, 29 Dec 2019 12:45:21 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF385206A4; Sun, 29 Dec 2019 17:45:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641521; bh=+dygn76/IYAa2qso1+W1AAo3SPb0oDeGOQgT+IRdVls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jGmyPA4iOnlX7BDHSet/L+Eqix0d9RxuZNSMptYEr1cxXdbSCmkOK/9xkHfvhJrly WFS/JfGKUtGRt0JbAKzvDkqnWB9dfxFnoKCYlDUQQ3iZk9yB6DG4FPWzKdhzt2x3nH Cmo78PUO9gp4GAt3V3UMRdfXAqbSbaL8SyfiMqHU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Neil Armstrong , Kevin Hilman , Sasha Levin Subject: [PATCH 5.4 063/434] drm/meson: vclk: use the correct G12A frac max value Date: Sun, 29 Dec 2019 18:21:56 +0100 Message-Id: <20191229172705.970433065@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Neil Armstrong [ Upstream commit d56276a13c2b9ea287b9fc7cc78bed4c43b286f9 ] When calculating the HDMI PLL settings for a DMT mode PHY frequency, use the correct max fractional PLL value for G12A VPU. With this fix, we can finally setup the 1024x768-60 mode. Fixes: 202b9808f8ed ("drm/meson: Add G12A Video Clock setup") Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20190828132311.23881-1-narmstrong@baylibre.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/meson/meson_vclk.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c index ac491a781952..f690793ae2d5 100644 --- a/drivers/gpu/drm/meson/meson_vclk.c +++ b/drivers/gpu/drm/meson/meson_vclk.c @@ -638,13 +638,18 @@ static bool meson_hdmi_pll_validate_params(struct meson_drm *priv, if (frac >= HDMI_FRAC_MAX_GXBB) return false; } else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXM) || - meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL) || - meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) { + meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL)) { /* Empiric supported min/max dividers */ if (m < 106 || m > 247) return false; if (frac >= HDMI_FRAC_MAX_GXL) return false; + } else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) { + /* Empiric supported min/max dividers */ + if (m < 106 || m > 247) + return false; + if (frac >= HDMI_FRAC_MAX_G12A) + return false; } return true; -- 2.20.1