On Wed, Jul 30, 2014 at 3:30 PM, Thierry Reding thierry.reding@gmail.com wrote:
On Sat, Jul 26, 2014 at 12:52:03AM +0530, Ajay Kumar wrote:
Most of the panels need an init sequence as mentioned below: -- poweron LCD unit/LCD_EN -- start video data -- poweron LED unit/BACKLIGHT_EN And, a de-init sequence as mentioned below: -- poweroff LED unit/BACKLIGHT_EN -- stop video data -- poweroff LCD unit/LCD_EN With existing callbacks for drm panel, we cannot accomodate such panels, since only two callbacks, i.e "panel_enable" and panel_disable are supported.
This patch adds: -- "prepare" callback which can be called before the actual video data is on, and then call the "enable" callback after the video data is available.
-- "unprepare" callback which can be called after the video data is off, and use "disable" callback to do something before switching off the video data.
Now, we can easily map the above scenario as shown below: poweron LCD unit/LCD_EN = "prepare" callback poweron LED unit/BACKLIGHT_EN = "enable" callback poweroff LED unit/BACKLIGHT_EN = "disable" callback poweroff LCD unit/LCD_EN = "unprepare" callback
Also, a helper function for get_modes is added.
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com
include/drm/drm_panel.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
I had already decided to apply an earlier version that you posted (I think the only difference was that it didn't have the inline implementation for drm_panel_get_modes() yet), reworded the commit message a little (to be less specific about LED, LCD and backlight units) and added some kerneldoc for struct drm_panel_funcs.
What I propose is to merge that patch (I'll hopefully push it today so that it shows up in tomorrow's linux-next) and then apply a separate patch to add drm_panel_get_modes().
Do you have any objections to that?
I am okay with that. drm_panel_get_modes() will come as a separate patch.
Ajay