All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Kumar <ajaykumar.rs@samsung.com>
To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org
Cc: inki.dae@samsung.com, a.hajda@samsung.com, treding@nvidia.com,
	kyungmin.park@samsung.com, seanpaul@google.com,
	abrestic@chromium.org, rahul.sharma@samsung.com,
	ajaynumb@gmail.com, joshi@samsung.com, prashanth.g@samsung.com,
	Ajay Kumar <ajaykumar.rs@samsung.com>
Subject: [PATCH 2/7] drm/panel: add pre_enable routine to drm panel
Date: Wed, 16 Apr 2014 20:03:01 +0530	[thread overview]
Message-ID: <1397658786-26138-3-git-send-email-ajaykumar.rs@samsung.com> (raw)
In-Reply-To: <1397658786-26138-1-git-send-email-ajaykumar.rs@samsung.com>

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(+)

diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index c2ab77a..89210bf 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -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)
-- 
1.8.1.2

  parent reply	other threads:[~2014-04-16 14:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 14:32 [PATCH 0/7] drm: exynos: few patches to enhance bridge chip support Ajay Kumar
2014-04-16 14:33 ` [PATCH 1/7] drm/exynos: dp: support hotplug detection via GPIO Ajay Kumar
2014-04-18  8:23   ` Jingoo Han
2014-04-18 19:33     ` Ajay kumar
2014-04-16 14:33 ` Ajay Kumar [this message]
2014-04-16 14:33 ` [PATCH 3/7] drm/panel: Add driver for exynos_dp based panels Ajay Kumar
2014-04-18  8:47   ` Jingoo Han
2014-04-18 19:42     ` Ajay kumar
2014-04-21  0:34       ` Jingoo Han
2014-04-16 14:33 ` [PATCH 4/7] drm/exynos: add exynos_dp_panel driver registration to drm driver Ajay Kumar
2014-04-18  8:57   ` Jingoo Han
2014-04-18 19:50     ` Ajay kumar
2014-04-21  0:29       ` Jingoo Han
2014-04-16 14:33 ` [PATCH 5/7] drm/exynos: dp: modify driver to support drm_panel Ajay Kumar
2014-04-18  9:08   ` Jingoo Han
2014-04-18 19:52     ` Ajay kumar
2014-04-16 14:33 ` [PATCH 6/7] drm/bridge: ptn3460: enable polling based detection Ajay Kumar
2014-04-16 14:33 ` [PATCH 7/7] drm/bridge: ptn3460: add drm_panel controls Ajay Kumar
2014-04-18  9:25   ` Jingoo Han
2014-04-18 19:55     ` Ajay kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397658786-26138-3-git-send-email-ajaykumar.rs@samsung.com \
    --to=ajaykumar.rs@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=abrestic@chromium.org \
    --cc=ajaynumb@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=joshi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=prashanth.g@samsung.com \
    --cc=rahul.sharma@samsung.com \
    --cc=seanpaul@google.com \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.