diff options
author | Inki Dae <inki.dae@samsung.com> | 2012-05-29 18:07:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:29 -0400 |
commit | d54ad83f3d56228a42e1021b97fc52bfbad7d560 (patch) | |
tree | bf4a27b9df5b86e03938a6c11d1e993e010e431e /include/linux/lcd.h | |
parent | bf05929f41d6c3c79ec1961d90d808a634f09dd9 (diff) |
lcd: add callbacks for early fb event blank support
This patchset adds early fb blank feature that a callback of lcd panel
driver is called prior to specific fb driver's one. In the case of
MIPI-DSI based video mode LCD Panel, for lcd power off, the power off
commands should be transferred to lcd panel with display and mipi-dsi
controller enabled because the commands is set to lcd panel at vsync porch
period. and in opposite case, the callback of fb driver should be called
prior to lcd panel driver's one because of same issue. Also if fb_blank
mode is changed to FB_BLANK_POWERDOWN then display controller would be
off(clock disable) but lcd panel would be still on. at this time, you
could see some issue like sparkling on lcd panel because video clock to be
delivered to ldi module of lcd panel was disabled. this issue could
occurs for all lcd panels.
The callback order is as the following:
at fb_blank function of fbmem.c
-> fb_notifier_call_chain(FB_EARLY_EVENT_BLANK)
-> lcd panel driver's early_set_power()
-> info->fbops->fb_blank()
-> spcefic fb driver's fb_blank()
-> fb_notifier_call_chain(FB_EVENT_BLANK)
-> lcd panel driver's set_power()
-> fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK) if
info->fops->fb_blank() was failed.
fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK) would be called to revert
the effects of previous FB_EARLY_EVENT_BLANK call. and note that if
early_set_power() of lcd_ops is NULL then early fb blank callback would be
ignored.
This patch:
Add early_set_power and r_early_set_power callbacks. early_set_power
callback is called prior to fb_blank() of fbmem.c and r_early_set_power
callback is called if fb_blank() was failed to revert the effects of the
early_set_power call of lcd panel driver.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/lcd.h')
-rw-r--r-- | include/linux/lcd.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 8877123f2d6e..e00c3b0ebc6b 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -40,6 +40,16 @@ struct lcd_ops { | |||
40 | /* Get the LCD panel power status (0: full on, 1..3: controller | 40 | /* Get the LCD panel power status (0: full on, 1..3: controller |
41 | power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ | 41 | power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ |
42 | int (*get_power)(struct lcd_device *); | 42 | int (*get_power)(struct lcd_device *); |
43 | /* | ||
44 | * Enable or disable power to the LCD(0: on; 4: off, see FB_BLANK_XXX) | ||
45 | * and this callback would be called proir to fb driver's callback. | ||
46 | * | ||
47 | * P.S. note that if early_set_power is not NULL then early fb notifier | ||
48 | * would be registered. | ||
49 | */ | ||
50 | int (*early_set_power)(struct lcd_device *, int power); | ||
51 | /* revert the effects of the early blank event. */ | ||
52 | int (*r_early_set_power)(struct lcd_device *, int power); | ||
43 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ | 53 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ |
44 | int (*set_power)(struct lcd_device *, int power); | 54 | int (*set_power)(struct lcd_device *, int power); |
45 | /* Get the current contrast setting (0-max_contrast) */ | 55 | /* Get the current contrast setting (0-max_contrast) */ |