dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Pekka Paalanen <ppaalanen@gmail.com>, Dennis Filder <d.filder@web.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: Handling DRM master transitions cooperatively
Date: Tue, 7 Sep 2021 14:42:56 +0200	[thread overview]
Message-ID: <ccdba09b-011d-093e-17d0-578ca8a3ec44@redhat.com> (raw)
In-Reply-To: <20210907130746.7b667dac@eldfell>

Hi,

On 9/7/21 12:07 PM, Pekka Paalanen wrote:
> On Fri, 3 Sep 2021 21:08:21 +0200
> Dennis Filder <d.filder@web.de> wrote:
> 
>> Hans de Goede asked me to take a topic from a private discussion here.
>> I must also preface that I'm not a graphics person and my knowledge of
>> DRI/DRM is cursory at best.
>>
>> I initiated the conversation with de Goede after learning that the X
>> server now supports being started with an open DRM file descriptor
>> (this was added for Keith Packard's xlease project).  I wondered if
>> that could be used to smoothen the Plymouth->X transition somehow and
>> asked de Goede if there were any such plans.  He denied, but mentioned
>> that a new ioctl is in the works to prevent the kernel from wiping the
>> contents of a frame buffer after a device is closed, and that this
>> would help to keep transitions smooth.
> 
> Hi,
> 
> I believe the kernel is not wiping anything on device close. If
> something in the KMS state is wiped, it originates in userspace:
> 
> - Plymouth doing something (e.g. RmFB on an in-use FB will turn the
>   output off, you need to be careful to "leak" your FB if you want a
>   smooth hand-over)

The "kernel is not wiping anything on device close" is not true,
when closing /dev/dri/card# any remaining FBs from the app closing
it will be dealt with as if they were RmFB-ed, causing the screen
to show what I call "the fallback fb", at least with the i915 driver.

> - Xorg doing something (e.g. resetting instead of inheriting KMS state)
> 
> - Something missed in the hand-off sequence which allows fbcon to
>   momentarily take over between Plymouth and Xorg. This would need to
>   be fixed between Plymouth and Xorg.
> 
> - Maybe systemd-logind does something odd to the KMS device? It has
>   pretty wild code there. Or maybe it causes fbcon to take over.
> 
> What is the new ioctl you referred to?

It is an ioctl to mark a FB to not have it auto-removed on device-close,
instead leaving it in place until some some kernel/userspace client
actively installs another FB. This was proposed by Rob Clark quite
a while ago, but it never got anywhere because of lack of userspace
actually interested in using it.

I've been thinking about reviving Rob's patch, since at least for
plymouth this would be pretty useful to have.

Regards,

Hans


  parent reply	other threads:[~2021-09-07 12:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 19:08 Handling DRM master transitions cooperatively Dennis Filder
2021-09-07 10:07 ` Pekka Paalanen
2021-09-07 10:19   ` Simon Ser
2021-09-07 12:52     ` Pekka Paalanen
2021-09-07 15:52       ` Sebastian Wick
2021-09-08 16:21         ` Dennis Filder
2021-09-09  8:20           ` Pekka Paalanen
2021-09-08  9:51       ` Simon Ser
2021-09-08 11:13         ` Pekka Paalanen
2021-09-08 16:14         ` Dennis Filder
2021-09-07 12:42   ` Hans de Goede [this message]
2021-09-08  7:36     ` Pekka Paalanen
2021-09-08  7:49       ` Hans de Goede
2021-09-08 16:27       ` Daniel Vetter
2021-09-09  7:37         ` Pekka Paalanen
2021-09-14 13:45           ` Daniel Vetter
2021-09-22  8:56             ` Pekka Paalanen
2021-09-22  9:21               ` Hans de Goede
2021-09-23  8:23                 ` Pekka Paalanen
2021-09-23  8:52                   ` Hans de Goede
2021-09-30  9:26                   ` Daniel Vetter
2021-10-01 16:33                 ` Simon Ser
2021-10-02 17:27                   ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccdba09b-011d-093e-17d0-578ca8a3ec44@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=d.filder@web.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ppaalanen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox