From patchwork Sun Nov 4 18:26:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 10667135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2268414BD for ; Sun, 4 Nov 2018 18:45:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F22C296D7 for ; Sun, 4 Nov 2018 18:45:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2498296DC; Sun, 4 Nov 2018 18:45:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 98B17296D7 for ; Sun, 4 Nov 2018 18:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Q1SQ3YNzyfDAgSi6GrEcVhlNUIvnNy5LXWNm+FgZLIY=; b=D00CucuSyaweJw EXMDZ5tQqu3+DD3f8uBYQ8Hb8IMSxE7mQG/kwU4H6VfkERvco/3YW3GyuRexqIsnbqoeZnk37g4g0 FbQa7y7jtdBx9Os/LNYP5PeL5rHTRQoTAtGDl5S1O6XLtlLS6AwJpW1PLP3hacOZwaStoQuzuuVlU 9nWr7g5eqzXiwop0DVEZHkfvQ7MOwPSuFrUTWDRIfoTEbda3WYrC1BBm9hhBbAF0tbXMmrShCI4Ji nt3GI+Km2qIM7Y1ADUr7YfYYXvToX82qAKZURMf9GqXV8dCILupbew/0uCT7wmijQxa1JPXNHOkMB RFb5IFc1i0mpHwm/pZEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJNON-0002Bh-Bf; Sun, 04 Nov 2018 18:44:59 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJNNj-0000pk-Tj for linux-arm-kernel@bombadil.infradead.org; Sun, 04 Nov 2018 18:44:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xjyRqas0Q0kXikq6cQyvCuFHAWoJecrceZ6Qi6lDGoM=; b=VeXXg6zfz9dg28OS+UUhCrN5bD 1gcoepUHU9Rz4ECh4+oY8sSgCvzOZg39AqHqwKCVJdDvSTj5xwiFlZoz3/KD869vr7+IkYlStRJzu a5AYOERSMgETEKFQ+/8gkUF0kh8FjfYoB3W3yCkOi7NcK61/kfPsRYbN9IDyN8LIoT49sDvaU6fD5 kB99B5CtQwPqbFlDSD//og951VGbxbY2mjFwdzg2LEAXh6gq6h9lotZWpmBBXsYI9g0V7CYmw0G+j viMfBrHVJuZkAHU+lopRuxs/28qMzW1PMkjGppVEBs3Arm+heJF5DOOT25DtJidC/iDOV2xglkXGG li4V25Dg==; Received: from mailoutvs44.siol.net ([185.57.226.235] helo=mail.siol.net) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJN8V-0007N9-C0 for linux-arm-kernel@lists.infradead.org; Sun, 04 Nov 2018 18:28:37 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181104_182835_446974_C2AA108A X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, architt@codeaurora.org, a.hajda@samsung.com, sboyd@kernel.org, mturquette@baylibre.com, jernej.skrabec@siol.net, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, linux-sunxi@googlegroups.com, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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/sun4i/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 *connector, return MODE_OK; } +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 = { .set_rate = true, }; +static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks = { + .mode_valid = sun8i_dw_hdmi_mode_valid_h6, +}; + static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = { { .compatible = "allwinner,sun8i-a83t-dw-hdmi", .data = &sun8i_a83t_quirks, }, + { + .compatible = "allwinner,sun50i-h6-dw-hdmi", + .data = &sun50i_h6_quirks, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, sun8i_dw_hdmi_dt_ids);