mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Bernie Thompson <bernie@plugable.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Alex Deucher <alexdeucher@gmail.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	linux-fbdev <linux-fbdev@vger.kernel.org>,
	Teddy Wang <teddy.wang@siliconmotion.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Arnaud Patard <apatard@mandriva.com>,
	Dave Airlie <airlied@redhat.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: Re: No more new fbdev drivers, please
Date: Tue, 29 Sep 2015 09:05:08 +0200	[thread overview]
Message-ID: <20150929070508.GZ3383@phenom.ffwll.local> (raw)
In-Reply-To: <CAF1V4O_9LC9QM_AcE7gaV4hp4jcEe47nzKj=CXxvsnH_L=YRYw@mail.gmail.com>

On Mon, Sep 28, 2015 at 01:52:31PM -0700, Bernie Thompson wrote:
> On Sat, Sep 26, 2015 at 11:01 AM, Geert Uytterhoeven <geert@linux-m68k.org>
>  wrote:
> > The smallest of these (udl) still counts in at ca. 2800 LoC,
> 
> Note udlfb.c, the original fbdev driver that I helped write and that the
> udl DRM driver was based on, is ~1800 LoC ... so we're actually talking in
> the ballpark of 2x (rather than 10x) between fbdev and DRM in this case.
> That said, the complexity difference is probably higher than the LoC
> difference. I know I personally have struggled in the shift from
> understanding fbdev to understanding DRM.

udl has a bit of room for improvement, we really should push the worker
logicy for fbdev emulation into the core drm fbdev helpers using the
->dirtyfb callback. That should rip out quite a few lines.

The other thing to consider is that drm/udl supports PRIME buffer sharing
for seamlessly extending your desktop by just plugging in an usb dongle.

> The fact that there's drivers of both types and USB hardware might make udl
> may be a good driver to use as a base for any additional simplification /
> helper work. David Airlie and David Herrmann both have this hardware. David
> Airlie did the port from fbdev to DRM, so he's made it an exemplary
> driver.  And if anyone needs any hardware which works with udlfb and udl,
> we're happy to send free hardware to any programmers who are willing to
> contribute in the form of code or testing:
> http://plugable.com/projects/plugable-open-source-hardware-samples-program

For example drivers I think it's better to look at the latest drm driver
merged - those are up-to-date wrt best practices. udl has already
accumulated a bit of cruft (e.g. still using legacy modeset helpers and
not the atomic ones).

> More simplification and documentation would be great. In particular, the
> optimization for the connector+encoder+crtc combination others have
> mentioned seems like it would be worthwhile.

Atomic helpers already make almost everything optional except for the
crtc-level enable/disable callbacks and the per-plane atomic_plane_update
(for buffer flips/panning/rotation/...). So a comibined helper would be
mostly for cutting down the structure setup/teardown boilerplate. So
should be fairly easy to implement even for drm beginners (when using one
of the latest drivers as a template for what needs to be done).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  parent reply	other threads:[~2015-09-29  7:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 12:27 Tomi Valkeinen
2015-09-24 12:46 ` Thomas Petazzoni
2015-09-24 15:21   ` Austin S Hemmelgarn
2015-09-24 15:38     ` Alex Deucher
2015-09-24 15:59     ` Daniel Vetter
2015-09-24 16:17       ` Austin S Hemmelgarn
2015-09-24 17:12       ` Ondrej Zary
2015-09-24 18:05         ` Daniel Vetter
2015-09-24 15:23   ` Daniel Vetter
2015-09-26  8:28     ` Geert Uytterhoeven
2015-09-26 17:07       ` Alex Deucher
2015-09-26 18:01         ` Geert Uytterhoeven
2015-09-26 18:13           ` David Herrmann
2015-09-26 18:46             ` Geert Uytterhoeven
2015-09-26 20:49               ` Rob Clark
2015-09-26 21:55                 ` Dave Airlie
2015-09-30 11:59               ` Emil Velikov
2015-09-28  7:39             ` Gerd Hoffmann
2015-09-28 12:36               ` Daniel Vetter
2015-09-29  8:23                 ` Gerd Hoffmann
2015-09-29  8:33                   ` Laurent Pinchart
2015-09-28 20:56           ` Bernie Thompson
     [not found]           ` <CAF1V4O_9LC9QM_AcE7gaV4hp4jcEe47nzKj=CXxvsnH_L=YRYw@mail.gmail.com>
2015-09-29  7:05             ` Daniel Vetter [this message]
2015-09-25  8:49 ` Aaro Koskinen
2015-09-25 11:00   ` Ondrej Zary
2015-09-26  7:15 ` Sudip Mukherjee
2015-09-26  7:29   ` Ilia Mirkin
2015-09-27 13:09 ` Noralf Trønnes
2015-09-27 16:08   ` Emil Velikov
2015-09-28 22:51     ` Noralf Trønnes
2015-09-29  7:07       ` Daniel Vetter
2015-09-25 10:41 Kamil Lulko
2015-09-25 13:09 ` Tomi Valkeinen
2015-09-25 18:44   ` Daniel Vetter
2015-09-26  9:03 ` Geert Uytterhoeven

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=20150929070508.GZ3383@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=alexdeucher@gmail.com \
    --cc=apatard@mandriva.com \
    --cc=bernie@plugable.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tomi.valkeinen@ti.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

Powered by JetHome