From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9187C433DB for ; Fri, 26 Mar 2021 02:31:44 +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 89CA26198C for ; Fri, 26 Mar 2021 02:31:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89CA26198C Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=verizon.net 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 7822A6E122; Fri, 26 Mar 2021 02:31:43 +0000 (UTC) Received: from sonic312-25.consmr.mail.ne1.yahoo.com (sonic312-25.consmr.mail.ne1.yahoo.com [66.163.191.206]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8D9016E122 for ; Fri, 26 Mar 2021 02:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verizon.net; s=a2048; t=1616725900; bh=fxAupcwc0ghGC+0xyGJqErmzSGQHKGQELQbH8WCPT1g=; h=From:To:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=aXwsY516ppSkp6CizJtBLnJ/pnRwkxprRJHDFVXXMTE/5i6hF/KcJpygyKwltz0aTAl1B6oqefYyv03CQM5iaJbtYNrpEstGKjGrfnq7IZ58IbvYDmmUE+8TFanv4BLiboDJJNUCeZLT3fGSm+6zoXTS9ADDIHTSgXDe08GDLTeKtTvX8W9Kl80vX3lvHNWtdY3xmFGXwNuwayAGVTLPGLSfqiEeUPbJLXCdYQCFdU9FDSvk/tds13nAWknEKSpfM8RTmMPGWFuooDrg/m2ehb/RYvG1ots5d6nuGMEEQ2ilef6gzQ/MTdNOz80K9Q9+WXx/ATndDDfgSWYCR88RYA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1616725900; bh=wsrzSnNCsagRvtLZJUPsdUPDIy+pfwVikSqZZqEcFfX=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=QyJz89Wxh/qSitAo2VrmeOzgFOczVXo+wKaAB9zwz9TaLyQOBcFxdqLjKlPBnZj3dYYGNRyEhQuFY9VToxA0FGgR88l0rn80OcyVtBkO8oWiRTkxmdlogP7bLKPhdpHiXmduypf8xfTIXlakU/3yMTR3GIjNvhh4cNfqgnZPsdXBEg1AxkrJfTEC93TeVIPsA+qcVeuajokq1EbHlW/p4vJ3AZEcJoa6EBc8Gphnh3e19zIrd+r04MldVvweBxwDm9dLYTLFxnn32IZHBc/ajgm2aHKkP52xrCw1slgQ7CZfPKSC+fwaWY5Opak8hU+eYHTEHSIRZilvOtNrtovSUg== X-YMail-OSG: I_M7eBIVM1lztnVkdu0nMQB0sI1I2kqTOyYNLwZeeJculBJ40To4m6bKnpTBpGy .VZABTP.QisJhNq9y1oCdrwBiKcQjE2_7vJKdozcRZfGXcEzh3yks5wMy8aKKWtKaLGLzIVb4CRa m8.FeLHBSGL49IljO5w4gLW6YVa6RVJAYgsqGRN88SEK4k_tkcjU1dBYDNSVD8_o87XatDEEEmAK ONbJ2sdhIQa8WN6iNaQ1XJCLcfbRcg.pstXa3HG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5ORZzQTVpiM7n PZphU0.Q5l6SysFCQAsbk5O43VLPo9but6dEWZClIjpJ6r08pLLhxDwTX_IXn100VgedNjH86eH9 HwCYvfqNoxcIvIwnJryEyrQOXY.pP1Z4Q0mRAt8UVqVOdtVcs4ZNnGPQFd4zkQXnV4JG72jYED3M Ou_ryJg-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Fri, 26 Mar 2021 02:31:40 +0000 Received: by smtp422.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a8231d142918328d4caab0aa325c5def; Fri, 26 Mar 2021 02:31:39 +0000 (UTC) From: nerdopolis To: dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 00/10] drm: Support simple-framebuffer devices and firmware fbs Date: Thu, 25 Mar 2021 22:31:37 -0400 Message-ID: <1835728.ynm6b5AEHT@nerdopolis> In-Reply-To: <20210318102921.21536-1-tzimmermann@suse.de> References: <20210318102921.21536-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Mailer: WebService/1.1.17936 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.9.1) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thursday, March 18, 2021 6:29:11 AM EDT Thomas Zimmermann wrote: > This patchset adds support for simple-framebuffer platform devices and > a handover mechanism for native drivers to take-over control of the > hardware. > > The new driver, called simpledrm, binds to a simple-frambuffer platform > device. The kernel's boot code creates such devices for firmware-provided > framebuffers, such as EFI-GOP or VESA. Typically the BIOS, UEFI or boot > loader sets up the framebuffers. Description via device tree is also an > option. > > Simpledrm is small enough to be linked into the kernel. The driver's main > purpose is to provide graphical output during the early phases of the boot > process, before the native DRM drivers are available. Native drivers are > typically loaded from an initrd ram disk. Occationally simpledrm can also > serve as interim solution on graphics hardware without native DRM driver. > > So far distributions rely on fbdev drivers, such as efifb, vesafb or > simplefb, for early-boot graphical output. However fbdev is deprecated and > the drivers do not provide DRM interfaces for modern userspace. > > Patches 1 and 2 prepare the DRM format helpers for simpledrm. > > Patches 3 and 4 add a hand-over mechanism. Simpledrm acquires it's > framebuffer's I/O-memory range and provides a callback function to be > removed by a native driver. The native driver will remove simpledrm before > taking over the hardware. The removal is integrated into existing helpers, > so drivers use it automatically. > > Patches 5 to 10 add the simpledrm driver. It's build on simple DRM helpers > and SHMEM. It supports 16-bit, 24-bit and 32-bit RGB framebuffers. During > pageflips, SHMEM buffers are copied into the framebuffer memory, similar > to cirrus or mgag200. The code in patches 8 and 9 handles clocks and > regulators. It's based on the simplefb drivers, but has been modified for > DRM. > > I've also been working on fastboot support (i.e., flicker-free booting). > This requires state-readout from simpledrm via generic interfaces, as > outlined in [1]. I do have some prototype code, but it will take a while > to get this ready. Simpledrm will then support it. > > I've tested simpledrm with x86 EFI and VESA framebuffers, which both work > reliably. The fbdev console and Weston work automatically. Xorg requires > manual configuration of the device. Xorgs current modesetting driver does > not work with both, platform and PCI device, for the same physical > hardware. Once configured, X11 works. I looked into X11, but couldn't see > an easy way of fixing the problem. With the push towards Wayland+Xwayland > I expect the problem to become a non-issue soon. Additional testing has > been reported at [2]. > > One cosmetical issue is that simpledrm's device file is card0 and the > native driver's device file is card1. After simpledrm has been kicked out, > only card1 is left. This does not seem to be a practical problem however. > > TODO/IDEAS: > > * provide deferred takeover > * provide bootsplash DRM client > * make simplekms usable with ARM-EFI fbs > > v2: > * rename to simpledrm, aperture helpers > * reorganized patches > * use hotplug helpers for removal (Daniel) > * added DT match tables (Rob) > * use shadow-plane helpers > * lots of minor cleanups > > [1] https://lore.kernel.org/dri-devel/CAKMK7uHtqHy_oz4W7F+hmp9iqp7W5Ra8CxPvJ=9BwmvfU-O0gg@mail.gmail.com/ > [2] https://lore.kernel.org/dri-devel/1761762.3HQLrFs1K7@nerdopolis/ > > Thomas Zimmermann (10): > drm/format-helper: Pass destination pitch to drm_fb_memcpy_dstclip() > drm/format-helper: Add blitter functions > drm/aperture: Move fbdev conflict helpers into drm_aperture.h > drm/aperture: Add infrastructure for aperture ownership > drm: Add simpledrm driver > drm/simpledrm: Add fbdev emulation > drm/simpledrm: Initialize framebuffer data from device-tree node > drm/simpledrm: Acquire clocks from DT device node > drm/simpledrm: Acquire regulators from DT device node > drm/simpledrm: Acquire memory aperture for framebuffer > > Documentation/gpu/drm-internals.rst | 12 + > MAINTAINERS | 7 + > drivers/gpu/drm/Kconfig | 7 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/drm_aperture.c | 287 ++++++++ > drivers/gpu/drm/drm_format_helper.c | 96 ++- > drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- > drivers/gpu/drm/tiny/Kconfig | 17 + > drivers/gpu/drm/tiny/Makefile | 1 + > drivers/gpu/drm/tiny/cirrus.c | 2 +- > drivers/gpu/drm/tiny/simpledrm.c | 932 +++++++++++++++++++++++++ > include/drm/drm_aperture.h | 96 +++ > include/drm/drm_fb_helper.h | 56 +- > include/drm/drm_format_helper.h | 10 +- > 14 files changed, 1466 insertions(+), 60 deletions(-) > create mode 100644 drivers/gpu/drm/drm_aperture.c > create mode 100644 drivers/gpu/drm/tiny/simpledrm.c > create mode 100644 include/drm/drm_aperture.h > > -- > 2.30.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel > Hi Testing the new version against drm-next and it works! I found I had to turn off building CONFIG_FB_SIMPLE as it was taking over as the VGA device before simpledrm (or something. But it works, and as with the older version, testing with the 'vmware' device that QEMU supports as a graphics device now has mode setting support which is pretty cool Thanks Thanks _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel