All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: tiny drm driver for NOKIA-5110 LCD
       [not found] <CAPEqGQr5iPZizmcR8GndjO4VpJNxW461uoxTZvGwDVvEoepFMQ@mail.gmail.com>
@ 2022-08-09 16:23 ` Andy Shevchenko
  2022-08-10  7:02   ` Thomas Zimmermann
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2022-08-09 16:23 UTC (permalink / raw)
  To: Aliliche Larbi, dri-devel

On Tue, Aug 9, 2022 at 6:14 PM Aliliche Larbi <alilichelarbi@gmail.com> wrote:
>
> Good morning sir,
>
> I am developing a linux driver for the nokia 5110 lcd(monochrome),
> I would like to know if I can use the drm API or tiny drm for this lcd.
> I'm writing to you because I saw your commit in /staging/fbtft/TODO
> where you talk about converting all fbtft drivers to drm_simple_display_pipe.
>
> Is this possible for simple monochrome lcds like the 5110 one?

You may convert _existing_ driver [1] to real DRM, like it's done for
SSD130x [2].

[1]: https://elixir.bootlin.com/linux/latest/source/drivers/staging/fbtft/fb_pcd8544.c
[2]: https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/solomon

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: tiny drm driver for NOKIA-5110 LCD
  2022-08-09 16:23 ` tiny drm driver for NOKIA-5110 LCD Andy Shevchenko
@ 2022-08-10  7:02   ` Thomas Zimmermann
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2022-08-10  7:02 UTC (permalink / raw)
  To: Andy Shevchenko, Aliliche Larbi, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 2549 bytes --]

Hi

Am 09.08.22 um 18:23 schrieb Andy Shevchenko:
> On Tue, Aug 9, 2022 at 6:14 PM Aliliche Larbi <alilichelarbi@gmail.com> wrote:
>>
>> Good morning sir,
>>
>> I am developing a linux driver for the nokia 5110 lcd(monochrome),
>> I would like to know if I can use the drm API or tiny drm for this lcd.
>> I'm writing to you because I saw your commit in /staging/fbtft/TODO
>> where you talk about converting all fbtft drivers to drm_simple_display_pipe.
>>
>> Is this possible for simple monochrome lcds like the 5110 one?

For such simple hardware, the tiny-DRM helpers are equivalent to the 
full helpers. So either is possible. Tiny helpers are build on top of 
the regular helpers and in the end the difference is small.

And to add a personal opinion, I've used both and come to dislike the 
tiny-helpers. They seem easier to use, but that impression mostly comes 
from conflating CRTCs and planes. Mixing both makes is harder to share 
code with other drivers. I then had to build extra wrappers around 
existing helpers only to use them with tiny-DRM (see 
DRM_GEM_SHADOW_PLANE_FUNCS, [1] DRM_GEM_SHADOW_PLANE_HELPER_FUNCS [2] 
and DRM_GEM_SIMPLE_DISPLAY_PIPE_SHADOW_PLANE_FUNCS [3] for an example.)

Tiny-DRM helpers are also not that much more tiny. Patches to convert 
from tiny DRM to regular helpers only enlarge drivers by a few dozen 
lines. [4][5]

For the drivers that I'm responsible, I began to replace them with the 
full helpers. Using tiny DRM won't block your driver from being merged, 
but in my (entirely subjective) opinion, we should rather make a push 
towards removing tiny-DRM entirely.

Best regards
Thomas

[1] 
https://elixir.bootlin.com/linux/v5.19/source/include/drm/drm_gem_atomic_helper.h#L101
[2] 
https://elixir.bootlin.com/linux/v5.19/source/include/drm/drm_gem_atomic_helper.h#L117
[3] 
https://elixir.bootlin.com/linux/v5.19/source/include/drm/drm_gem_atomic_helper.h#L139
[4] https://patchwork.freedesktop.org/patch/495839/?series=106100&rev=3
[5] https://patchwork.freedesktop.org/series/106880/


> 
> You may convert _existing_ driver [1] to real DRM, like it's done for
> SSD130x [2].
> 
> [1]: https://elixir.bootlin.com/linux/latest/source/drivers/staging/fbtft/fb_pcd8544.c
> [2]: https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/solomon
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-10  7:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAPEqGQr5iPZizmcR8GndjO4VpJNxW461uoxTZvGwDVvEoepFMQ@mail.gmail.com>
2022-08-09 16:23 ` tiny drm driver for NOKIA-5110 LCD Andy Shevchenko
2022-08-10  7:02   ` Thomas Zimmermann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.