aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/drm/dc.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-04-22 15:31:15 -0400
committerThierry Reding <thierry.reding@gmail.com>2013-05-25 06:32:50 -0400
commited683aead1962f2242c8dc8863517bcd3089703d (patch)
treea6a194a75a9f12d4c2ac6889b7283f39aa118327 /drivers/gpu/host1x/drm/dc.c
parent603f0cc9482e5e5996b84d3ffb5578526974809c (diff)
drm/tegra: Honor pixel-format changes
When using a base mode-set, honor changes in pixel-format since the core doesn't explicitly check for them as long as they use the same depth. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu/host1x/drm/dc.c')
-rw-r--r--drivers/gpu/host1x/drm/dc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c
index 98f60d827558..5360e5a57ecc 100644
--- a/drivers/gpu/host1x/drm/dc.c
+++ b/drivers/gpu/host1x/drm/dc.c
@@ -143,6 +143,7 @@ static int tegra_dc_add_planes(struct drm_device *drm, struct tegra_dc *dc)
143static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y, 143static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y,
144 struct drm_framebuffer *fb) 144 struct drm_framebuffer *fb)
145{ 145{
146 unsigned int format = tegra_dc_format(fb->pixel_format);
146 struct tegra_bo *bo = tegra_fb_get_plane(fb, 0); 147 struct tegra_bo *bo = tegra_fb_get_plane(fb, 0);
147 unsigned long value; 148 unsigned long value;
148 149
@@ -153,6 +154,7 @@ static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y,
153 154
154 tegra_dc_writel(dc, bo->paddr + value, DC_WINBUF_START_ADDR); 155 tegra_dc_writel(dc, bo->paddr + value, DC_WINBUF_START_ADDR);
155 tegra_dc_writel(dc, fb->pitches[0], DC_WIN_LINE_STRIDE); 156 tegra_dc_writel(dc, fb->pitches[0], DC_WIN_LINE_STRIDE);
157 tegra_dc_writel(dc, format, DC_WIN_COLOR_DEPTH);
156 158
157 value = GENERAL_UPDATE | WIN_A_UPDATE; 159 value = GENERAL_UPDATE | WIN_A_UPDATE;
158 tegra_dc_writel(dc, value, DC_CMD_STATE_CONTROL); 160 tegra_dc_writel(dc, value, DC_CMD_STATE_CONTROL);