@@ -32,6 +32,7 @@ struct drm_panel;
struct drm_panel_funcs {
int (*disable)(struct drm_panel *panel);
+ int (*pre_enable)(struct drm_panel *panel);
int (*enable)(struct drm_panel *panel);
int (*get_modes)(struct drm_panel *panel);
};
@@ -54,6 +55,14 @@ static inline int drm_panel_disable(struct drm_panel *panel)
return panel ? -ENOSYS : -EINVAL;
}
+static inline int drm_panel_pre_enable(struct drm_panel *panel)
+{
+ if (panel && panel->funcs && panel->funcs->pre_enable)
+ return panel->funcs->pre_enable(panel);
+
+ return panel ? -ENOSYS : -EINVAL;
+}
+
static inline int drm_panel_enable(struct drm_panel *panel)
{
if (panel && panel->funcs && panel->funcs->enable)
Most of the panels need an init sequence as mentioned below: -- poweron LCD unit/LCD_EN -- start video data -- poweron LED unit/BL_EN With existing callbacks for drm panel, we cannot accomodate such panels, since only one callback, i.e "panel_enable" is supported. This patch adds a "pre_enable" callback which can be called before the actual video data is on, and then call the "enable" callback after the video data is available. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> --- include/drm/drm_panel.h | 9 +++++++++ 1 file changed, 9 insertions(+)