Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1896888imd; Sun, 4 Nov 2018 11:59:25 -0800 (PST) X-Google-Smtp-Source: AJdET5eMx/IACm278JOEk8b79UXge9lZ0mKvJKwbhBdSLV/XTGx+EGpf1ml2KbVYH8Hu29QtsnY2 X-Received: by 2002:a63:14e:: with SMTP id 75mr18021651pgb.340.1541361565092; Sun, 04 Nov 2018 11:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541361565; cv=none; d=google.com; s=arc-20160816; b=HQhx02nZF1T29TVlfwKYpZ2Xe6AVLDPa3ETj7BFY9S6YG2+SPeDEwNTsei8vDDmKyY tXa0s4067/41Xf35MquSOH/335F0AdUfp5PTC9ueysL66sT3iRvvxMBpREDPfnB+b8Dd 2/f+pZuPDvV58GKC2XO1VDJ3a4Klrwy7UgXp3ZqALTqOxICh9uPmH1EmyFD3SC4RPd6a EK9l+GS/VYfdoGmX7BYTgWNSVQcRyFOZajGty+1clHlkAHi77loVpyI7FstbX5WteIS+ kjfYnI7PcLvrI+77C4BQt5QG3WUsI1TKNHYW2AVEIf8q0fRfLFPbGQBa4x8/2zuFNBMm kPQQ== 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=xjyRqas0Q0kXikq6cQyvCuFHAWoJecrceZ6Qi6lDGoM=; b=u2nqjsid3Nskx4tHd8LjoKD03KMKqeL6eff8eswoFqHOabTMSFCZ78KsbDa9qL0UNs 2GVPtPW0tKjCPn8YAg6PltutnaM2S6+KJEjVAmRDmSHyWNjn79B1ZaswrHxh51x8bRm1 vw5O5wClVdhCu9n6jMSHtWNHh9WhT7NFexk/wNTG7z86OblGeSi/lrdDPd1G+/7zKYaK DZrzWaP3406tRD9vDt9GAtViyOGNy7FZWbEcrO72umhT2nEKv5zN1qKoGtU4aH1C2r1c gKvDzc8tNw2jUvtbMt5eS6I4oUZc+kBTUWqcHI/AG88yN1DllqjlxgQgcpHhs6ouuEXO P5tg== 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 r29si12604080pga.477.2018.11.04.11.59.09; Sun, 04 Nov 2018 11:59:25 -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 S1731756AbeKEDoU (ORCPT + 99 others); Sun, 4 Nov 2018 22:44:20 -0500 Received: from mailoutvs7.siol.net ([185.57.226.198]:47598 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731652AbeKEDoT (ORCPT ); Sun, 4 Nov 2018 22:44:19 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 351E8521293; Sun, 4 Nov 2018 19:28:24 +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 i5h9__RSLgrs; Sun, 4 Nov 2018 19:28:23 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id CC86B521270; Sun, 4 Nov 2018 19:28:23 +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 20D72521294; Sun, 4 Nov 2018 19:28:21 +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 19/28] drm/sun4i: Add support for H6 DW HDMI controller Date: Sun, 4 Nov 2018 19:26:56 +0100 Message-Id: <20181104182705.18047-20-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 H6 has DW HDMI 2.0b controller v2.12a. It supports 4K at 60 Hz and HDCP 2.2. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4= i/sun8i_dw_hdmi.c index 99b878e380e1..445cca8d9a26 100644 --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c @@ -44,6 +44,17 @@ sun8i_dw_hdmi_mode_valid_a83t(struct drm_connector *co= nnector, return MODE_OK; } =20 +static enum drm_mode_status +sun8i_dw_hdmi_mode_valid_h6(struct drm_connector *connector, + const struct drm_display_mode *mode) +{ + /* This is max for HDMI 2.0b (4K@60Hz) */ + if (mode->clock > 594000) + return MODE_CLOCK_HIGH; + + return MODE_OK; +} + static bool sun8i_dw_hdmi_node_is_tcon_top(struct device_node *node) { return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && @@ -239,11 +250,19 @@ static const struct sun8i_dw_hdmi_quirks sun8i_a83t= _quirks =3D { .set_rate =3D true, }; =20 +static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks =3D { + .mode_valid =3D sun8i_dw_hdmi_mode_valid_h6, +}; + static const struct of_device_id sun8i_dw_hdmi_dt_ids[] =3D { { .compatible =3D "allwinner,sun8i-a83t-dw-hdmi", .data =3D &sun8i_a83t_quirks, }, + { + .compatible =3D "allwinner,sun50i-h6-dw-hdmi", + .data =3D &sun50i_h6_quirks, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, sun8i_dw_hdmi_dt_ids); --=20 2.19.1