mbox series

[psplash,RFC,00/14] Implement DRM backend

Message ID 20220425075954.10427-1-vasyl.vavrychuk@opensynergy.com
Headers show
Series Implement DRM backend | expand

Message

Vasyl Vavrychuk April 25, 2022, 7:59 a.m. UTC
It is needed in case display does not support FB.

The missing part is drawing splash screen over all connected displays. I think
there should be loop somewhere for this, but I am not sure which level is the
best to put it.

https://github.com/r1mikey/psplash-drm/blob/drm/implement-drm/psplash-draw.c has
psplash_draw_initial(_one), psplash_draw_msg(_one) and
psplash_draw_progress(_one) implementing loop over scanouts. I am think about
doing the same.

Vasyl Vavrychuk (14):
  Trim trailing spaces
  Fix 'unused-result' warnings
  Remove unused save_termios
  Remove 'psplash-fb.h' from 'psplash.h'
  Extract plot pixel from psplash-fb
  Extract draw rect/image from psplash-fb
  Extract draw font from psplash-fb
  psplash.c: Make psplash_draw_{msg,progress} independent of FB
  Rework flip as function pointer
  Import drm-howto modeset.c as psplash-drm.c
  Implement drm backend
  Reverse modeset_list
  psplash-drm.c: Allocate resources only for the first connector
  psplash-drm.c: Implement double buffering

 Makefile.am       |  15 +-
 configure.ac      |   9 +
 psplash-console.c |  34 +-
 psplash-console.h |   8 +-
 psplash-draw.c    | 295 +++++++++++++++++
 psplash-draw.h    |  81 +++++
 psplash-drm.c     | 787 ++++++++++++++++++++++++++++++++++++++++++++++
 psplash-drm.h     |  17 +
 psplash-fb.c      | 371 +++-------------------
 psplash-fb.h      |  74 +----
 psplash-systemd.c |  36 ++-
 psplash-write.c   |  37 ++-
 psplash.c         | 186 ++++++-----
 psplash.h         |   7 +-
 14 files changed, 1446 insertions(+), 511 deletions(-)
 create mode 100644 psplash-draw.c
 create mode 100644 psplash-draw.h
 create mode 100644 psplash-drm.c
 create mode 100644 psplash-drm.h

Comments

Alexander Kanavin April 25, 2022, 8:24 a.m. UTC | #1
Hello Vasyl,

can you explain how this was tested? Is it possible to automate with
qemu targets?

Alex

On Mon, 25 Apr 2022 at 10:00, Vasyl Vavrychuk
<Vasyl.Vavrychuk@opensynergy.com> wrote:
>
> It is needed in case display does not support FB.
>
> The missing part is drawing splash screen over all connected displays. I think
> there should be loop somewhere for this, but I am not sure which level is the
> best to put it.
>
> https://github.com/r1mikey/psplash-drm/blob/drm/implement-drm/psplash-draw.c has
> psplash_draw_initial(_one), psplash_draw_msg(_one) and
> psplash_draw_progress(_one) implementing loop over scanouts. I am think about
> doing the same.
>
> Vasyl Vavrychuk (14):
>   Trim trailing spaces
>   Fix 'unused-result' warnings
>   Remove unused save_termios
>   Remove 'psplash-fb.h' from 'psplash.h'
>   Extract plot pixel from psplash-fb
>   Extract draw rect/image from psplash-fb
>   Extract draw font from psplash-fb
>   psplash.c: Make psplash_draw_{msg,progress} independent of FB
>   Rework flip as function pointer
>   Import drm-howto modeset.c as psplash-drm.c
>   Implement drm backend
>   Reverse modeset_list
>   psplash-drm.c: Allocate resources only for the first connector
>   psplash-drm.c: Implement double buffering
>
>  Makefile.am       |  15 +-
>  configure.ac      |   9 +
>  psplash-console.c |  34 +-
>  psplash-console.h |   8 +-
>  psplash-draw.c    | 295 +++++++++++++++++
>  psplash-draw.h    |  81 +++++
>  psplash-drm.c     | 787 ++++++++++++++++++++++++++++++++++++++++++++++
>  psplash-drm.h     |  17 +
>  psplash-fb.c      | 371 +++-------------------
>  psplash-fb.h      |  74 +----
>  psplash-systemd.c |  36 ++-
>  psplash-write.c   |  37 ++-
>  psplash.c         | 186 ++++++-----
>  psplash.h         |   7 +-
>  14 files changed, 1446 insertions(+), 511 deletions(-)
>  create mode 100644 psplash-draw.c
>  create mode 100644 psplash-draw.h
>  create mode 100644 psplash-drm.c
>  create mode 100644 psplash-drm.h
>
> --
> 2.30.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#56871): https://lists.yoctoproject.org/g/yocto/message/56871
> Mute This Topic: https://lists.yoctoproject.org/mt/90680297/1686489
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Vasyl Vavrychuk April 28, 2022, 1:54 p.m. UTC | #2
Hi, Alex,

