Patchwork [v4,8/9] drm/tegra: Fix color expansion

login
register
mail settings
Submitter Thierry Reding
Date Feb. 21, 2013, 2:36 p.m.
Message ID <1361457361-13838-9-git-send-email-thierry.reding@avionic-design.de>
Download mbox | patch
Permalink /patch/222303/
State Not Applicable, archived
Headers show

Comments

Thierry Reding - Feb. 21, 2013, 2:36 p.m.
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 2086400..bf8095c 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -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;
 	}