On Wed, May 25, 2022 at 09:46:24PM +0200, Javier Martinez Canillas wrote:
On 3/10/22 14:11, Dominik Kierner wrote:
...
# DRM Mode Configuration via Device Tree
In the old fbdev driver, the display modes are hard-coded, which means for every new display configuration, a new patch needs to be mainlined, which slows down official Kernel support and puts burden on the maintainers. Additionally, with the DRM-subsystem supporting height and length information, for scaling, this opens up a lot of new combinations. The SSD1306 for example, is available in multiple resolutions like 128x64 and 96x16 and comes in different sizes per resolution as well. Just to name a few:
- 128x64 0.96" (22x11mm)
- 128x64 1.3" (30x15mm)
- 96x16 0.69" (18x3mm)
Instead of hard-coding, I would suggest something along the lines of
of_get_drm_display_mode(). The displays won't need to support multiple modes at the same time, let alone support for switching between them, so the one-time invocation of this expensive function might be worth it. maybe a new and simpler function that could be named: of_get_drm_display_mode_simple()
This makes sense to me as well.
What about non-OF platforms? Please, do not spread OF-only interfaces, and use fwnode instead.
Providing a mode could later prove useful for a conversion to drm_panel, if that is feasible.
But for a function like this, I have to chicken out.