video: tegra: dc: Support for pre power-off actions
Ken Chang [Tue, 15 May 2012 03:20:52 +0000 (11:20 +0800)]
Part of panel settings need to be done before/after pixel clock
is disabled. Add support for these actions to meet panel
spec.

bug 976081

Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: http://git-master/r/102542
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>
(cherry picked from commit dcecdc64d4d0fd4d9f69df52c9d200dfbf1dd7fc)

Change-Id: Ibfede68d67a4815156f73c2d1cdca90f3f771755
Reviewed-on: http://git-master/r/110296
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: Rf7e4c33a9f956e74a6a24bb8dae948db91bf016f

arch/arm/mach-tegra/include/mach/dc.h
drivers/video/tegra/dc/dc.c

index 0e80694..5f4a2a3 100644 (file)
@@ -402,6 +402,7 @@ struct tegra_dc_out {
 
        int     (*enable)(void);
        int     (*postpoweron)(void);
+       int     (*prepoweroff)(void);
        int     (*disable)(void);
 
        int     (*hotplug_init)(void);
index 7c5388e..c52dba7 100644 (file)
@@ -2796,6 +2796,9 @@ static void _tegra_dc_controller_disable(struct tegra_dc *dc)
 {
        unsigned i;
 
+       if (dc->out && dc->out->prepoweroff)
+               dc->out->prepoweroff();
+
        if (dc->out_ops && dc->out_ops->disable)
                dc->out_ops->disable(dc);