Re: No more new fbdev drivers, please
flat view
From: Emil Velikov <hidden>
Date: 2015-09-30 11:59:16
Also in:
dri-devel, lkml
Hi all, On 26 September 2015 at 19:46, Geert Uytterhoeven [off-list ref] wrote:
Hi David, On Sat, Sep 26, 2015 at 8:13 PM, David Herrmann [off-list ref] wrote:quoted
On Sat, Sep 26, 2015 at 8:01 PM, Geert Uytterhoeven [off-list ref] wrote:quoted
On Sat, Sep 26, 2015 at 7:07 PM, Alex Deucher [off-list ref] wrote:quoted
On Sat, Sep 26, 2015 at 4:28 AM, Geert Uytterhoeven [off-list ref] wrote:quoted
For the (mailing list) record, can you please provide some explicit pointers to these existing really simple drivers?See the tilcdc, ast, mgag200, and udl drivers for example.Thanks for the list! The smallest of these (udl) still counts in at ca. 2800 LoC, while there are several fbdev drivers that have less than 200 LoC. Granted, these really small ones support a single fixed video mode only, but you can write a simple fbdev driver with mode setting in less than 1000 LoC. I'm sure DRM can do better?Is counting lines really the level of the discussion to go here?LoC is not the most important. But if the smallest DRM driver needs an order of magnitude more LoC than the smallest fbdev driver, I start to wonder. E.g. if I want to write a new simple driver for my new shiny hardware, it can make a big difference if I have to write (and test/debug) 800 LoC, or 3000 LoC.
Ftr, the smallest DRM/KMS driver that I could see is the layerscape (fsl-dcu) one. It is roughly 1.4k LoC which includes ~300 worth of defines, licence headers and build glue. Admittedly not it's not as low as 200-800 LoC, but it's an example that they can get smaller, as helpers in drm core are added. udl has been written quite some time ago and doesn't make use of atomics, etc. the latter of which should make things easier/shorter. Regards, Emil