From patchwork Mon Dec 4 13:16:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 10092495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5CDC6035E for ; Tue, 5 Dec 2017 08:49:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B668C294F2 for ; Tue, 5 Dec 2017 08:49:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB8D629536; Tue, 5 Dec 2017 08:49:58 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable 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 5750A294F2 for ; Tue, 5 Dec 2017 08:49:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC7F76E432; Tue, 5 Dec 2017 08:49:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.47.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2AC06E2E1 for ; Mon, 4 Dec 2017 13:16:53 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id BC1DC24E0506; Mon, 4 Dec 2017 05:16:52 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 41EA8E64; Mon, 4 Dec 2017 05:16:52 -0800 (PST) Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2-vip.internal.synopsys.com [10.12.239.238]) by mailhost.synopsys.com (Postfix) with ESMTP id 02041E63; Mon, 4 Dec 2017 05:16:51 -0800 (PST) Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 4 Dec 2017 05:16:51 -0800 Received: from DE02WEMBXB.internal.synopsys.com ([fe80::95ce:118a:8321:a099]) by DE02WEHTCA.internal.synopsys.com ([::1]) with mapi id 14.03.0266.001; Mon, 4 Dec 2017 14:16:49 +0100 From: Alexey Brodkin To: "l.stach@pengutronix.de" , Jose Abreu Subject: xf86-video-armada via UDL [was: Re: UDL's fbdev doesn't work for user-space apps] Thread-Topic: xf86-video-armada via UDL [was: Re: UDL's fbdev doesn't work for user-space apps] Thread-Index: AQHTbQIkipqBBGWFjUqX7bL3/pGn2w== Date: Mon, 4 Dec 2017 13:16:48 +0000 Message-ID: <1512393408.4977.44.camel@synopsys.com> References: <1512387175.4977.24.camel@synopsys.com> <86238def-82be-2ad1-63d0-b9a8dbf83db6@synopsys.com> In-Reply-To: <86238def-82be-2ad1-63d0-b9a8dbf83db6@synopsys.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.225.15.245] Content-ID: MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 05 Dec 2017 08:49:51 +0000 Cc: "daniel.vetter@ffwll.ch" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "airlied@redhat.com" , "linux-snps-arc@lists.infradead.org" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi Jose, On Mon, 2017-12-04 at 11:50 +0000, Jose Abreu wrote: > Hi Alexey, > > On 04-12-2017 11:32, Alexey Brodkin wrote: > > > > My first [probably incorrect] assumption is Xserver requires fbdev (/dev/fbX) > > and it cannot use DRI video card natively. Is that correct? > > > > > > Xserver can use DRI directly, you need to enable modesetting > driver in Xorg config or use the designated driver for your card > (if there is any). Ok that makes sense. I didn't think about generic modesetting driver for Xserver. And that indeed works. This is my xorg.conf: ----------------------->8---------------------- # cat /etc/X11/xorg.conf  Section "Device"         Identifier      "Driver0"         Screen          0         Driver          "modesetting"         Option          "kmsdev" "/dev/dri/card1" EndSection ----------------------->8---------------------- I do see xclock is rendered fine. Now I guess is getting closer to what I really need :) In the end I wanted to get 3D rendered by Vivante GPU to be displayed on UDL. My assumption was very simple - if IMX-DRM+Etnaviv work fine it should be straight-forward to swap IMX-DRM bitstreamer with UDL and we're golden. That might be more a question to Lucas now. I use xorg.conf as found here: http://git.arm.linux.org.uk/cgit/xf86-video-armada.git/tree/conf/xorg-sample.conf?h=unstable-devel That's what it has: ----------------------->8---------------------- Section "Device" Identifier "Driver0" Screen 0 Driver "armada" # Support hotplugging displays? # Option "Hotplug" "TRUE" # Support hardware cursor if available? # Option "HWCursor" "TRUE" # Use GPU acceleration? # Option "UseGPU" "TRUE" # Provide Xv interfaces? # Option "XvAccel" "TRUE" # Prefer overlay for Xv (TRUE for armada-drm, FALSE for imx-drm) # Option "XvPreferOverlay" "TRUE" # Which accelerator module to load (automatically found if commented out) # Option "AccelModule" "etnadrm_gpu" # Option "AccelModule" "etnaviv_gpu" # Support DRI2 interfaces? # Option "DRI" "TRUE" EndSection ----------------------->8---------------------- Indeed I uncommented all the lines and then it allows to see for example glmark2-es2 working on Wandboard (that's exactly where "imx-drm + etnaviv" combo is used). But if I swap "imx-drm" to "udl" I don't see anything on my screen (connected via UDL) even though Xserver seems to really start claiming the screen (so I see it becomes black, effectively overriding whatever was there before) and glmark benchmark prints results. Maybe I'm missing some additional glue for UDL in "xf86-video-armada" except the simple one: ----------------------->8---------------------- dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --- a/src/armada_module.c +++ b/src/armada_module.c @@ -26,7 +26,7 @@  #define ARMADA_NAME            "armada"  #define ARMADA_DRIVER_NAME     "armada"   -#define DRM_MODULE_NAMES       "armada-drm", "imx-drm" +#define DRM_MODULE_NAMES       "armada-drm", "imx-drm", "udl"  #define DRM_DEFAULT_BUS_ID     NULL    static const char *drm_module_names[] = { DRM_MODULE_NAMES }; @@ -43,6 +43,11 @@ static SymTabRec ipu_chipsets[] = {         { -1, NULL }  };   +static SymTabRec udl_chipsets[] = { +       {  0, "UDL" }, +       { -1, NULL } +}; +  static const OptionInfoRec * const options[] = {         armada_drm_options,         common_drm_options, @@ -115,6 +120,8 @@ static void armada_identify(int flags)                           armada_chipsets);         xf86PrintChipsets(ARMADA_NAME, "Support for Freescale IPU",                           ipu_chipsets); +       xf86PrintChipsets(ARMADA_NAME, "Support DisplayLink USB2.0", +                         udl_chipsets);  } ----------------------->8---------------------- -Alexey _______________________________________________