Re: [RFC v3 11/12] drm/client: Add bootsplash client

2018-03-06 Thread Max Staudt
Thanks for CCing! I like the idea of this patchset. As far as I understand, this multiplexing is exactly what I would have had to write in order to port the bootsplash to DRM. And we finally get rid of the driver-specific FB emulation hacks, too. Good riddance. Thanks for the initiative,

[RFC PATCH v3 03/13] bootsplash: Flush framebuffer after drawing

2018-01-18 Thread Max Staudt
interface - we also match some known ones, currently: - ast - cirrus - mgag200 Signed-off-by: Max Staudt <msta...@suse.de> Reviewed-by: Oliver Neukum <oneu...@suse.com> --- drivers/video/fbdev/core/bootsplash.c | 2 ++ drivers/video/fbdev/core/bootsplash_internal.h | 1 + d

[RFC PATCH v3 04/13] bootsplash: Add corner positioning

2018-01-18 Thread Max Staudt
This allows showing multiple logos, each in its own position, relative to the eight screen corners. Signed-off-by: Max Staudt <msta...@suse.de> --- drivers/video/fbdev/core/bootsplash_render.c | 136 ++- include/uapi/linux/bootsplash_file.h | 45 ++

[RFC PATCH v3 11/13] bootsplash: sysfs entries to load and unload files

2018-01-18 Thread Max Staudt
Oct 2017 +KernelVersion: 4.14 +Contact: Max Staudt <msta...@suse.de> +Description: + Can only be set. + + Any value written will cause the splash to be disabled and + internal memory structures to be freed. + + A fir

[RFC PATCH v3 02/13] bootsplash: Add file reading and picture rendering

2018-01-18 Thread Max Staudt
* and tell the kernel to use it as follows: bootsplash.bootfile=mypath/myfile Since the splash code is using request_firmware() to load the file, the path has to be beneath /lib/firmware. Signed-off-by: Max Staudt <msta...@suse.de> --- MAINTAINERS| 1

[RFC PATCH v3 13/13] tools/bootsplash: Add script and data to create sample file

2018-01-18 Thread Max Staudt
Also, mention this in the bootsplash documentation. Signed-off-by: Max Staudt <msta...@suse.de> --- Documentation/bootsplash.rst | 10 ++ tools/bootsplash/.gitignore| 3 ++ tools/bootsplash/ajax-loader.gif | Bin 0 -> 3208 bytes tools/bootsplash/bootsplash-tux

[RFC PATCH v3 05/13] bootsplash: Add animation support

2018-01-18 Thread Max Staudt
really make sense to animate more than one object at a time anyway. Furthermore, this patch introduces a check for reusing a framebuffer where the splash has recently been painted on - in this case, we only redraw the objects that are animated. Signed-off-by: Max Staudt <msta...@suse

[RFC PATCH v3 10/13] Documentation: Add bootsplash main documentation

2018-01-18 Thread Max Staudt
Signed-off-by: Max Staudt <msta...@suse.de> --- .../ABI/testing/sysfs-platform-bootsplash | 11 + Documentation/bootsplash.rst | 285 + MAINTAINERS| 2 + 3 files changed, 298 insertions(+) creat

[RFC PATCH v3 00/13] Kernel based bootsplash

2018-01-18 Thread Max Staudt
Dear fbdev/fbcon/dri developers, Thanks for all the valuable feedback. I've looked into the suggestions you made, and found that it doesn't currently make sense to continue working on the splash code, given the low practical interest I've received on LKML. The code is, and always has been,

[RFC PATCH v3 01/13] bootsplash: Initial implementation showing black screen

2018-01-18 Thread Max Staudt
/linux/if_bonding.h +BOOTSPLASH +M: Max Staudt <msta...@suse.de> +L: linux-fb...@vger.kernel.org +S: Maintained +F: drivers/video/fbdev/core/bootsplash*.* +F: drivers/video/fbdev/core/dummycon.c +F: include/linux/bootsplash.h + BPF (Safe dynamic programs and tools)

[RFC PATCH v3 08/13] sysrq: Disable bootsplash on SAK

2018-01-18 Thread Max Staudt
When the user requests a clean TTY via the SAK SysRq, that means he really wants to use the console. Let's disable the bootsplash, even if the request is not on a VT, as the user probably knows what he's doing and it's more helpful to get out of his way. Signed-off-by: Max Staudt <m

[RFC PATCH v3 06/13] vt: Redraw bootsplash fully on console_unblank

