[RFC PATCH 0/3] drm/panel: Pull some code out into common helpers
Noralf Trønnes
noralf at tronnes.org
Sat Mar 25 12:05:17 UTC 2017
Den 17.03.2017 15.17, skrev Sean Paul:
> On Thu, Mar 16, 2017 at 6:08 PM, Sean Paul <seanpaul at chromium.org> wrote:
>> This series pulls out the power-sequencing code from panel-simple into a
>> panel-common helper library. This allows drivers that cannot leverage
>> panel-simple to share some code.
>>
>> I've converted the 2 sharp mipi drivers, and Chris Zhong's driver on the
>> list can also be converted. I haven't checked any other drivers, but I
>> suspect we'll see the same code blocks there too.
>>
>> I'm sure there's more we can pull out of the various drivers, but this
>> seems like a good place to start talking about how to share common panel
>> code across drivers.
>>
> Cc: Noralf Trønnes <noralf at tronnes.org>
> Cc: Daniel Vetter <daniel at ffwll.ch>
>
> Adding Noralf to see if this might be useful for tinydrm.
tinydrm _can_ use panel_common, but it can also use drm_panel which we
decided against, so I don't know where the architectural lines go.
Most controllers/panels supported by tinydrm will have these fields:
struct mipi_dbi {
...
bool enabled;
...
struct gpio_desc *reset;
...
struct backlight_device *backlight;
struct regulator *regulator;
};
Noralf.
> Sean
>
>
>> Sean
>>
>> Sean Paul (3):
>> drm/panel: Pull common panel code out into helpers
>> drm/panel: sharp-lq101r1sx01: Use panel-common helpers
>> drm/panel: panel-sharp-ls043t1le01: Use panel-common helpers
>>
>> drivers/gpu/drm/panel/Kconfig | 22 +++-
>> drivers/gpu/drm/panel/Makefile | 1 +
>> drivers/gpu/drm/panel/panel-common.c | 149 ++++++++++++++++++++++++
>> drivers/gpu/drm/panel/panel-common.h | 44 +++++++
>> drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 79 ++++---------
>> drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 70 +++--------
>> drivers/gpu/drm/panel/panel-simple.c | 112 +++---------------
>> 7 files changed, 269 insertions(+), 208 deletions(-)
>> create mode 100644 drivers/gpu/drm/panel/panel-common.c
>> create mode 100644 drivers/gpu/drm/panel/panel-common.h
>>
>> --
>> 2.12.0.367.g23dc2f6d3c-goog
>>
More information about the dri-devel
mailing list