video: tegra: dc: preserve gamma/csc over suspend
David Schalig [Fri, 14 Oct 2011 03:50:47 +0000 (12:50 +0900)]
Preserve YUV-to-RGB and gamma correction tables over suspend-resume

Bug 868060

Change-Id: I5ea2224f7ab0dfbe24d741b89d727034be3ebf68
Reviewed-on: http://git-master/r/58016
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R84115584b766900004b5c6cdc3cc8d693fb0db5a

drivers/video/tegra/dc/dc.c

index f01c853..9a9ddd5 100644 (file)
@@ -2256,9 +2256,7 @@ static void tegra_dc_init(struct tegra_dc *dc)
                struct tegra_dc_win *win = &dc->windows[i];
                tegra_dc_writel(dc, WINDOW_A_SELECT << i,
                                DC_CMD_DISPLAY_WINDOW_HEADER);
-               tegra_dc_init_csc_defaults(&win->csc);
                tegra_dc_set_csc(dc, &win->csc);
-               tegra_dc_init_lut_defaults(&win->lut);
                tegra_dc_set_lut(dc, win);
                tegra_dc_set_scaling_filter(dc);
        }
@@ -2649,8 +2647,11 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
 
        dc->n_windows = DC_N_WINDOWS;
        for (i = 0; i < dc->n_windows; i++) {
-               dc->windows[i].idx = i;
-               dc->windows[i].dc = dc;
+               struct tegra_dc_win *win = &dc->windows[i];
+               win->idx = i;
+               win->dc = dc;
+               tegra_dc_init_csc_defaults(&win->csc);
+               tegra_dc_init_lut_defaults(&win->lut);
        }
 
        ret = tegra_dc_set(dc, ndev->id);