aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/smscufx.c
diff options
context:
space:
mode:
authorHeiko Stübner <heiko@sntech.de>2012-04-28 06:19:10 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-04-29 15:35:31 -0400
commit1f45f9dbb392f9ca0919e9cd2370ab66ae752ec8 (patch)
treed914007ce3dd2c4ba94cad2af801b6ebd18552a5 /drivers/video/smscufx.c
parent13f36e9ea0f1419039763e7ba947fccd7f4b5a41 (diff)
fb_defio: add first_io callback
With this optional callback the driver is notified when the first page is entered into the pagelist and a new deferred_io call is scheduled. A possible use-case for this is runtime-pm. In the first_io call pm_runtime_get() could be called, which starts an asynchronous runtime_resume of the device. In the deferred_io callback a call to pm_runtime_barrier() makes the sure, the device is resumed by then and a pm_runtime_put() may put the device back to sleep. Also, some SoCs may use the runtime-pm system to determine if they are able to enter deeper idle states. Therefore it is necessary to keep the use-count from the first written page until the conclusion of the screen update, to prevent the system from going to sleep before completing the pending update. Two users of defio were using kmalloc to allocate the structure. These allocations are changed to kzalloc, to prevent uninitialised .first_io members in those drivers. Signed-off-by: Heiko Stübner <heiko@sntech.de> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/smscufx.c')
-rw-r--r--drivers/video/smscufx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/smscufx.c b/drivers/video/smscufx.c
index ccbfef5e828f..99857857f6fa 100644
--- a/drivers/video/smscufx.c
+++ b/drivers/video/smscufx.c
@@ -1083,7 +1083,7 @@ static int ufx_ops_open(struct fb_info *info, int user)
1083 1083
1084 struct fb_deferred_io *fbdefio; 1084 struct fb_deferred_io *fbdefio;
1085 1085
1086 fbdefio = kmalloc(sizeof(struct fb_deferred_io), GFP_KERNEL); 1086 fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
1087 1087
1088 if (fbdefio) { 1088 if (fbdefio) {
1089 fbdefio->delay = UFX_DEFIO_WRITE_DELAY; 1089 fbdefio->delay = UFX_DEFIO_WRITE_DELAY;