linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Jonathan Corbet <corbet@lwn.net>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Bernie Thompson <bernie@plugable.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH] fbdev: Remove udlfb driver
Date: Wed, 2 Dec 2020 18:52:04 +0100	[thread overview]
Message-ID: <CAKMK7uF+uu3taQL-FPXymvnVhKyWWtNy9Z2xes=+j-B+BHaTgA@mail.gmail.com> (raw)
In-Reply-To: <9e7cad29-a9c0-2e02-04a9-3149d7e15838@suse.de>

On Wed, Dec 2, 2020 at 8:55 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Hi
>
> Am 01.12.20 um 12:20 schrieb Mikulas Patocka:
> >
> >
> > On Tue, 1 Dec 2020, Thomas Zimmermann wrote:
> >
> >> Hi
> >>
> >> Am 30.11.20 um 19:39 schrieb Mikulas Patocka:
> >>>
> >>>
> >>> On Mon, 30 Nov 2020, Daniel Vetter wrote:
> >>>
> >>>> On Mon, Nov 30, 2020 at 09:31:15AM -0500, Mikulas Patocka wrote:
> >>>>>
> >>>>> The framebuffer driver supports programs running full-screen directly on
> >>>>> the framebuffer console, such as web browser "links -g", image viewer
> >>>>> "fbi", postscript+pdf viewer "fbgs", ZX Spectrum emulator "fuse-sdl",
> >>>>> movie player "mplayer -vo fbdev". The DRM driver doesn't run them.
> >>>>
> >>>> Hm this should in general work on drm drivers. Without that it's clear the
> >>>> switch-over isn't really ready yet.
> >>>
> >>> I fixed it with this patch two years ago:
> >>> https://lists.freedesktop.org/archives/dri-devel/2018-June/179023.html
> >>>
> >>> But the patch never went through and the fb_defio feature was removed in
> >>> the kernel 5.6 (commit d0c4fc5a4814e431c15272935c8dc973c18073aa).
> >>>
> >>>
> >>> Without fb_defio, the only other possibility how to update the screen is
> >>> the ioctl DRM_IOCTL_MODE_DIRTYFB. But this ioctl requires master mode, so
> >>> user programs like "links -g" can't issue it.
> >>
> >> That's confusing. DIRTYFB is only for DRM.
> >
> > Yes, you're right.
> >
> >> And why can links not run as DRM master mode? If it renders to the terminal,
> >> it should act like a composer. In that case it almost certainly wants master
> >> status.
> >>
> >> Best regards
> >> Thomas
> >
> > How can a userspace program acquire master mode without being suid?
>
> For my understanding, there's no easy solution to that. :/

If you're absolutely the only thing running, the first one to open the
card* node wins. But usually you have something like logind managing
this for you (for vt switching), since ad-hoc this is a very fragile
scheme.

I'm not exactly sure how logind gives you an already opened drm device
in master mode, that's a bit tricky. Without either being suid root or
participating in the logind scheme you won't be able to vt switch
though.

But bare metal kms usage should work I as-is.
-Daniel

>
> I guess we (DRM devs) have to treat fbdev as the solution for use cases
> such as ours.
>
> For the unplug issue, I'll try to reproduce and fix it.
>
> For the performance problems, we might be able to squeeze a few more
> cycles out of it.
>
> Best regards
> Thomas
>
> >
> > Is there some "Hello World!" program that shows how to use DRM? I'm not an
> > expert in DRM, but if there were some tutorial+documentation, I could
> > consider porting "links" to it.
> >
> > Mikulas
> >
>
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  parent reply	other threads:[~2020-12-02 17:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 12:52 [PATCH] fbdev: Remove udlfb driver Thomas Zimmermann
2020-11-30 14:31 ` Mikulas Patocka
2020-11-30 15:41   ` Daniel Vetter
2020-11-30 18:39     ` Mikulas Patocka
2020-11-30 21:06       ` Daniel Vetter
2020-12-01 11:26         ` Mikulas Patocka
2020-12-01  8:07       ` Thomas Zimmermann
2020-12-01 11:20         ` Mikulas Patocka
2020-12-02  7:55           ` Thomas Zimmermann
2020-12-02  8:01             ` Thomas Zimmermann
2020-12-02  8:29             ` Pekka Paalanen
2020-12-02 17:52             ` Daniel Vetter [this message]
2020-12-01  8:02   ` Thomas Zimmermann
2020-12-01 10:44     ` Mikulas Patocka
2020-12-01 20:09       ` Mikulas Patocka

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='CAKMK7uF+uu3taQL-FPXymvnVhKyWWtNy9Z2xes=+j-B+BHaTgA@mail.gmail.com' \
    --to=daniel.vetter@ffwll.ch \
    --cc=bernie@plugable.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).