]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: dc: add modeset notifier
authorDaniel Solomon <daniels@nvidia.com>
Thu, 17 Oct 2013 00:24:46 +0000 (17:24 -0700)
committerJon Mayo <jmayo@nvidia.com>
Thu, 17 Oct 2013 22:27:42 +0000 (15:27 -0700)
Add out_ops operation to notify the interface layer
of when a modeset has occurred.

Change-Id: Id39b6a1e80a8bd6fbce09b159213423c9a864038
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/300068
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
drivers/video/tegra/dc/dc_priv_defs.h
drivers/video/tegra/dc/mode.c

index e589f10bd35d9a9ad7a38876799bbd02b646bfcc..50a0ad7fc98bde59623a888401a1a551b8b5035c 100644 (file)
@@ -107,6 +107,9 @@ struct tegra_dc_out_ops {
         * during OSidle.
         */
        bool (*osidle)(struct tegra_dc *dc);
+       /* callback after new mode is programmed.
+        * dc clocks are on at this point */
+       void (*modeset_notifier)(struct tegra_dc *dc);
 };
 
 struct tegra_dc_shift_clk_div {
index 4c2fd731001d7cbc961d70549b1938f9a827add9..d26f24193e112a81ba0baf9e59b1c1aadba8f9cd 100644 (file)
@@ -344,6 +344,9 @@ int tegra_dc_program_mode(struct tegra_dc *dc, struct tegra_dc_mode *mode)
        tegra_dc_writel(dc, GENERAL_UPDATE, DC_CMD_STATE_CONTROL);
        tegra_dc_writel(dc, GENERAL_ACT_REQ, DC_CMD_STATE_CONTROL);
 
+       if (dc->out_ops && dc->out_ops->modeset_notifier)
+               dc->out_ops->modeset_notifier(dc);
+
        dc->mode_dirty = false;
 
        trace_display_mode(dc, &dc->mode);