From patchwork Thu May 31 12:41:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 137370 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6549196lji; Thu, 31 May 2018 05:41:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZ5Yl0dFRnp1n/7mW9mPuwSqIEjODWksX/3Hk1a4bHxvqQ85sgT6fw1yFwfuckvS9gjnVQ X-Received: by 2002:a63:2b46:: with SMTP id r67-v6mr5311622pgr.89.1527770497261; Thu, 31 May 2018 05:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527770497; cv=none; d=google.com; s=arc-20160816; b=i7J2/thpb0HXwmGBWm7/1s2eJOi4HG3erAQv0DqjMYuc3H0kodX2cNt6XslvlGIz/y 4NEFAC93o+XlnfN6xG9VnkFawS3JBEXCulGRMY/e0cGzEToWPZyE7c9Qib35TgBe49DJ MmKzDS64O+CftdWMHJvTuNQTEvuaL0f29ksF97YXCkPeyKjjwo8iABdS6S+4rdDjwW3t UsJ9ruI/yOvZ3TjDp7vd9291gZmI1nVw7IzVkCutbcGPhhezxAJXPzC+DoD3NAiFFuP/ fupvAlNKWfJWWLqV5nZYX6Q6jaR+wIsyKOAtNlmK4KVNwsSn1xkOG9Jf7H9q307wfD5o 7ZWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=TyxR1bFkkr69KAhBs8t0z8NS0A1p2Pmu+3WXaOKqnhM=; b=Tamm0QH75wCPBWATEVNjMNw0QTB4K+56t+kUkhPZ0V8lI11Rkt0dAxJM1HVVaiz5+f C/Mye2RKed1yVP90v15aAcMLTYY/0mcD0J+iA89rpyy1+2S5LzGJwK5mHPlqyKlMKTiX 6kjz8cWxJe+qx5YLDt9HhNBfjx9GohchHkncWyhYsBCf7wpilN8qCMvyrKNDK3XJnaje icnm24w4wvZVbqgsXUtzQfJyt/+eJ43te6lNFl0CQId/iDjrKq1kA2R4TNSGIJEBdHRt PzKdPbNSNVn5bl2SGQYSqcVpi49jeEff3nlw6A6wnXb4gtN4/oV6Ob/JtVkPIYov4V0p C9AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=YYwav/Hm; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si38961584pff.154.2018.05.31.05.41.37; Thu, 31 May 2018 05:41:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=YYwav/Hm; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755039AbeEaMlg (ORCPT + 5 others); Thu, 31 May 2018 08:41:36 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:49770 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755030AbeEaMlf (ORCPT ); Thu, 31 May 2018 08:41:35 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4VCfUpG026094; Thu, 31 May 2018 07:41:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1527770490; bh=c4tyg1jZv7fD6Yu781Q5C4k9qLVE9HTkhjdjP2HFWHc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YYwav/Hm1f4YV85VIzXCRe4zTYVYvpCr6SLZn7VhWGjbcUyHq3u4N/U5qtJsVK/8P 2QpiRgfKO8aQoIPCc8Rg1snOFFBhTZKwyd5iHqdVF+3kzxHg+JthwfXUWL7WhOXlEd /D8SvSYxnOOAgs8DxFe9zaOMB1jLdIxEvcWu7LCI= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4VCfUH4006534; Thu, 31 May 2018 07:41:30 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 31 May 2018 07:41:30 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 31 May 2018 07:41:30 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4VCfQS2002799; Thu, 31 May 2018 07:41:28 -0500 From: Tomi Valkeinen To: , , Laurent Pinchart , Peter Ujfalusi , Jyri Sarha , Benoit Parrot CC: Tomi Valkeinen Subject: [RFC PATCH 1/6] drm: Add support for extracting sync signal drive edge from videomode Date: Thu, 31 May 2018 15:41:04 +0300 Message-ID: <20180531124109.3209-2-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180531124109.3209-1-tomi.valkeinen@ti.com> References: <20180531124109.3209-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Peter Ujfalusi The sync in some panels needs to be driven by different edge of the pixel clock compared to data. This is reflected by the DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE in videmode flags. Add similar similar definitions for bus_flags and convert the sync drive edge via drm_bus_flags_from_videomode(). Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Signed-off-by: Jyri Sarha --- drivers/gpu/drm/drm_modes.c | 15 +++++++++++---- include/drm/drm_connector.h | 4 ++++ 2 files changed, 15 insertions(+), 4 deletions(-) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index e82b61e08f8c..1661bfc55687 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -659,10 +659,12 @@ EXPORT_SYMBOL_GPL(drm_display_mode_to_videomode); * drm_bus_flags_from_videomode - extract information about pixelclk and * DE polarity from videomode and store it in a separate variable * @vm: videomode structure to use - * @bus_flags: information about pixelclk and DE polarity will be stored here + * @bus_flags: information about pixelclk, sync and DE polarity will be stored + * here * - * Sets DRM_BUS_FLAG_DE_(LOW|HIGH) and DRM_BUS_FLAG_PIXDATA_(POS|NEG)EDGE - * in @bus_flags according to DISPLAY_FLAGS found in @vm + * Sets DRM_BUS_FLAG_DE_(LOW|HIGH), DRM_BUS_FLAG_PIXDATA_(POS|NEG)EDGE and + * DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE in @bus_flags according to DISPLAY_FLAGS + * found in @vm */ void drm_bus_flags_from_videomode(const struct videomode *vm, u32 *bus_flags) { @@ -672,6 +674,11 @@ void drm_bus_flags_from_videomode(const struct videomode *vm, u32 *bus_flags) if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) *bus_flags |= DRM_BUS_FLAG_PIXDATA_NEGEDGE; + if (vm->flags & DISPLAY_FLAGS_SYNC_POSEDGE) + *bus_flags |= DRM_BUS_FLAG_SYNC_POSEDGE; + if (vm->flags & DISPLAY_FLAGS_SYNC_NEGEDGE) + *bus_flags |= DRM_BUS_FLAG_SYNC_NEGEDGE; + if (vm->flags & DISPLAY_FLAGS_DE_LOW) *bus_flags |= DRM_BUS_FLAG_DE_LOW; if (vm->flags & DISPLAY_FLAGS_DE_HIGH) @@ -684,7 +691,7 @@ EXPORT_SYMBOL_GPL(drm_bus_flags_from_videomode); * of_get_drm_display_mode - get a drm_display_mode from devicetree * @np: device_node with the timing specification * @dmode: will be set to the return value - * @bus_flags: information about pixelclk and DE polarity + * @bus_flags: information about pixelclk, sync and DE polarity * @index: index into the list of display timings in devicetree * * This function is expensive and should only be used, if only one mode is to be diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 675cc3f8cf85..8fa901637f00 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -290,6 +290,10 @@ struct drm_display_info { #define DRM_BUS_FLAG_DATA_MSB_TO_LSB (1<<4) /* data is transmitted LSB to MSB on the bus */ #define DRM_BUS_FLAG_DATA_LSB_TO_MSB (1<<5) +/* drive sync on pos. edge */ +#define DRM_BUS_FLAG_SYNC_POSEDGE (1<<6) +/* drive sync on neg. edge */ +#define DRM_BUS_FLAG_SYNC_NEGEDGE (1<<7) /** * @bus_flags: Additional information (like pixel signal polarity) for From patchwork Thu May 31 12:41:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 137374 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6549348lji; Thu, 31 May 2018 05:41:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKFhDtfd876yGw5w890ysyEIjcWuLeEWDYczxXQ9hsTthe3PJwRP8FCUZdw4U2FQYSlAx50 X-Received: by 2002:a65:5d0f:: with SMTP id e15-v6mr5566365pgr.119.1527770503266; Thu, 31 May 2018 05:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527770503; cv=none; d=google.com; s=arc-20160816; b=LQT2rlFRKNgkVFX3FrI+yPVL+Y4o3ym3zYUTx66lftZ2IFSfp7/sB0wPtvrQH6EdNr 6Xdxi5/iEjonqDKPQ+xvrTrzdQl/k75t1ksyv4Lk8RsXC1hOwrIzuR5UDrmTmn+ak5cN 0G3Za32ii6NFLa3SQUt/H4Stf6bLbKlcjuD6F/ovdu1hW/ul0e6UBY7GMXLvKacsp5L9 OFv4tBItGAGSqQMdXcyc0yWMJfCS62Jj0lzCVXz15wLSYMFof6VXtPm17sdqnBo4q6K6 YydbdDX5MXdIZVQkJtP9+7D1byjcKmVpBNb23gYnUhKIFvhB+9OpqRDr4ojS3xatTbcr fA6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=746OmaBxHMwFMDNvbanXHAKqSkMsT72b8T/21qWUswo=; b=XmCDUOCknMJENLzJN0SgvI3YT1dtkFeh/HfUBqqvdU7wSdql5eRerIEbwgeR4yoH3N sw2xZV8+bIOs6CoHNwZRc5PY0o1RRHSqn6dN4UzWuq/ynZAodMIYs8hijXx81kjMyKt+ Y00dHIiUJ0Eyo7/67QSeYD5qv+x5MKda/bgrEfEow+3+7GH9pt8JQ07cGq/SIhec2Ev4 AXC0OZtu5VHIk4V/vT356yE3KhbSK2L3o+5zG3JJjrkl0vFXBdtnzr/IzKlNJXkcVCVB 8k0Io7or5jhvoHa0Rq+BRd/T92DJohiI/bhaeMlsDjHTzKjVqmTKX2Hlqe6d42Yb9w7/ J9fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=A/rUzr5V; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si38961584pff.154.2018.05.31.05.41.42; Thu, 31 May 2018 05:41:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=A/rUzr5V; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755055AbeEaMll (ORCPT + 5 others); Thu, 31 May 2018 08:41:41 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:60744 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755045AbeEaMlj (ORCPT ); Thu, 31 May 2018 08:41:39 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4VCfZqe017449; Thu, 31 May 2018 07:41:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1527770495; bh=pnD3zzcww8ZgWVHbbMx5ZyJW7kQsu8X9/NBoJ6YgR24=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=A/rUzr5VpgVxq64S02alA0gHoR2McAs3vIjz62XcyZWUT2NN+NeHNRQO6n3U/bXXD uVRzXEyWpymLthOweTwYvJcTVfOEkdTUSNFToAivJqNcbSPvFKnytBQadijyVB6b7u +6MZfGJRMYjFO9IxxJQWqE46+1KoAF2e9N5Kn9TE= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4VCfZHv012377; Thu, 31 May 2018 07:41:35 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 31 May 2018 07:41:34 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 31 May 2018 07:41:34 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4VCfQS4002799; Thu, 31 May 2018 07:41:32 -0500 From: Tomi Valkeinen To: , , Laurent Pinchart , Peter Ujfalusi , Jyri Sarha , Benoit Parrot CC: Tomi Valkeinen Subject: [RFC PATCH 3/6] drm/tidss: add new driver for TI Keystone platforms Date: Thu, 31 May 2018 15:41:06 +0300 Message-ID: <20180531124109.3209-4-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180531124109.3209-1-tomi.valkeinen@ti.com> References: <20180531124109.3209-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This patch adds a new DRM driver for Texas Instruments DSS6 IP used on Texas Instruments Keystone K2G SoC. The DSS6 IP is a major change to the older DSS IP versions, which are supported by the omapdrm driver, and while on higher level the DSS6 resembles the older DSS versions, the registers and the internal pipelines differ a lot. DSS6 IP on K2G is a "ultra-light" version, and has only a single plane and a single output. The driver will also support future DSS versions, which support multiple planes and outputs, so the driver already has support for those. Signed-off-by: Tomi Valkeinen --- MAINTAINERS | 8 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/tidss/Kconfig | 10 + drivers/gpu/drm/tidss/Makefile | 11 + drivers/gpu/drm/tidss/tidss_crtc.c | 464 +++++++ drivers/gpu/drm/tidss/tidss_crtc.h | 50 + drivers/gpu/drm/tidss/tidss_dispc.h | 146 +++ drivers/gpu/drm/tidss/tidss_dispc6.c | 1397 +++++++++++++++++++++ drivers/gpu/drm/tidss/tidss_dispc6.h | 12 + drivers/gpu/drm/tidss/tidss_dispc6_regs.h | 109 ++ drivers/gpu/drm/tidss/tidss_drv.c | 331 +++++ drivers/gpu/drm/tidss/tidss_drv.h | 41 + drivers/gpu/drm/tidss/tidss_encoder.c | 101 ++ drivers/gpu/drm/tidss/tidss_encoder.h | 22 + drivers/gpu/drm/tidss/tidss_irq.c | 193 +++ drivers/gpu/drm/tidss/tidss_irq.h | 25 + drivers/gpu/drm/tidss/tidss_kms.c | 85 ++ drivers/gpu/drm/tidss/tidss_kms.h | 14 + drivers/gpu/drm/tidss/tidss_plane.c | 187 +++ drivers/gpu/drm/tidss/tidss_plane.h | 25 + 21 files changed, 3234 insertions(+) create mode 100644 drivers/gpu/drm/tidss/Kconfig create mode 100644 drivers/gpu/drm/tidss/Makefile create mode 100644 drivers/gpu/drm/tidss/tidss_crtc.c create mode 100644 drivers/gpu/drm/tidss/tidss_crtc.h create mode 100644 drivers/gpu/drm/tidss/tidss_dispc.h create mode 100644 drivers/gpu/drm/tidss/tidss_dispc6.c create mode 100644 drivers/gpu/drm/tidss/tidss_dispc6.h create mode 100644 drivers/gpu/drm/tidss/tidss_dispc6_regs.h create mode 100644 drivers/gpu/drm/tidss/tidss_drv.c create mode 100644 drivers/gpu/drm/tidss/tidss_drv.h create mode 100644 drivers/gpu/drm/tidss/tidss_encoder.c create mode 100644 drivers/gpu/drm/tidss/tidss_encoder.h create mode 100644 drivers/gpu/drm/tidss/tidss_irq.c create mode 100644 drivers/gpu/drm/tidss/tidss_irq.h create mode 100644 drivers/gpu/drm/tidss/tidss_kms.c create mode 100644 drivers/gpu/drm/tidss/tidss_kms.h create mode 100644 drivers/gpu/drm/tidss/tidss_plane.c create mode 100644 drivers/gpu/drm/tidss/tidss_plane.h -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/MAINTAINERS b/MAINTAINERS index ca4afd68530c..b9de8b54cc67 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4780,6 +4780,14 @@ S: Maintained F: drivers/gpu/drm/omapdrm/ F: Documentation/devicetree/bindings/display/ti/ +DRM DRIVERS FOR TI KEYSTONE +M: Tomi Valkeinen +R: Jyri Sarha +L: dri-devel@lists.freedesktop.org +S: Maintained +F: drivers/gpu/drm/tidss/ +F: Documentation/devicetree/bindings/display/ti/ti,k2g-dss.txt + DRM DRIVERS FOR VC4 M: Eric Anholt T: git git://github.com/anholt/linux diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index deeefa7a1773..b8b6c28a6800 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -289,6 +289,8 @@ source "drivers/gpu/drm/pl111/Kconfig" source "drivers/gpu/drm/tve200/Kconfig" +source "drivers/gpu/drm/tidss/Kconfig" + # Keep legacy drivers last menuconfig DRM_LEGACY diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 50093ff4479b..3aa032fbb11a 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -103,3 +103,4 @@ obj-$(CONFIG_DRM_MXSFB) += mxsfb/ obj-$(CONFIG_DRM_TINYDRM) += tinydrm/ obj-$(CONFIG_DRM_PL111) += pl111/ obj-$(CONFIG_DRM_TVE200) += tve200/ +obj-$(CONFIG_DRM_TIDSS) += tidss/ diff --git a/drivers/gpu/drm/tidss/Kconfig b/drivers/gpu/drm/tidss/Kconfig new file mode 100644 index 000000000000..818666db08a4 --- /dev/null +++ b/drivers/gpu/drm/tidss/Kconfig @@ -0,0 +1,10 @@ +config DRM_TIDSS + tristate "DRM Support for TI Keystone" + depends on DRM && OF + depends on ARM || ARM64 || COMPILE_TEST + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER + select VIDEOMODE_HELPERS + help + TI Keystone diff --git a/drivers/gpu/drm/tidss/Makefile b/drivers/gpu/drm/tidss/Makefile new file mode 100644 index 000000000000..ee6b24db0441 --- /dev/null +++ b/drivers/gpu/drm/tidss/Makefile @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +tidss-y := tidss_drv.o \ + tidss_kms.o \ + tidss_crtc.o \ + tidss_plane.o \ + tidss_encoder.o \ + tidss_dispc6.o \ + tidss_irq.o + +obj-$(CONFIG_DRM_TIDSS) += tidss.o diff --git a/drivers/gpu/drm/tidss/tidss_crtc.c b/drivers/gpu/drm/tidss/tidss_crtc.c new file mode 100644 index 000000000000..245539b7dc20 --- /dev/null +++ b/drivers/gpu/drm/tidss/tidss_crtc.c @@ -0,0 +1,464 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ + * Author: Tomi Valkeinen + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include