From patchwork Mon Oct 7 19:21:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11178353 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C0F813BD for ; Mon, 7 Oct 2019 19:21:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53CB12070B for ; Mon, 7 Oct 2019 19:21:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53CB12070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1C586E174; Mon, 7 Oct 2019 19:21:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067074.outbound.protection.outlook.com [40.92.67.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 102956E174 for ; Mon, 7 Oct 2019 19:21:51 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T7g7yUeB+IHaHKDGvv2MxPQUORaR6uEDGy/wvmQ25CCbrPX+MX8toaivxE8cYkoOVm9vPMuSBio+Zz+5mMkHiOyxP/jhTz8Fgyx8js9hFuln/jbiqpLRZm5QcVNeMUf36mMTygGWGJo6bAko8ac/EN00qx0LNmkT9lYb69KBBiRRJQwKWgCBXiEnMR9bAhdsWUGImt0prbUB1DnG5xb5ktOTJIyX0pj1Xk11pVtPMnB6w2wEJx3HcJ7sfSrDzJiiViLQqO5quOHFUsP9Zbyj6/+ZZx3Go25IayAzi/LycG7F8hUgV3VuTsqrxjSvz3YDkD+IZRsH47Luz3/SBPfD+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7GmXMoZqbQgbuXEGY5AMW5EjmhkY8tF/xxVQQoHQrIA=; b=BtbhHJk03/94eLeSjSkh7XsMnk6/HJiZP20o4SyWg7r5sqRFm64vFaOXPaeOtF4qGbFqaumenESWRpKb8wllY80uzcmlhUDc5KRLymzB2glyZcP4l4po1vDPDwRp+iiBVgpDg0qmlSbvyhzeDA/rndOGbo3Ex3uCe0595RRId//MkbBe85EFZTLe6P+H4JzEjYPJ2+fahw9Ybcvoh/WMGKZGy6mnPhTRcl9S4vwCrkFZrWm9F8Arr9CI+vNtA8cGlZS4kgky/V9/zcQTSiho82XL1fUnjlULuj4jLu7NN18mlycWXtZvn/gNCsB3e4nkhJ0aDqqROcYA/3u9dnNMRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR02FT039.eop-EUR02.prod.protection.outlook.com (10.152.8.58) by AM5EUR02HT008.eop-EUR02.prod.protection.outlook.com (10.152.8.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.20; Mon, 7 Oct 2019 19:21:48 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com (10.152.8.55) by AM5EUR02FT039.mail.protection.outlook.com (10.152.9.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.20 via Frontend Transport; Mon, 7 Oct 2019 19:21:48 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8]) by HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8%4]) with mapi id 15.20.2305.023; Mon, 7 Oct 2019 19:21:48 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH v2 1/4] drm/bridge: dw-hdmi: Add Dynamic Range and Mastering InfoFrame support Thread-Topic: [PATCH v2 1/4] drm/bridge: dw-hdmi: Add Dynamic Range and Mastering InfoFrame support Thread-Index: AQHVfUR3du6nZITFzkKDCJlMcDjXMg== Date: Mon, 7 Oct 2019 19:21:48 +0000 Message-ID: References: In-Reply-To: Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P18901CA0018.EURP189.PROD.OUTLOOK.COM (2603:10a6:3:8b::28) To HE1PR06MB4011.eurprd06.prod.outlook.com (2603:10a6:7:9c::32) x-incomingtopheadermarker: OriginalChecksum:70BAB055347A50A9803CE6752A0D259B08E0EB46AFB17D25F50CA8CE9270C4BC; UpperCasedChecksum:02E8799A1085B2CCA5C61188EFBEB4C23A746D419F76A145C87E0FCB5C869ECE; SizeAsReceived:8141; Count:51 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [AQR41JfWxKoBBSfOwQMM3oAjNLbYRz6W] x-microsoft-original-message-id: <20191007192135.4525-1-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 51 x-eopattributedmessage: 0 x-ms-traffictypediagnostic: AM5EUR02HT008: x-ms-exchange-purlcount: 2 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3W+XYo+8KkSK6ALcfRpp0b1mhe8g435YyjwxsvFGO+wMiUnRQWBfv6s7okDvYO8uwShPU9hkakmMJectDWFnSZcPpsiIGjugdWQo1n4zHQWSDHfZKkyBZ0ztO2g9gbFVvg8zBtd5dITm6SZL8oJDytyH78Y/VQ1U/y08yXA1TtqX9WoX3zLwSakZbJK6UWZJ8lXnoB5srIJ3xwfy/AWmNqaGrRP/L3opE1LpbTtnSqg= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 59c375bb-b166-4e5f-b763-08d74b5b995d X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2019 19:21:48.6945 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT008 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , Kevin Hilman , "dri-devel@lists.freedesktop.org" , Maxime Ripard , "linux-kernel@vger.kernel.org" , Chen-Yu Tsai , Laurent Pinchart , "zhengyang@rock-chips.com" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add support for configuring Dynamic Range and Mastering InfoFrame from the hdr_output_metadata connector property. This patch adds a use_drm_infoframe flag to dw_hdmi_plat_data that platform drivers use to signal when Dynamic Range and Mastering infoframes is supported. This flag is needed because Amlogic GXBB and GXL report same DW-HDMI version, and only GXL support DRM InfoFrame. These changes were based on work done by Zheng Yang to support DRM InfoFrame on the Rockchip 4.4 BSP kernel at [1] and [2] [1] https://github.com/rockchip-linux/kernel/tree/develop-4.4 [2] https://github.com/rockchip-linux/kernel/commit/d1943fde81ff41d7cca87f4a42f03992e90bddd5 Cc: Zheng Yang Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 81 +++++++++++++++++++++++ drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 37 +++++++++++ include/drm/bridge/dw_hdmi.h | 1 + 3 files changed, 119 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index a15fbf71b9d7..fdc29869d75a 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -1743,6 +1744,41 @@ static void hdmi_config_vendor_specific_infoframe(struct dw_hdmi *hdmi, HDMI_FC_DATAUTO0_VSD_MASK); } +static void hdmi_config_drm_infoframe(struct dw_hdmi *hdmi) +{ + const struct drm_connector_state *conn_state = hdmi->connector.state; + struct hdmi_drm_infoframe frame; + u8 buffer[30]; + ssize_t err; + int i; + + if (!hdmi->plat_data->use_drm_infoframe) + return; + + hdmi_modb(hdmi, HDMI_FC_PACKET_TX_EN_DRM_DISABLE, + HDMI_FC_PACKET_TX_EN_DRM_MASK, HDMI_FC_PACKET_TX_EN); + + err = drm_hdmi_infoframe_set_hdr_metadata(&frame, conn_state); + if (err < 0) + return; + + err = hdmi_drm_infoframe_pack(&frame, buffer, sizeof(buffer)); + if (err < 0) { + dev_err(hdmi->dev, "Failed to pack drm infoframe: %zd\n", err); + return; + } + + hdmi_writeb(hdmi, frame.version, HDMI_FC_DRM_HB0); + hdmi_writeb(hdmi, frame.length, HDMI_FC_DRM_HB1); + + for (i = 0; i < frame.length; i++) + hdmi_writeb(hdmi, buffer[4 + i], HDMI_FC_DRM_PB0 + i); + + hdmi_writeb(hdmi, 1, HDMI_FC_DRM_UP); + hdmi_modb(hdmi, HDMI_FC_PACKET_TX_EN_DRM_ENABLE, + HDMI_FC_PACKET_TX_EN_DRM_MASK, HDMI_FC_PACKET_TX_EN); +} + static void hdmi_av_composer(struct dw_hdmi *hdmi, const struct drm_display_mode *mode) { @@ -2064,6 +2100,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode) /* HDMI Initialization Step F - Configure AVI InfoFrame */ hdmi_config_AVI(hdmi, mode); hdmi_config_vendor_specific_infoframe(hdmi, mode); + hdmi_config_drm_infoframe(hdmi); } else { dev_dbg(hdmi->dev, "%s DVI mode\n", __func__); } @@ -2230,6 +2267,45 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) return ret; } +static bool hdr_metadata_equal(const struct drm_connector_state *old_state, + const struct drm_connector_state *new_state) +{ + struct drm_property_blob *old_blob = old_state->hdr_output_metadata; + struct drm_property_blob *new_blob = new_state->hdr_output_metadata; + + if (!old_blob || !new_blob) + return old_blob == new_blob; + + if (old_blob->length != new_blob->length) + return false; + + return !memcmp(old_blob->data, new_blob->data, old_blob->length); +} + +static int dw_hdmi_connector_atomic_check(struct drm_connector *connector, + struct drm_atomic_state *state) +{ + struct drm_connector_state *old_state = + drm_atomic_get_old_connector_state(state, connector); + struct drm_connector_state *new_state = + drm_atomic_get_new_connector_state(state, connector); + struct drm_crtc *crtc = new_state->crtc; + struct drm_crtc_state *crtc_state; + + if (!crtc) + return 0; + + if (!hdr_metadata_equal(old_state, new_state)) { + crtc_state = drm_atomic_get_crtc_state(state, crtc); + if (IS_ERR(crtc_state)) + return PTR_ERR(crtc_state); + + crtc_state->mode_changed = true; + } + + return 0; +} + static void dw_hdmi_connector_force(struct drm_connector *connector) { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, @@ -2254,6 +2330,7 @@ static const struct drm_connector_funcs dw_hdmi_connector_funcs = { static const struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, + .atomic_check = dw_hdmi_connector_atomic_check, }; static int dw_hdmi_bridge_attach(struct drm_bridge *bridge) @@ -2274,6 +2351,10 @@ static int dw_hdmi_bridge_attach(struct drm_bridge *bridge) DRM_MODE_CONNECTOR_HDMIA, hdmi->ddc); + if (hdmi->version >= 0x200a && hdmi->plat_data->use_drm_infoframe) + drm_object_attach_property(&connector->base, + connector->dev->mode_config.hdr_output_metadata_property, 0); + drm_connector_attach_encoder(connector, encoder); cec_fill_conn_info_from_drm(&conn_info, connector); diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h index fcff5059db24..1999db05bc3b 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h @@ -254,6 +254,7 @@ #define HDMI_FC_POL2 0x10DB #define HDMI_FC_PRCONF 0x10E0 #define HDMI_FC_SCRAMBLER_CTRL 0x10E1 +#define HDMI_FC_PACKET_TX_EN 0x10E3 #define HDMI_FC_GMD_STAT 0x1100 #define HDMI_FC_GMD_EN 0x1101 @@ -289,6 +290,37 @@ #define HDMI_FC_GMD_PB26 0x111F #define HDMI_FC_GMD_PB27 0x1120 +#define HDMI_FC_DRM_UP 0x1167 +#define HDMI_FC_DRM_HB0 0x1168 +#define HDMI_FC_DRM_HB1 0x1169 +#define HDMI_FC_DRM_PB0 0x116A +#define HDMI_FC_DRM_PB1 0x116B +#define HDMI_FC_DRM_PB2 0x116C +#define HDMI_FC_DRM_PB3 0x116D +#define HDMI_FC_DRM_PB4 0x116E +#define HDMI_FC_DRM_PB5 0x116F +#define HDMI_FC_DRM_PB6 0x1170 +#define HDMI_FC_DRM_PB7 0x1171 +#define HDMI_FC_DRM_PB8 0x1172 +#define HDMI_FC_DRM_PB9 0x1173 +#define HDMI_FC_DRM_PB10 0x1174 +#define HDMI_FC_DRM_PB11 0x1175 +#define HDMI_FC_DRM_PB12 0x1176 +#define HDMI_FC_DRM_PB13 0x1177 +#define HDMI_FC_DRM_PB14 0x1178 +#define HDMI_FC_DRM_PB15 0x1179 +#define HDMI_FC_DRM_PB16 0x117A +#define HDMI_FC_DRM_PB17 0x117B +#define HDMI_FC_DRM_PB18 0x117C +#define HDMI_FC_DRM_PB19 0x117D +#define HDMI_FC_DRM_PB20 0x117E +#define HDMI_FC_DRM_PB21 0x117F +#define HDMI_FC_DRM_PB22 0x1180 +#define HDMI_FC_DRM_PB23 0x1181 +#define HDMI_FC_DRM_PB24 0x1182 +#define HDMI_FC_DRM_PB25 0x1183 +#define HDMI_FC_DRM_PB26 0x1184 + #define HDMI_FC_DBGFORCE 0x1200 #define HDMI_FC_DBGAUD0CH0 0x1201 #define HDMI_FC_DBGAUD1CH0 0x1202 @@ -744,6 +776,11 @@ enum { HDMI_FC_PRCONF_OUTPUT_PR_FACTOR_MASK = 0x0F, HDMI_FC_PRCONF_OUTPUT_PR_FACTOR_OFFSET = 0, +/* FC_PACKET_TX_EN field values */ + HDMI_FC_PACKET_TX_EN_DRM_MASK = 0x80, + HDMI_FC_PACKET_TX_EN_DRM_ENABLE = 0x80, + HDMI_FC_PACKET_TX_EN_DRM_DISABLE = 0x00, + /* FC_AVICONF0-FC_AVICONF3 field values */ HDMI_FC_AVICONF0_PIX_FMT_MASK = 0x03, HDMI_FC_AVICONF0_PIX_FMT_RGB = 0x00, diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index 4b3e863c4f8a..fbf3812c4326 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -126,6 +126,7 @@ struct dw_hdmi_plat_data { const struct drm_display_mode *mode); unsigned long input_bus_format; unsigned long input_bus_encoding; + bool use_drm_infoframe; /* Vendor PHY support */ const struct dw_hdmi_phy_ops *phy_ops; From patchwork Mon Oct 7 19:21:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11178357 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CA371747 for ; Mon, 7 Oct 2019 19:21:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14C4E2070B for ; Mon, 7 Oct 2019 19:21:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14C4E2070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 058456E17B; Mon, 7 Oct 2019 19:21:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068022.outbound.protection.outlook.com [40.92.68.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id CDF296E17B for ; Mon, 7 Oct 2019 19:21:55 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GnoD+86XFqVf4Yy/M/EJPHUCCP9/h1kPqs7mkxQfblqYKAl7ZxAq6iYdBNUF6L9fW/zoonhVBUd7I8mlXRLPvZiOYX35Q6yLFoZYOT698opg6Rv3IxXetXRw5azS6xp2oKAU2zT0C987am0ugrih9XQ0zsKv1sHykI50dhJLfb4i6i9mwmKup+LXkltKJp/wHeU5ypakbNNKQ2dczYDQLIdyd9S9rCr1M3vQCUGge5dLSL633ZMMQ5WZJDEjpaI8KW1MBR76w76EPggop8zvfRJ2G8Qgk0rJQGqVpaDuC91Dj6rFSjc10JxjIQzSuA+HiS3io/oqY9Xn4AejokOVUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dnXj0bICwjFFFTZYWcocvCHmrP5bwb9fqSgT6TUAkSk=; b=G0mSLlJ4/zhOVgF5Mt8hiLPmfvUQIxekmc073k5om7Fvu3o8Ea6FfQ98cgNKq0HKh6bi4wMRKbXnM9Nd+rxuhwAjPDh78aZyZJfuXltztlSQbQ/7RMFegzAn5QjaMIadJLfVm/QXs3ryRybDM8RTzG2QWd74x6lafe34QPZrYV0J5GpLjzJuzp2c4Fuy20+QnZAAgv12HaVkguIB5pmynNCpho1JxWJxa6QKCT+teR4v0ogSVXMmEQGqpqfynbsOmMt8+WY86u/rGyuZskDj0uAPa2Itu7o0FhF0VnRKNG++2mb17FkjGw53+fL9w/EZsDv7l3QCdRTZlQ8t6KIjDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR02FT039.eop-EUR02.prod.protection.outlook.com (10.152.8.53) by AM5EUR02HT237.eop-EUR02.prod.protection.outlook.com (10.152.8.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.20; Mon, 7 Oct 2019 19:21:49 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com (10.152.8.55) by AM5EUR02FT039.mail.protection.outlook.com (10.152.9.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.20 via Frontend Transport; Mon, 7 Oct 2019 19:21:49 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8]) by HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8%4]) with mapi id 15.20.2305.023; Mon, 7 Oct 2019 19:21:49 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH v2 2/4] drm/rockchip: Enable DRM InfoFrame support on RK3328 and RK3399 Thread-Topic: [PATCH v2 2/4] drm/rockchip: Enable DRM InfoFrame support on RK3328 and RK3399 Thread-Index: AQHVfUR3JXY5xQIOykGs74DZOna4XQ== Date: Mon, 7 Oct 2019 19:21:49 +0000 Message-ID: References: <20191007192135.4525-1-jonas@kwiboo.se> In-Reply-To: <20191007192135.4525-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P18901CA0018.EURP189.PROD.OUTLOOK.COM (2603:10a6:3:8b::28) To HE1PR06MB4011.eurprd06.prod.outlook.com (2603:10a6:7:9c::32) x-incomingtopheadermarker: OriginalChecksum:5B4191A7D513587D91584953D25E71089F789E8C9B84D3AB94C404A59F6E4FB4; UpperCasedChecksum:4C7E7BF373A2D39586CBA1A8B452FB28FAB477C199FA7A95DEEC584251568002; SizeAsReceived:8097; Count:51 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [Ik4UVVWh8enDFLkh6mvDKU4vxxATQVVJ] x-microsoft-original-message-id: <20191007192135.4525-2-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 51 x-eopattributedmessage: 0 x-ms-traffictypediagnostic: AM5EUR02HT237: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ow4zPY79ymRpJptUu+nFn5y3wmL2LexQoFASdvU3V/4aIMrRTA0IXM+lrIg+RffJe0L0bJ36SsYVwus3gMIuk35CkEo+QDS7i/0pG/4gMI5WizynHOc5GuldcQmkgUw0TNe628UkgeQUsfbuPj03sfS9n61mgxYbKLgpYLW4h0OSqwVU1C3PRGwyhBQ6Njmx x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 46408731-acc1-47b7-c856-08d74b5b99e1 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2019 19:21:49.5660 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT237 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , Kevin Hilman , "dri-devel@lists.freedesktop.org" , Maxime Ripard , "linux-kernel@vger.kernel.org" , Chen-Yu Tsai , Laurent Pinchart , "zhengyang@rock-chips.com" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch enables Dynamic Range and Mastering InfoFrame on RK3328 and RK3399. Cc: Sandy Huang Cc: Heiko Stuebner Signed-off-by: Jonas Karlman Reviewed-by: Heiko Stuebner Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 906891b03a38..7f56d8c3491d 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -450,6 +450,7 @@ static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = { .phy_ops = &rk3328_hdmi_phy_ops, .phy_name = "inno_dw_hdmi_phy2", .phy_force_vendor = true, + .use_drm_infoframe = true, }; static struct rockchip_hdmi_chip_data rk3399_chip_data = { @@ -464,6 +465,7 @@ static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = { .cur_ctr = rockchip_cur_ctr, .phy_config = rockchip_phy_config, .phy_data = &rk3399_chip_data, + .use_drm_infoframe = true, }; static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = { From patchwork Mon Oct 7 19:21:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11178359 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A90F13BD for ; Mon, 7 Oct 2019 19:22:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72B2F2173B for ; Mon, 7 Oct 2019 19:22:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72B2F2173B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A84176E182; Mon, 7 Oct 2019 19:22:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068022.outbound.protection.outlook.com [40.92.68.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 920266E182 for ; Mon, 7 Oct 2019 19:21:58 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xs4KXq4b8XdBdUDOdF4XHoKkdFvwlliggUhL95TdT3RA7l1mGiccUBp540tNhYSRLeBQ7Fl39konDQ6aETdNKsQde6vfxoY8WUVNM/PGp2Io1yFzuAOnl6HRqZHrPmJlqxJO/3ubJboZ66oTnBmEAnpJrqjY2gQQFCGKuoQaPjJd31N38oCiEXmc+9VgblGu2Q4mlHdXxqNz2r3fT/vI1DXYVGeXuLpoE8LzPbQf0FfLRqQjRm5QmlWTR5zavSGukQAP0rvZ3gq2sUDyLIFxzh58ESp84EIlAkCO2fp9bbTv8BXIFbmHq1z4icT3GXTtJpUwYXzvJlU1zVV+Ue+r6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bLc8L5qQCi0pUmElDMGjHX2OonOIUPq279NDhdighZY=; b=F8dmQOosEWP2j3UQoya/DyJnAMrjY1pvZ2hJ7P4ZRESI3qIMUUe4dSZZDqxB7iW5TKAKWIzK+Ib0xupvlk84LhXPBHn5DV24xvuu2SZggifb9Gal9UtwoUojNy9KCNH/pCa2dI9UDOdpH4N1MLLE1/5iYP+I5f0yXXg4p/gM2FM4dKI0qaZ5eSty9jbI0vzZ0ZvOOh/QMrFHkh1y08iJr1QLP8jwSI+9L8wtb+2V5MoNp1k2GTLYAT6x0h2LS7U3hupGwqBs9akMc8mOkfrll14hYfBjYzSYsfXbyZO3CH/RbXcJeOhmdqqOKX48CV/WtMkBeWc3XcJ0doKnRCEhGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR02FT039.eop-EUR02.prod.protection.outlook.com (10.152.8.53) by AM5EUR02HT237.eop-EUR02.prod.protection.outlook.com (10.152.8.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.20; Mon, 7 Oct 2019 19:21:50 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com (10.152.8.55) by AM5EUR02FT039.mail.protection.outlook.com (10.152.9.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.20 via Frontend Transport; Mon, 7 Oct 2019 19:21:50 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8]) by HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8%4]) with mapi id 15.20.2305.023; Mon, 7 Oct 2019 19:21:50 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH v2 3/4] drm/meson: Enable DRM InfoFrame support on GXL, GXM and G12A Thread-Topic: [PATCH v2 3/4] drm/meson: Enable DRM InfoFrame support on GXL, GXM and G12A Thread-Index: AQHVfUR4VXUsmRcTa0qRNMTEEkbniA== Date: Mon, 7 Oct 2019 19:21:50 +0000 Message-ID: References: <20191007192135.4525-1-jonas@kwiboo.se> In-Reply-To: <20191007192135.4525-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P18901CA0018.EURP189.PROD.OUTLOOK.COM (2603:10a6:3:8b::28) To HE1PR06MB4011.eurprd06.prod.outlook.com (2603:10a6:7:9c::32) x-incomingtopheadermarker: OriginalChecksum:8897984F656CAFD5D019FF35F86727E7B16C96EB020469B996F045C8F555B2DD; UpperCasedChecksum:E5069E95D2C647470642CF3B56BE12BF0A7E9B2DC05CAAF1A22AF3A2456BD95B; SizeAsReceived:8107; Count:51 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [7dsOqHODkpSjBsJFfy5pzr072GXio++K] x-microsoft-original-message-id: <20191007192135.4525-3-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 51 x-eopattributedmessage: 0 x-ms-traffictypediagnostic: AM5EUR02HT237: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IvFVas48xPXWo/HMtHsEk6xoQjEgWzAppPfOttnymx76pYP54z5g0HmvvGfe4h72Twp1zEHYYP1bGqc9OiEgkAWcrOa50UATpU5B1gmiU78sWgUDHNWS9m8jfWpuPbJoHpmZYhokD8gQFQs6XBjkdLEKMlYxscYBn8u83J3cg/eGQUOWetfNkFk8R8lztVN6 x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 4d77ad6c-e0df-4707-7194-08d74b5b9a5f X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2019 19:21:50.5904 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT237 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , Kevin Hilman , "dri-devel@lists.freedesktop.org" , Maxime Ripard , "linux-kernel@vger.kernel.org" , Chen-Yu Tsai , Laurent Pinchart , "zhengyang@rock-chips.com" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch enables Dynamic Range and Mastering InfoFrame on GXL, GXM and G12A. Cc: Neil Armstrong Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 022286dc6ab2..3bb7ffe5fc39 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -977,6 +977,11 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, dw_plat_data->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24; dw_plat_data->input_bus_encoding = V4L2_YCBCR_ENC_709; + if (dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxl-dw-hdmi") || + dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxm-dw-hdmi") || + dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-g12a-dw-hdmi")) + dw_plat_data->use_drm_infoframe = true; + platform_set_drvdata(pdev, meson_dw_hdmi); meson_dw_hdmi->hdmi = dw_hdmi_bind(pdev, encoder, From patchwork Mon Oct 7 19:21:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11178355 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E07BE1864 for ; Mon, 7 Oct 2019 19:21:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C89DB2084D for ; Mon, 7 Oct 2019 19:21:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C89DB2084D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F6316E175; Mon, 7 Oct 2019 19:21:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02olkn080c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::80c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DB6A6E175 for ; Mon, 7 Oct 2019 19:21:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cengtP4VhDEdTrpkzSSAeaX1870ohQYBMSXdcYJs68cJ7adphrB4FkebpTKvO3urPicoeCs02I0w/6BVS29EGzvyrEg9wWNDDQ8aCU5WEdv12dabDwfKtI8ckSYh2AJmg3cY9kBhjyiSOZV6OjygaUG9VA2PM9qKPi6UM7eXGXUAfurDdLPG6X/uS8KxOxeFCDjsBzNpvrWU8KeclpUxyvQpHjsrNTVRghtz4iutVnBDGTOfjfEFTXybmIWS4hAdyT7yXfAoHWc75o+oxTvQF2V+GfsFWRiWooS6a65bK0aZJg1t/fwoXk+D2b7fv1URe6bboXnZ0aFMB25m/0w0TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PMr7TSAw59HeQij82vZcWLy+Seko8ouxQb5xqDWfYKU=; b=VtD+2DVsCXT44zo9/DQLeVjgmSyW5mx4nu6i1ZA01Wty0rRXzq0u+VF0tkCi6BIwbzdfuU440s552lHIT0/53dGrZ5PNp3tVLNvjpuoBpHiIlv2c0sGknsXNNecra3yhnEdU0T3A3EfYG/BEKfp42URiM6RcFdbdnhlPka8+BxyT532BtaAepsoJIuX1WFw5HINd879OT0uAncGFZFmDuddviHohHyCRpO6SUYCrVoKJnAHxpP7gWXcZQ9wS08uVBuiwe7iWbI2+Ky7201Em8uGDMnE1OlZSxmPfsPL7d4DCKqNGB8ULCgfrmRDoStszzxm+uRF4tVKHyj2RI+I1/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR02FT039.eop-EUR02.prod.protection.outlook.com (10.152.8.57) by AM5EUR02HT223.eop-EUR02.prod.protection.outlook.com (10.152.9.249) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2327.20; Mon, 7 Oct 2019 19:21:52 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com (10.152.8.55) by AM5EUR02FT039.mail.protection.outlook.com (10.152.9.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.20 via Frontend Transport; Mon, 7 Oct 2019 19:21:51 +0000 Received: from HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8]) by HE1PR06MB4011.eurprd06.prod.outlook.com ([fe80::5c5a:1160:a2e0:43d8%4]) with mapi id 15.20.2305.023; Mon, 7 Oct 2019 19:21:51 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH v2 4/4] drm/sun4i: Enable DRM InfoFrame support on H6 Thread-Topic: [PATCH v2 4/4] drm/sun4i: Enable DRM InfoFrame support on H6 Thread-Index: AQHVfUR4DEVZhP0iNUCc+IpngvnB+Q== Date: Mon, 7 Oct 2019 19:21:51 +0000 Message-ID: References: <20191007192135.4525-1-jonas@kwiboo.se> In-Reply-To: <20191007192135.4525-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P18901CA0018.EURP189.PROD.OUTLOOK.COM (2603:10a6:3:8b::28) To HE1PR06MB4011.eurprd06.prod.outlook.com (2603:10a6:7:9c::32) x-incomingtopheadermarker: OriginalChecksum:2EC0351338A8C7C026F6C35DB4240C2DA494C07F5556F28F755AF783A6B0B62A; UpperCasedChecksum:A3DE7AC9E2901186DF0FE5F62BFB249AFA6EE6F7EC1C6EA3276DBE5B8BB88DD5; SizeAsReceived:8117; Count:51 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [+DGfIH1tljwW6plgLJs9J94ZJkul7ZgA] x-microsoft-original-message-id: <20191007192135.4525-4-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 51 x-eopattributedmessage: 0 x-ms-traffictypediagnostic: AM5EUR02HT223: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PgXf706xoIspInLE1UtGYXHnElulJYd9UqhcZYa/CAGEPt/XGjJf2t0SQ3b+TF2tOJRzs2r1pFILGLgJq6CYjFLokYGPUWt1VfPi/MEtQS1wAWxUDbJx9hplZV+sxhGIp4JRN0Cjn6NpBQ46ebyJTcrM/9fwP5kdWSoLCxhhKAWF+YV7T2kQjXihl+XkBPIz x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 7e9e58ce-bd17-400d-ad90-08d74b5b9b27 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2019 19:21:51.7048 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT223 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , Maxime Ripard , Kevin Hilman , "dri-devel@lists.freedesktop.org" , Maxime Ripard , "linux-kernel@vger.kernel.org" , Chen-Yu Tsai , Laurent Pinchart , "zhengyang@rock-chips.com" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch enables Dynamic Range and Mastering InfoFrame on H6. Cc: Maxime Ripard Cc: Jernej Skrabec Signed-off-by: Jonas Karlman Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 2 ++ drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c index a44dca4b0219..e8a317d5ba19 100644 --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c @@ -226,6 +226,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master, sun8i_hdmi_phy_init(hdmi->phy); plat_data->mode_valid = hdmi->quirks->mode_valid; + plat_data->use_drm_infoframe = hdmi->quirks->use_drm_infoframe; sun8i_hdmi_phy_set_ops(hdmi->phy, plat_data); platform_set_drvdata(pdev, hdmi); @@ -300,6 +301,7 @@ static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks = { static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks = { .mode_valid = sun8i_dw_hdmi_mode_valid_h6, + .use_drm_infoframe = true, }; static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = { diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h index d707c9171824..8e64945167e9 100644 --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h @@ -179,6 +179,7 @@ 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; + unsigned int use_drm_infoframe : 1; }; struct sun8i_dw_hdmi {