Hi Am 09.08.22 um 18:23 schrieb Andy Shevchenko:
On Tue, Aug 9, 2022 at 6:14 PM Aliliche Larbi <alilichela...@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
OpenPGP_signature
Description: OpenPGP digital signature