2018-01-18 Thread Max Staudt
. Enable splash 3. Start X (or any other KD_GRAPHICS program) 4. Exit X 5. Splash is not seen, apart from animations Signed-off-by: Max Staudt <msta...@suse.de> Reviewed-by: Oliver Neukum <oneu...@suse.com> --- drivers/tty/vt/vt.c | 2 ++ drivers/video/fbdev/core/boots

[RFC PATCH v3 09/13] fbcon: Disable bootsplash on oops

2018-01-18 Thread Max Staudt
Signed-off-by: Max Staudt <msta...@suse.de> Reviewed-by: Oliver Neukum <oneu...@suse.com> --- drivers/video/fbdev/core/fbcon.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 9a39a6fcfe98..

[RFC PATCH v3 07/13] vt: Add keyboard hook to disable bootsplash

2018-01-18 Thread Max Staudt
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt <msta...@suse.de> --- drivers/tty/vt/keyboard.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/

[RFC PATCH v3 12/13] tools/bootsplash: Add a basic splash file creation tool

2018-01-18 Thread Max Staudt
Signed-off-by: Max Staudt <msta...@suse.de> --- MAINTAINERS | 1 + tools/bootsplash/.gitignore | 1 + tools/bootsplash/Makefile| 9 + tools/bootsplash/bootsplash-packer.c | 471 +++ 4 files changed, 482 inse

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2018-01-03 Thread Max Staudt
On 12/31/2017 01:53 PM, Alan Cox wrote: > On Tue, 19 Dec 2017 15:07:53 +0100 > Oliver Neukum wrote: > >> Am Dienstag, den 19.12.2017, 14:57 +0100 schrieb Daniel Vetter: Would you like me to extend the FB API or not? >>> >>> Yes. Well for real I'd like you to do kms, so

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2018-01-03 Thread Max Staudt
On 12/31/2017 01:44 PM, Alan Cox wrote: >> So fundamentally I don't think an in-kernel bootsplash is a bad idea. >> But most likely you want this on a highly embedded system, which > > It wouldn't be in kernel on such a device, it'll be in the bootstrap > before (or on a dual core device quite

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2018-01-03 Thread Max Staudt
On 12/31/2017 01:35 PM, Alan Cox wrote: > For embedded every KB counts. That is likely to remain the same for some > time because at the end of the day small devices are constrained about the > amount of SRAM you can put on die and the amount of power you can afford > for DRAM. Fascinating,

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2018-01-03 Thread Max Staudt
On 12/29/2017 06:13 PM, Jani Nikula wrote: > I think the first issue is the boot manager (e.g. grub) messing up > whatever the BIOS or GOP or whatever drew. If I don't touch any buttons, > I'd prefer the Lenovo or VAIO or NUC or whatever logo stay there. IIRC > some BIOSes let you set up your own

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-21 Thread Max Staudt
On 12/21/2017 10:48 AM, Daniel Vetter wrote: > Ok, here's my expectation: > > - fix plymouth and driver loading > > If the plymouth maintainer tells me that's impossible, I'll look at this > again. And no, this does not require killing drivers with SIGBUS, at least > not with drm. Meanwhile I

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-21 Thread Max Staudt
On 12/21/2017 03:51 PM, Ray Strode wrote: > Hi, > > On Wed, Dec 20, 2017 at 11:44 AM Max Staudt <msta...@suse.de> wrote: >> It'd be nice to see this bug fixed, as it happens only occasionally (as is >> the nature of a >> race condition), and was thus really har

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-20 Thread Max Staudt
On 12/20/2017 04:35 PM, Ray Strode wrote: > Hi, > >> Actually, I don't want that :) >> >> This was a design decision that I've made to keep the code small and simple >> to audit. >> As it is, the simple bootsplash code will make 99% of people happy. > You think only 1% of linux users have more

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-20 Thread Max Staudt
On 12/20/2017 04:21 PM, Ray Strode wrote: > If we've reached the scenario you're discussing above, the real > failure is that the KMS > driver took too long to load. DRM is the platform graphics api. If > it's not loading > timely enough to show graphics then that's the problem! It sounds > like

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-20 Thread Max Staudt
On 12/20/2017 04:19 PM, Daniel Vetter wrote: > On Wed, Dec 20, 2017 at 4:11 PM, Daniel Vetter <dan...@ffwll.ch> wrote: >> On Wed, Dec 20, 2017 at 3:55 PM, Max Staudt <msta...@suse.de> wrote: >>> On 12/20/2017 11:14 AM, Daniel Vetter wrote: >>>> btw since I

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-20 Thread Max Staudt
On 12/20/2017 04:11 PM, Daniel Vetter wrote: > So fundamentally I don't think an in-kernel bootsplash is a bad idea. > But most likely you want this on a highly embedded system, which > probably is compiled for your exact hw, with pretty much everything > built in. Also, no fbcon, maybe even no vt

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-20 Thread Max Staudt
On 12/20/2017 11:14 AM, Daniel Vetter wrote: > btw since I'm probably sounding a bit too grumpy here: I'd very much > support this. I think bootsplash in kernel has a bunch of uses, and it > shouldn't be hard to get non-suse people to cheer for it (makes merging > easier if it's not just a one-off

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-20 Thread Max Staudt
On 12/20/2017 11:06 AM, Neil Armstrong wrote: > My 2cents about this patchset: > You did a good job about all the animation and splash logic, but for me all > this fbcon > stuff is a huge hack, please use a standard and modern display subsystem en > leave fbcon > die alone Thanks for the

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-20 Thread Max Staudt
On 12/20/2017 10:43 AM, Daniel Vetter wrote: > On Tue, Dec 19, 2017 at 07:40:12PM +0100, Max Staudt wrote: >> On 12/19/2017 06:26 PM, Daniel Vetter wrote: >>> So essentially you're telling me that on a current general purpose >>> distro the gfx driver loading is a dump

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-20 Thread Max Staudt
On 12/19/2017 10:01 PM, Ray Strode wrote: > Hi, > > On Tue, Dec 19, 2017 at 10:41 AM, Max Staudt <msta...@suse.de> wrote: >> I'm hooking into the in-kernel terminal emulator, because the bootsplash is a >> functional extension of that. It just happens that fbcon

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-20 Thread Max Staudt
On 12/19/2017 09:30 PM, Ray Strode wrote: > Hi, > >> For example, having a userspace splash that starts as early as it can >> (thus on vesafb/efifb on a PC) will cause the KMS driver to fail >> reserving the entirety of video RAM, and thus fail loading. This cannot be >> fixed. > well the fix

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-19 Thread Max Staudt
On 12/19/2017 06:26 PM, Daniel Vetter wrote: > On Tue, Dec 19, 2017 at 6:04 PM, Max Staudt <msta...@suse.de> wrote: >> Well, those could enable fbcon if they want the bootsplash. Shouldn't make a >> difference anyway if they're powerful enough to run Linux. As long as the &

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-19 Thread Max Staudt
On 12/19/2017 05:16 PM, Daniel Vetter wrote: > On Wed, Dec 13, 2017 at 08:47:42PM +0100, Max Staudt wrote: >> Dear fbdev and fbcon developers, >> >> Thank you very much for your input for the first patch series. >> >> I've included your feedback into this second

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-19 Thread Max Staudt
On 12/19/2017 05:09 PM, Daniel Vetter wrote: > btw the reason drmcon didn't move is that David Herrmann moved on from > hacking on graphics stuff, and no one needs it. There's nothing > fundamentally wrong with his patches for a basic emergency console on > plain drm, or the simpledrm driver to

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-19 Thread Max Staudt
On 12/19/2017 05:02 PM, Daniel Vetter wrote: > On Tue, Dec 19, 2017 at 4:41 PM, Max Staudt <msta...@suse.de> wrote: >> On 12/19/2017 02:57 PM, Daniel Vetter wrote: >>> The problem is that defio is totally not how a real driver works. >> >> But they do exis

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-19 Thread Max Staudt
On 12/19/2017 02:57 PM, Daniel Vetter wrote: > Where do drivers deal with struct file deep down? As an example, I remembered this to be the case in nouveau's code for allocating a framebuffer. So I checked, and it's much better now. So I was mistaken about this - sorry. Thanks a lot for

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-19 Thread Max Staudt
On 12/19/2017 01:23 PM, Daniel Vetter wrote: > On Thu, Dec 14, 2017 at 04:36:49PM +0100, Max Staudt wrote: >> 2) We need to go out of the way when a graphical application starts, and >> come back when it's done. fbcon already has the logic for this, and >> fbcon is also t

