From patchwork Thu Feb 7 08:36:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10800571 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 31983922 for ; Thu, 7 Feb 2019 08:37:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21E6D2C997 for ; Thu, 7 Feb 2019 08:37:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1657C2D01C; Thu, 7 Feb 2019 08:37:07 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C4A6F2C997 for ; Thu, 7 Feb 2019 08:37:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F4D86EC1A; Thu, 7 Feb 2019 08:37:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id B230B6EC1A for ; Thu, 7 Feb 2019 08:37:04 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id z25-v6so2040064ljk.7 for ; Thu, 07 Feb 2019 00:37:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wZHPggfSt3jojrbcWHOqN6DfKMWRWCRtzNWm965aV4w=; b=dD8FV7FyLwOPXIjq8W0GKqeY0lpVME1VQ8gLv8sdXHqIFDUSt7kN2yNItvWPFFaoPn M+XOREH3/KqyTcfAQBIukzega25jEdhl3vR4kMSmFlOOVUqX9XsZodCafOd431eOUzoA LnxmqnS/Td30yhuRZWZxClk5Ybs7T7kWQSqW+vHUTOi8jGAxAywDA1htOT0IU+asTMFJ Q1qM/imkqbfKwhYWXrypP5mUNxRdLv8YpY8/ACaw5eW2wh5VDagNjdo2rIgCoCQrrVg9 fJtdq3AHYJ2+nK34yGmRXpxPjhkSa77v6uBEYu9EubMBY+28x6vG42FVZEVMVP43kLF/ mYLQ== X-Gm-Message-State: AHQUAuZ4fLGwYhr8CfRAehAdmsz/7vQ3QDSfHpb4w+sCVX15t2/DnoBa 2cMklHGM+aDkjjZhk3J6GWQaT2RN8wI= X-Google-Smtp-Source: AHgI3IZqOIYkoCS4OnM/SQ9bT/ACUYmOOEb1KGcsLGo5sg5P0EE0Ufvu+Cwj3ZaYAfKHC8gkYmzdZQ== X-Received: by 2002:a2e:e02:: with SMTP id 2-v6mr2779845ljo.10.1549528621358; Thu, 07 Feb 2019 00:37:01 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id l72sm470910lfg.75.2019.02.07.00.36.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 00:37:00 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie Subject: [PATCH 1/4] drm/simple_kms_helper: enable use of external encoder Date: Thu, 7 Feb 2019 09:36:44 +0100 Message-Id: <20190207083647.20615-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207083647.20615-1-linus.walleij@linaro.org> References: <20190207083647.20615-1-linus.walleij@linaro.org> MIME-Version: 1.0 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: linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This makes it possible to pass a connector with an already attached external encoder into the simple KMS helper. This is helpful for my MCDE drivers, as it is pretty simple but uses DSI to communicate with the displays and bridges. DSI requires the use of the DSI bus which in turn requires us to set up a custom connector from the display driver. Signed-off-by: Linus Walleij --- drivers/gpu/drm/drm_simple_kms_helper.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c index 917812448d1b..e7499b939235 100644 --- a/drivers/gpu/drm/drm_simple_kms_helper.c +++ b/drivers/gpu/drm/drm_simple_kms_helper.c @@ -266,7 +266,7 @@ int drm_simple_display_pipe_init(struct drm_device *dev, const uint64_t *format_modifiers, struct drm_connector *connector) { - struct drm_encoder *encoder = &pipe->encoder; + struct drm_encoder *encoder; struct drm_plane *plane = &pipe->plane; struct drm_crtc *crtc = &pipe->crtc; int ret; @@ -289,10 +289,23 @@ int drm_simple_display_pipe_init(struct drm_device *dev, if (ret) return ret; - encoder->possible_crtcs = drm_crtc_mask(crtc); - ret = drm_encoder_init(dev, encoder, &drm_simple_kms_encoder_funcs, - DRM_MODE_ENCODER_NONE, NULL); - if (ret || !connector) + /* Other encoder already attached to the connector */ + if (connector->encoder_ids[0] != 0) { + encoder = drm_encoder_find(connector->dev, NULL, + connector->encoder_ids[0]); + encoder->possible_crtcs = drm_crtc_mask(crtc); + DRM_INFO("an encoder is already attached to the connector\n"); + } else { + encoder = &pipe->encoder; + encoder->possible_crtcs = drm_crtc_mask(crtc); + ret = drm_encoder_init(dev, encoder, + &drm_simple_kms_encoder_funcs, + DRM_MODE_ENCODER_NONE, NULL); + if (ret) + return ret; + } + + if (!connector) return ret; return drm_connector_attach_encoder(connector, encoder); From patchwork Thu Feb 7 08:36:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10800579 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 DFCE5922 for ; Thu, 7 Feb 2019 08:37:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D07C52C997 for ; Thu, 7 Feb 2019 08:37:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4DA12D011; Thu, 7 Feb 2019 08:37:11 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6419F2C997 for ; Thu, 7 Feb 2019 08:37:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 620A96EC1C; Thu, 7 Feb 2019 08:37:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 629C46EC1C for ; Thu, 7 Feb 2019 08:37:08 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id c19-v6so8548555lja.5 for ; Thu, 07 Feb 2019 00:37:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fu6jwA0iS37MvRskgJ23dsfsdPcRAtL3/3qeNzCWH0I=; b=INImFwvYJPtWL6qyDepgeN1kV9a8dq70gZzPcVJ6qPaL3EYsjjqwCJThXJq9lo6Sb9 fFsetLHE2K7ac+s7/Z+KKjvgbtRpPEwkSigIQXW5pUEcyBj/qoVszujt335fNYt2ZvuK YDbjFhxlMbI8KJQx7xzi2NL1P3D2MZy4Lr6kVCRAiUgtio+M5dLubqy4E5a9GKfSwPGA mEpxhiiHHRNxGwfrfPUt7gikIokU4qZwVrjNZ6UWJgb0ujXikj7wadeZq7U+NlgOhTHL JfbcCJ8RuUXHsXbnWPXXSEJELIBGzdQDubm5HfJW6SP4/7oTYxsvOOu6onU1SdGhCsy6 N0nw== X-Gm-Message-State: AHQUAuYWT0RU7amnhiZ7S6JxzmmXpwtcyTEgXAgUndOlydlRJA9jKQYP g0JSdLfst5gHgp6lXAx29lUDkGmFPO0= X-Google-Smtp-Source: AHgI3Ia0S6lDA5tjE9ro2hCygTtLDn9qL/2SNJ0txJZgz/JW70C9cPObwDtJLPZNraK1tYLp2cg6Iw== X-Received: by 2002:a2e:6503:: with SMTP id z3-v6mr9257434ljb.153.1549528625058; Thu, 07 Feb 2019 00:37:05 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id l72sm470910lfg.75.2019.02.07.00.37.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 00:37:03 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie Subject: [PATCH 2/4] drm/mcde: Add device tree bindings Date: Thu, 7 Feb 2019 09:36:45 +0100 Message-Id: <20190207083647.20615-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207083647.20615-1-linus.walleij@linaro.org> References: <20190207083647.20615-1-linus.walleij@linaro.org> MIME-Version: 1.0 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: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This adds the device tree bindings for the ST-Ericsson Multi Channel Display Engine MCDE as found in the U8500 SoCs. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- .../devicetree/bindings/display/ste,mcde.txt | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ste,mcde.txt diff --git a/Documentation/devicetree/bindings/display/ste,mcde.txt b/Documentation/devicetree/bindings/display/ste,mcde.txt new file mode 100644 index 000000000000..fc58aa5effb5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/ste,mcde.txt @@ -0,0 +1,110 @@ +ST-Ericsson Multi Channel Display Engine MCDE + +The ST-Ericsson MCDE is a display controller with support for compositing +and displaying several channels memory resident graphics data on DSI or +LCD displays or bridges. It is used in the ST-Ericsson U8500 platform. + +Required properties: + +- compatible: must be: + "ste,mcde" +- reg: register base for the main MCDE control registers, should be + 0x1000 in size +- interrupts: the interrupt line for the MCDE +- epod-supply: a phandle to the EPOD regulator +- vana-supply: a phandle to the analog voltage regulator +- clocks: an array of the MCDE clocks in this strict order: + MCDECLK (main MCDE clock), LCDCLK (LCD clock), PLLDSI + (HDMI clock), DSI0ESCLK (DSI0 energy save clock), + DSI1ESCLK (DSI1 energy save clock), DSI2ESCLK (DSI2 energy + save clock) +- clock-names: must be the following array: + "mcde", "lcd", "hdmi", "dsi0", "dsi1", "dsi0es", "dsi1es", "dsi2es" + to match the required clock inputs above. +- #address-cells: should be <1> (for the DSI hosts that will be children) +- #size-cells: should be <1> (for the DSI hosts that will be children) +- ranges: this should always be stated + +Required subnodes: + +The devicetree must specify subnodes for the DSI host adapters. +These must have the following characteristics: + +- compatible: must be: + "ste,mcde-dsi" +- reg: must specify the register range for the DSI host +- vana-supply: phandle to the VANA voltage regulator +- #address-cells: should be <1> +- #size-cells: should be <0> + +Display panels and bridges will appear as children on the DSI hosts, and +the displays are connected to the DSI hosts using the common binding +for video transmitter interfaces; see +Documentation/devicetree/bindings/media/video-interfaces.txt + +If a DSI host is unused (not connected) it will have no children or ports +defined. + +Example: + +mcde@a0350000 { + compatible = "ste,mcde"; + reg = <0xa0350000 0x1000>; + interrupts = ; + epod-supply = <&db8500_b2r2_mcde_reg>; + vana-supply = <&ab8500_ldo_ana_reg>; + clocks = <&prcmu_clk PRCMU_MCDECLK>, /* Main MCDE clock */ + <&prcmu_clk PRCMU_LCDCLK>, /* LCD clock */ + <&prcmu_clk PRCMU_PLLDSI>, /* HDMI clock */ + <&prcmu_clk PRCMU_DSI0CLK>, /* DSI 0 */ + <&prcmu_clk PRCMU_DSI1CLK>, /* DSI 1 */ + <&prcmu_clk PRCMU_DSI0ESCCLK>, /* TVout clock 0 */ + <&prcmu_clk PRCMU_DSI1ESCCLK>, /* TVout clock 1 */ + <&prcmu_clk PRCMU_DSI2ESCCLK>; /* TVout clock 2 */ + clock-names = "mcde", "lcd", "hdmi", "dsi0", "dsi1", + "dsi0es", "dsi1es", "dsi2es"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dsi0: dsi@a0351000 { + compatible = "ste,mcde-dsi"; + reg = <0xa0351000 0x1000>; + vana-supply = <&ab8500_ldo_ana_reg>; + #address-cells = <1>; + #size-cells = <0>; + port { + dsi0_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + + panel: display { + compatible = "samsung,s6d16d0"; + reg = <0>; + vdd1-supply = <&ab8500_ldo_aux1_reg>; + reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + + }; + dsi1: dsi@a0352000 { + compatible = "ste,mcde-dsi"; + reg = <0xa0352000 0x1000>; + vana-supply = <&ab8500_ldo_ana_reg>; + #address-cells = <1>; + #size-cells = <0>; + }; + dsi2: dsi@a0353000 { + compatible = "ste,mcde-dsi"; + reg = <0xa0353000 0x1000>; + vana-supply = <&ab8500_ldo_ana_reg>; + #address-cells = <1>; + #size-cells = <0>; + }; +}; From patchwork Thu Feb 7 08:36:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10800583 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 BB17914E1 for ; Thu, 7 Feb 2019 08:37:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A299A2C997 for ; Thu, 7 Feb 2019 08:37:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95BE02D011; Thu, 7 Feb 2019 08:37:24 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9A3532C997 for ; Thu, 7 Feb 2019 08:37:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 885476EC1F; Thu, 7 Feb 2019 08:37:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 588F36EC1E for ; Thu, 7 Feb 2019 08:37:13 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id j15so7513410lfh.5 for ; Thu, 07 Feb 2019 00:37:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AnU87AjBoP29KqKChOSLYTCoVtpDHmB8abYmab1/TMc=; b=l6cToX3WYU/5Zk+nbSvOxp8B+zMT8+Mv4+mFE3GNrGOFAOs2vF8xoh2sf6rQfpoQBF zQyNOSoBt5QO56J/YflV53YY4LGgpNVR78ItHtKW+yd/UIJ4VjC93Zp9ZF+7tn2XcQLw h+kK2M7SBxMVg5e6nEgF+k957WuREmPQJ/pq0Dy+emPm0jtYrPM0Bnaiq6IlMfZk9kDm ByAPIIWq+BSm+qe0eU5JoDzVpj/QDBa7jTEyzdSaLpASF+PPfKbGldUHshWL5T7JfV9Z sg5XKez6Ow6mf6M+kxYAkoloiHJAzrT/08pBM/AlE1k+UhXXq4gGeT3sPMI35II5BwDY Brvw== X-Gm-Message-State: AHQUAuaKlljDLylUIFSU3owChfSpAVEcPXfsJjA0TK6IIti6IsvrrY61 ZXKxYkYWegLglGyvi9DJmvOr+hDj8zw= X-Google-Smtp-Source: AHgI3IZiD1Aq4XJ0xnoBBNU5OHqT2OZ9R0qbNFgYksw/fviCWf7V0QrQClMLg0ScPg/4iJa+5+RnjA== X-Received: by 2002:ac2:4194:: with SMTP id z20mr6339335lfh.74.1549528628715; Thu, 07 Feb 2019 00:37:08 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id l72sm470910lfg.75.2019.02.07.00.37.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 00:37:06 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie Subject: [PATCH 3/4] drm/mcde: Add new driver for ST-Ericsson MCDE Date: Thu, 7 Feb 2019 09:36:46 +0100 Message-Id: <20190207083647.20615-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207083647.20615-1-linus.walleij@linaro.org> References: <20190207083647.20615-1-linus.walleij@linaro.org> MIME-Version: 1.0 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: linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This adds a new DRM driver for the ST-Ericsson Multi Channel Display Engine, MCDE display controller. This hardware has three independent DSI hosts and can composit and display several memory buffers onto an LCD display. It was developed for several years inside of ST-Ericsson and shipped with a few million mobile phones from Sony and Samsung, as well as with the Snowball community development board. The driver is currently pretty rudimentary but supports a simple framebuffer so we can get penguins and graphics when using these SoCs. Signed-off-by: Linus Walleij --- Documentation/gpu/drivers.rst | 1 + Documentation/gpu/mcde.rst | 8 + MAINTAINERS | 7 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/mcde/Kconfig | 18 + drivers/gpu/drm/mcde/Makefile | 3 + drivers/gpu/drm/mcde/mcde_display.c | 1284 +++++++++++++++++++++++++ drivers/gpu/drm/mcde/mcde_drm.h | 52 + drivers/gpu/drm/mcde/mcde_drv.c | 540 +++++++++++ drivers/gpu/drm/mcde/mcde_dsi.c | 1374 +++++++++++++++++++++++++++ 11 files changed, 3290 insertions(+) create mode 100644 Documentation/gpu/mcde.rst create mode 100644 drivers/gpu/drm/mcde/Kconfig create mode 100644 drivers/gpu/drm/mcde/Makefile create mode 100644 drivers/gpu/drm/mcde/mcde_display.c create mode 100644 drivers/gpu/drm/mcde/mcde_drm.h create mode 100644 drivers/gpu/drm/mcde/mcde_drv.c create mode 100644 drivers/gpu/drm/mcde/mcde_dsi.c diff --git a/Documentation/gpu/drivers.rst b/Documentation/gpu/drivers.rst index 7c1672118a73..4b9ec50601f2 100644 --- a/Documentation/gpu/drivers.rst +++ b/Documentation/gpu/drivers.rst @@ -7,6 +7,7 @@ GPU Driver Documentation amdgpu amdgpu-dc i915 + mcde meson pl111 tegra diff --git a/Documentation/gpu/mcde.rst b/Documentation/gpu/mcde.rst new file mode 100644 index 000000000000..c69e977defda --- /dev/null +++ b/Documentation/gpu/mcde.rst @@ -0,0 +1,8 @@ +.. SPDX-License-Identifier: GPL-2.0 + +======================================================= + drm/mcde ST-Ericsson MCDE Multi-channel display engine +======================================================= + +.. kernel-doc:: drivers/gpu/drm/mcde/mcde_drv.c + :doc: ST-Ericsson MCDE DRM Driver diff --git a/MAINTAINERS b/MAINTAINERS index 32d444476a90..3038c519340d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4905,6 +4905,13 @@ S: Maintained F: drivers/gpu/drm/tinydrm/st7735r.c F: Documentation/devicetree/bindings/display/sitronix,st7735r.txt +DRM DRIVER FOR ST-ERICSSON MCDE +M: Linus Walleij +T: git git://anongit.freedesktop.org/drm/drm-misc +S: Maintained +F: drivers/gpu/drm/mcde/ +F: Documentation/devicetree/bindings/display/ste,mcde.txt + DRM DRIVER FOR TDFX VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/tdfx/ diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 4385f00e1d05..8689ea46c3bc 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -333,6 +333,8 @@ source "drivers/gpu/drm/tve200/Kconfig" source "drivers/gpu/drm/xen/Kconfig" +source "drivers/gpu/drm/mcde/Kconfig" + # Keep legacy drivers last menuconfig DRM_LEGACY diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index ce8d1d384319..ebc44893b13b 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -109,3 +109,4 @@ obj-$(CONFIG_DRM_TINYDRM) += tinydrm/ obj-$(CONFIG_DRM_PL111) += pl111/ obj-$(CONFIG_DRM_TVE200) += tve200/ obj-$(CONFIG_DRM_XEN) += xen/ +obj-$(CONFIG_DRM_MCDE) += mcde/ diff --git a/drivers/gpu/drm/mcde/Kconfig b/drivers/gpu/drm/mcde/Kconfig new file mode 100644 index 000000000000..b3990126562c --- /dev/null +++ b/drivers/gpu/drm/mcde/Kconfig @@ -0,0 +1,18 @@ +config DRM_MCDE + tristate "DRM Support for ST-Ericsson MCDE (Multichannel Display Engine)" + depends on DRM + depends on CMA + depends on ARM || COMPILE_TEST + depends on OF + select MFD_SYSCON + select DRM_MIPI_DSI + select DRM_BRIDGE + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER + select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE + help + Choose this option for DRM support for the ST-Ericsson MCDE + Multi-Channel Display Engine. + If M is selected the module will be called mcde_drm. diff --git a/drivers/gpu/drm/mcde/Makefile b/drivers/gpu/drm/mcde/Makefile new file mode 100644 index 000000000000..fe28f4e0fe46 --- /dev/null +++ b/drivers/gpu/drm/mcde/Makefile @@ -0,0 +1,3 @@ +mcde_drm-y += mcde_drv.o mcde_dsi.o mcde_display.o + +obj-$(CONFIG_DRM_MCDE) += mcde_drm.o diff --git a/drivers/gpu/drm/mcde/mcde_display.c b/drivers/gpu/drm/mcde/mcde_display.c new file mode 100644 index 000000000000..efa4c1c752a8 --- /dev/null +++ b/drivers/gpu/drm/mcde/mcde_display.c @@ -0,0 +1,1284 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 Linus Walleij + * Parts of this file were based on the MCDE driver by Marcus Lorentzon + * (C) ST-Ericsson SA 2013 + */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include