diff mbox

[02/15] drm/panel: Add get_modes helper

Message ID 1406828534-10072-3-git-send-email-ajaykumar.rs@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ajay Kumar July 31, 2014, 5:42 p.m. UTC
Add a helper function drm_panel_get_modes to get modes from the panel.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 include/drm/drm_panel.h |    8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox

Patch

diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 9addc69..efc63cc 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -80,6 +80,14 @@  static inline int drm_panel_enable(struct drm_panel *panel)
 	return panel ? -ENOSYS : -EINVAL;
 }
 
+static inline int drm_panel_get_modes(struct drm_panel *panel)
+{
+	if (panel && panel->funcs && panel->funcs->get_modes)
+		return panel->funcs->get_modes(panel);
+
+	return 0;
+}
+
 void drm_panel_init(struct drm_panel *panel);
 
 int drm_panel_add(struct drm_panel *panel);