Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2374263imm; Sun, 7 Oct 2018 02:42:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV61AupHt/h1l8vEqK4FMTHc5ksKdAlutPeRdkOnb0HbJ2BnQb2HABLRraMlbw+dIp+drtPqi X-Received: by 2002:a63:a612:: with SMTP id t18-v6mr11866225pge.338.1538905369103; Sun, 07 Oct 2018 02:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538905369; cv=none; d=google.com; s=arc-20160816; b=gYb/2FMWX3L81z5drlE/IfCX7BXLgOKVXOjPL8CESeBWyE+yGjcXEgfUuwJXV3C2Q1 WHz3lY+4M+OvyVt+poxr+m3EoXhoPRNVoMdMwLs4EQTz7Pb4bJH7f/W+wnr+TOnp8a/B 4JD/QRnTxtOYCpYwdChuNVu2na5XVen9b3meAa40bs++yG11hJf2WjBoauefJEy7A+SL 28dpg4PzMvkYZEA6buD4kb8/uxBXFfqz92T0Wai3R+F+yVOymWWEXURz6+DgP8h4aohv s0QKMHxCy/s+L2HnomjrX9kD6PqTwg7MyNKyo+1ZiT9mIGkmxZQFJWjoDVWpS1LYH7Yb tY4Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AtaJGjlVB4svPnlexW3fB+tdesEBBqo2+xlzVtqYQe4=; b=FL3AyUpTvcbEpMGmaC+018eSNrou0r5Gz3vp0dwsxFXPF6cjH+4kwFCgQ7+B1KI7EV /BXuYxKivg+egfSJ3FqXNFoz2XR3ByVDi3KG8eJuZGWoHPyNC/YeqFMsbaLXxQo7wkYB 7pUtXPYT+zeTJkSJuAm7pQByp5eCWgMOJXfSIbwOHi7ZVAwmCWhLxL59BAwqFZfruH18 Cmr6IUmB1M2diPp5vNN3u2VGyh0wINXqG5jcV94xcRI5EKpQVFT99Pti4akzUwDIIZqC J3AFsoIKIKYXaGGn5ChYPrXOX3/6dQXCRqHEGZ3QqzrVLKvErckcsO9nhSydf4lrkXMx /RyQ== ARC-Authentication-Results: i=1; mx.google.com; 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 f94-v6si16797562plb.10.2018.10.07.02.42.04; Sun, 07 Oct 2018 02:42:49 -0700 (PDT) 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; 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 S1728450AbeJGQqt (ORCPT + 99 others); Sun, 7 Oct 2018 12:46:49 -0400 Received: from mailoutvs15.siol.net ([185.57.226.206]:39964 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728434AbeJGQqs (ORCPT ); Sun, 7 Oct 2018 12:46:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 2386C520CCB; Sun, 7 Oct 2018 11:40:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta10.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta10.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gXfKEw2psVll; Sun, 7 Oct 2018 11:40:02 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id B0D60520CCE; Sun, 7 Oct 2018 11:40:02 +0200 (CEST) Received: from localhost.localdomain (cpe1-8-82.cable.triera.net [213.161.8.82]) (Authenticated sender: 031275009) by mail.siol.net (Postfix) with ESMTPSA id 3248A520CCB; Sun, 7 Oct 2018 11:40:00 +0200 (CEST) From: Jernej Skrabec To: maxime.ripard@bootlin.com, wens@csie.org Cc: robh+dt@kernel.org, sboyd@kernel.org, airlied@linux.ie, architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com Subject: [PATCH v2 18/29] drm/sun4i: dw-hdmi: Add quirk for setting TMDS clock Date: Sun, 7 Oct 2018 11:38:54 +0200 Message-Id: <20181007093905.11253-19-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181007093905.11253-1-jernej.skrabec@siol.net> References: <20181007093905.11253-1-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It turns out that H6 HDMI BSP kernel driver doesn't change TMDS rate at all. At this point it is not clear whether it is just not necessary or it would cause some kind of issues. Add a quirk for it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 5 ++++- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4= i/sun8i_dw_hdmi.c index ec122136ee9d..e9e93f174b35 100644 --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c @@ -165,7 +165,9 @@ static int sun8i_dw_hdmi_bind(struct device *dev, str= uct device *master, goto err_disable_clk_tmds; } =20 - drm_encoder_helper_add(encoder, &sun8i_dw_hdmi_encoder_helper_funcs); + if (hdmi->quirks->set_rate) + drm_encoder_helper_add(encoder, + &sun8i_dw_hdmi_encoder_helper_funcs); drm_encoder_init(drm, encoder, &sun8i_dw_hdmi_encoder_funcs, DRM_MODE_ENCODER_TMDS, NULL); =20 @@ -235,6 +237,7 @@ static int sun8i_dw_hdmi_remove(struct platform_devic= e *pdev) =20 static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks =3D { .mode_valid =3D sun8i_dw_hdmi_mode_valid_a83t, + .set_rate =3D true, }; =20 static const struct of_device_id sun8i_dw_hdmi_dt_ids[] =3D { diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4= i/sun8i_dw_hdmi.h index a645b8bc9f58..f9eb663865a4 100644 --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h @@ -173,6 +173,7 @@ struct sun8i_hdmi_phy { struct sun8i_dw_hdmi_quirks { enum drm_mode_status (*mode_valid)(struct drm_connector *connector, const struct drm_display_mode *mode); + bool set_rate; }; =20 struct sun8i_dw_hdmi { --=20 2.19.0