Thanks for feedback.

> can you explain how this was tested?

In "Implement drm backend" commit I added "--drm" switch to use DRM/KMS 
instead of FB in psplash. I use this switch to test by changes, I run 
them without this switch to check that FB keeps working too.

Before weston starts I do

    echo QUIT > /run/psplash_fifo

to stop psplash.

I did not tried personally but it should work under QEMU too.

> Is it possible to automate with qemu targets?

Depends if QEMU/yocto test automation support screenshots. 
Unfortunately, I don't have expirience with it.

> Alex
> 
> On Mon, 25 Apr 2022 at 10:00, Vasyl Vavrychuk
> <Vasyl.Vavrychuk@opensynergy.com> wrote:
>>
>> It is needed in case display does not support FB.
>>
>> The missing part is drawing splash screen over all connected displays. I think
>> there should be loop somewhere for this, but I am not sure which level is the
>> best to put it.
>>
>> https://github.com/r1mikey/psplash-drm/blob/drm/implement-drm/psplash-draw.c has
>> psplash_draw_initial(_one), psplash_draw_msg(_one) and
>> psplash_draw_progress(_one) implementing loop over scanouts. I am think about
>> doing the same.
>>
>> Vasyl Vavrychuk (14):
>>    Trim trailing spaces
>>    Fix 'unused-result' warnings
>>    Remove unused save_termios
>>    Remove 'psplash-fb.h' from 'psplash.h'
>>    Extract plot pixel from psplash-fb
>>    Extract draw rect/image from psplash-fb
>>    Extract draw font from psplash-fb
>>    psplash.c: Make psplash_draw_{msg,progress} independent of FB
>>    Rework flip as function pointer
>>    Import drm-howto modeset.c as psplash-drm.c
>>    Implement drm backend
>>    Reverse modeset_list
>>    psplash-drm.c: Allocate resources only for the first connector
>>    psplash-drm.c: Implement double buffering
>>
>>   Makefile.am       |  15 +-
>>   configure.ac      |   9 +
>>   psplash-console.c |  34 +-
>>   psplash-console.h |   8 +-
>>   psplash-draw.c    | 295 +++++++++++++++++
>>   psplash-draw.h    |  81 +++++
>>   psplash-drm.c     | 787 ++++++++++++++++++++++++++++++++++++++++++++++
>>   psplash-drm.h     |  17 +
>>   psplash-fb.c      | 371 +++-------------------
>>   psplash-fb.h      |  74 +----
>>   psplash-systemd.c |  36 ++-
>>   psplash-write.c   |  37 ++-
>>   psplash.c         | 186 ++++++-----
>>   psplash.h         |   7 +-
>>   14 files changed, 1446 insertions(+), 511 deletions(-)
>>   create mode 100644 psplash-draw.c
>>   create mode 100644 psplash-draw.h
>>   create mode 100644 psplash-drm.c
>>   create mode 100644 psplash-drm.h
>>
>> --
>> 2.30.2
Alexander Kanavin April 28, 2022, 2:57 p.m. UTC | #3
On Thu, 28 Apr 2022 at 15:54, Vasyl Vavrychuk
<vasyl.vavrychuk@opensynergy.com> wrote:
> I did not tried personally but it should work under QEMU too.
>
> > Is it possible to automate with qemu targets?
>
> Depends if QEMU/yocto test automation support screenshots.
> Unfortunately, I don't have expirience with it.

We do need to find some way to test this code in our CI system: I
would recommend the following:

- make it possible to switch psplash recipe between drm and fb backends
- use drm by default
- find a way to check at runtime that the code didn't crash or error
out: perhaps checking logs for some kind of success message would be
good
- investigate qemu and particularly qmp protocol for ability to take screenshots

I can help with all of these if you have specific problems.

Alex