Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1892175imd; Sun, 4 Nov 2018 11:51:42 -0800 (PST) X-Google-Smtp-Source: AJdET5dNiTuBcWoITaidxH6TS3alvXlFDIWIGiwalCjNek/I8a1O2wT+cpwuBrTyZuULfGINHjFZ X-Received: by 2002:a17:902:244:: with SMTP id 62-v6mr19922544plc.280.1541361102478; Sun, 04 Nov 2018 11:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541361102; cv=none; d=google.com; s=arc-20160816; b=PE0fGrxHeCbcya+5gMEG5Fxi82PGtre/mpVUStTN81dK/E07SpMqhIvuQwAVUp1pcy 8OJs2lWzx75AWW+uH+SUQD7g6uFxZjmg6t7WqrKdoP/sgHBpdgznt14HFWAqnwGfwVJc lAqlBN/NIj5ULtkkEPnZBWKt7Wy+SuynvXLGnQSld46zV7/RMn2yNESAAP0rh9n3XpEA xZrI79yGOyvQfxIEWOAkVS24LhXh48Sd7S8Fgw/wSOCBueDqhuVPRLm17joUqCLCZKb4 lCs6YOY6idwk9H1Ocfss40Pelz8+PYVYgWQwJugKXvIx73Z78EGiUE3GTgzdMMm7Gm+Q pUAA== 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=C4/VFwGjZwfoeIvRrBI7Cw+kqfIIDnbk9Y6YkR47H08=; b=OKY+UyasEBzCSpBGw4LmbSTSTf9tgYY8592A3Dvao1wJ2tHKpJAJmhcC1Rdi5s4Rnn YTI5nvlY76pbeLs0x7NPnoDEV7XiFfOZT0c5cLFmejmBfBCBD5mVWARsPFT9/O6NHQYX R+tB6TZEXlsDp3UR+lF5hHg3TDbWcKvJq43Sj0CPN7Io/Aa4FVrDawuEoG6n3AVy817l xHzYkpRWRkOwNEVtNM8G/tyRaJLMKt0iaSO735iUCYlc5O0Mq/zSLnMFcP56q81MFk/S 2wIRL/EHGTcwAbnosH2o2wPZTKkK/ZF7EeQEHxYFGDPsHeFXcYrl9dVhyopuv0BoKD5M QvXw== 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 k8-v6si32341627pgj.192.2018.11.04.11.51.28; Sun, 04 Nov 2018 11:51:42 -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; 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 S1731606AbeKEDoO (ORCPT + 99 others); Sun, 4 Nov 2018 22:44:14 -0500 Received: from mailoutvs52.siol.net ([185.57.226.243]:47530 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387642AbeKEDoO (ORCPT ); Sun, 4 Nov 2018 22:44:14 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 0E1AF5212AF; Sun, 4 Nov 2018 19:28:19 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qEY29JUYDUWJ; Sun, 4 Nov 2018 19:28:18 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 8C85B52128D; Sun, 4 Nov 2018 19:28:18 +0100 (CET) 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 E19DF5212CB; Sun, 4 Nov 2018 19:28:15 +0100 (CET) From: Jernej Skrabec To: maxime.ripard@bootlin.com, wens@csie.org Cc: robh+dt@kernel.org, mturquette@baylibre.com, 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, jernej.skrabec@siol.net Subject: [PATCH v3 17/28] drm/sun4i: dw-hdmi: Add quirk for setting TMDS clock Date: Sun, 4 Nov 2018 19:26:54 +0100 Message-Id: <20181104182705.18047-18-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181104182705.18047-1-jernej.skrabec@siol.net> References: <20181104182705.18047-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. Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 4 +++- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 1 + 2 files changed, 4 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..99b878e380e1 100644 --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c @@ -21,7 +21,8 @@ static void sun8i_dw_hdmi_encoder_mode_set(struct drm_e= ncoder *encoder, { struct sun8i_dw_hdmi *hdmi =3D encoder_to_sun8i_dw_hdmi(encoder); =20 - clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000); + if (hdmi->quirks->set_rate) + clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000); } =20 static const struct drm_encoder_helper_funcs @@ -235,6 +236,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..49c9e80c46ea 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); + unsigned int set_rate : 1; }; =20 struct sun8i_dw_hdmi { --=20 2.19.1