Re: [RFC PATCH v2 01/13] bootsplash: Initial implementation showing black screen

2017-12-14 Thread Max Staudt
On 12/14/2017 12:55 AM, Randy Dunlap wrote: > On 12/13/2017 11:47 AM, Max Staudt wrote: >> This is the initial prototype for a lean Linux kernel bootsplash. >> >> As it is now, it will show a black screen rather than a logo, and >> only if manually ena

Re: [RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-14 Thread Max Staudt
On 12/13/2017 10:35 PM, Daniel Vetter wrote: > Using drm directly would allow you to flush the contents without the fake > (and tbh, really expensive on most drivers) copy op. If you insist on > using fbdev for this stuff, then at least add a new hook to flush cpu > rendering. My reasoning is as

Re: [RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-13 Thread Max Staudt
Unfortunately I've forgotten to rebase this patchset to 4.15, so it still builds on top of 4.14. I'll rebase it for the next roll. Max ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[RFC PATCH v2 11/13] bootsplash: sysfs entries to load and unload files

2017-12-13 Thread Max Staudt
Oct 2017 +KernelVersion: 4.14 +Contact: Max Staudt <msta...@suse.de> +Description: + Can only be set. + + Any value written will cause the splash to be disabled and + internal memory structures to be freed. + + A fir

[RFC PATCH v2 08/13] sysrq: Disable bootsplash on SAK

2017-12-13 Thread Max Staudt
When the user requests a clean TTY via the SAK SysRq, that means he really wants to use the console. Let's disable the bootsplash, even if the request is not on a VT, as the user probably knows what he's doing and it's more helpful to get out of his way. Signed-off-by: Max Staudt <m

[RFC PATCH v2 02/13] bootsplash: Add file reading and picture rendering

2017-12-13 Thread Max Staudt
Load logo(s) from a file and render them in the center of the screen. This removes the "black screen" functionality, which can now be emulated by providing a splash file with no pictures and a black background. Signed-off-by: Max Staudt <msta...@suse.de>

[RFC PATCH v2 07/13] vt: Add keyboard hook to disable bootsplash

2017-12-13 Thread Max Staudt
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt <msta...@suse.de> --- drivers/tty/vt/keyboard.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/

[RFC PATCH v2 12/13] tools/bootsplash: Add a basic splash file creation tool

2017-12-13 Thread Max Staudt
Signed-off-by: Max Staudt <msta...@suse.de> --- MAINTAINERS | 1 + tools/bootsplash/.gitignore | 1 + tools/bootsplash/Makefile| 9 + tools/bootsplash/bootsplash-packer.c | 471 +++ 4 files changed, 482 inse

[RFC PATCH v2 03/13] bootsplash: Flush framebuffer after drawing

2017-12-13 Thread Max Staudt
interface - we also match some known ones, currently: - ast - cirrus - mgag200 Signed-off-by: Max Staudt <msta...@suse.de> Reviewed-by: Oliver Neukum <oneu...@suse.com> --- drivers/video/fbdev/core/bootsplash.c | 2 ++ drivers/video/fbdev/core/bootsplash_internal.h | 1 + d

[RFC PATCH v2 13/13] tools/bootsplash: Add script and data to create sample file

2017-12-13 Thread Max Staudt
Also, mention this in the bootsplash documentation. Signed-off-by: Max Staudt <msta...@suse.de> --- Documentation/bootsplash.rst | 10 ++ tools/bootsplash/.gitignore| 3 ++ tools/bootsplash/ajax-loader.gif | Bin 0 -> 3208 bytes tools/bootsplash/bootsplash-tux

[RFC PATCH v2 05/13] bootsplash: Add animation support

2017-12-13 Thread Max Staudt
really make sense to animate more than one object at a time anyway. Furthermore, this patch introduces a check for reusing a framebuffer where the splash has recently been painted on - in this case, we only redraw the objects that are animated. Signed-off-by: Max Staudt <msta...@suse

[RFC PATCH v2 10/13] Documentation: Add bootsplash main documentation

2017-12-13 Thread Max Staudt
Signed-off-by: Max Staudt <msta...@suse.de> --- .../ABI/testing/sysfs-platform-bootsplash | 11 ++ Documentation/bootsplash.rst | 177 + MAINTAINERS| 2 + 3 files changed, 190 insertions(+) creat

[RFC PATCH v2 01/13] bootsplash: Initial implementation showing black screen

2017-12-13 Thread Max Staudt
ot reserve its VRAM. - Simplification of userspace integration: Right now, hooking up a splash screen in userspace is quite complex. Having it in the kernel makes this a breeze, as hooks for switch_root, remounting r/w, etc. become obsolete. Signed-off-by: Max Staudt <ms

[RFC PATCH v2 09/13] fbcon: Disable bootsplash on oops

2017-12-13 Thread Max Staudt
Signed-off-by: Max Staudt <msta...@suse.de> Reviewed-by: Oliver Neukum <oneu...@suse.com> --- drivers/video/fbdev/core/fbcon.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 9a39a6fcfe98..

[RFC PATCH v2 00/13] Kernel based bootsplash

2017-12-13 Thread Max Staudt
Dear fbdev and fbcon developers, Thank you very much for your input for the first patch series. I've included your feedback into this second roll, and kindly ask for your opinion on the new patch series. Changes from v1 to v2: + Added a user space tool to create splash theme files + Bumped

[RFC PATCH v2 06/13] vt: Redraw bootsplash fully on console_unblank

2017-12-13 Thread Max Staudt
. Enable splash 3. Start X (or any other KD_GRAPHICS program) 4. Exit X 5. Splash is not seen, apart from animations Signed-off-by: Max Staudt <msta...@suse.de> Reviewed-by: Oliver Neukum <oneu...@suse.com> --- drivers/tty/vt/vt.c | 2 ++ drivers/video/fbdev/core/boots

[RFC PATCH v2 04/13] bootsplash: Add corner positioning

2017-12-13 Thread Max Staudt
This allows showing multiple logos, each in its own position, relative to the eight screen corners. Signed-off-by: Max Staudt <msta...@suse.de> --- drivers/video/fbdev/core/bootsplash_render.c | 136 ++- include/uapi/linux/bootsplash_file.h | 45 ++

[PATCH] drm/bochs: Implement nomodeset

2017-01-18 Thread Max Staudt
Up until now, the bochsdrm driver didn't handle the nomodeset option at boot, and didn't provide a "modeset" module option either. This patch implements both. The new parameter can be used by specifying bochs-drm.modeset=0 at boot time. Signed-off-by: Max Staudt <msta...@suse

gnome-shell is frozen upon wakeup from DPMS (bisected)

2016-11-10 Thread Max Staudt
Hi, I have bisected a commit in v4.6 that fixes a freeze of the screen on DPMS sleep: 777e3cbc791f131806d9bf24b3325637c7fc228d drm/radeon: Switch to drm_vblank_on/off When running 'xset dpms force off' in a GNOME session (I tested this on openSUSE Leap 42.2), sometimes the screen will freeze,

[PATCH 2/3] Define fb_open_adj_file()

2016-05-25 Thread Max Staudt
On 05/24/2016 06:51 PM, Daniel Vetter wrote: > On Tue, May 24, 2016 at 6:28 PM, Max Staudt wrote: >> Hi Daniel, >> >> Thanks for the feedback! Comments below: >> >> >> On 05/23/2016 03:44 PM, Daniel Vetter wrote: >>> Do we _really_ care abou

[PATCH 2/3] Define fb_open_adj_file()

2016-05-24 Thread Max Staudt
Hi Daniel, Thanks for the feedback! Comments below: On 05/23/2016 03:44 PM, Daniel Vetter wrote: > Do we _really_ care about fbdev mmap support so much that we want to add > more hacks all over the place (in each driver) to make it work? Given that > fbdev is officially in the "no more drivers"

[PATCH 3/3] Add fb_open_adj_file() to bochsdrmfb to avoid use-after-free

2016-05-23 Thread 'Max Staudt
From: Max Staudt <msta...@suse.de> Currently, when using bochsdrm(fb), opening /dev/drm/card0 will adjust file->f_mapping, but opening /dev/fb0 will not. This may result in dangling pointers from user space when memory is evicted, and therefore in use-after-free crashes when using the

[PATCH 2/3] Define fb_open_adj_file()

2016-05-23 Thread 'Max Staudt
From: Max Staudt <msta...@suse.de> This callback from fb_open() allows a fbdev driver to adjust things such as file->f_mapping to better represent the internal structures. This is needed to allow TTM drivers using ttm_fbdev_mmap() to properly set file->f_mapping to TTM's address_s

[PATCH 1/3] Add missing "goto out" after fbops->fb_open()

2016-05-23 Thread 'Max Staudt
From: Max Staudt <msta...@suse.de> It doesn't make sense to execute any further actions after a failed call to fbops->fb_open(). Signed-off-by: Max Staudt --- drivers/video/fbdev/core/fbmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/f

[PATCH 0/3] Fix kernel WARNING in TTM/Bochs KMS driver

2016-05-23 Thread 'Max Staudt
to ship the bochsdrm driver, and with the fbdev emulation active. In other words: Any modern distro's default setup will do. Max Staudt [PATCH 1/3] Add missing "goto out" after fbops->fb_open() [PATCH 2/3] Define fb_open_adj_file() [PATCH 3/3] Add fb_open_adj_file() to bochsdrmfb to avoid