drm/tegra: Fix color expansion
authorThierry Reding <thierry.reding@avionic-design.de>
Thu, 21 Feb 2013 07:11:57 +0000 (08:11 +0100)
committerThierry Reding <thierry.reding@avionic-design.de>
Fri, 22 Feb 2013 07:21:35 +0000 (08:21 +0100)
bpp stores the number of bytes per pixel, but color expansion needs to
be enabled for less than 24 bits per pixel.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/gpu/drm/tegra/dc.c

index 20864002cf392cc7c0340ecf4a85246af6dae2f9..bf8095c55bd1320aa4c178935eb2ac716c0053fb 100644 (file)
@@ -500,7 +500,7 @@ int tegra_dc_setup_window(struct tegra_dc *dc, unsigned int index,
                tegra_dc_writel(dc, 0x0000, DC_WIN_CSC_KVB);
 
                value |= CSC_ENABLE;
-       } else if (bpp < 24) {
+       } else if (window->bits_per_pixel < 24) {
                value |= COLOR_EXPAND;
        }