diff options
Diffstat (limited to 'drivers/gpu/host1x/drm/dc.c')
-rw-r--r-- | drivers/gpu/host1x/drm/dc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c index 8c04943f82e3..5360e5a57ecc 100644 --- a/drivers/gpu/host1x/drm/dc.c +++ b/drivers/gpu/host1x/drm/dc.c | |||
@@ -79,6 +79,9 @@ static int tegra_plane_disable(struct drm_plane *plane) | |||
79 | struct tegra_plane *p = to_tegra_plane(plane); | 79 | struct tegra_plane *p = to_tegra_plane(plane); |
80 | unsigned long value; | 80 | unsigned long value; |
81 | 81 | ||
82 | if (!plane->crtc) | ||
83 | return 0; | ||
84 | |||
82 | value = WINDOW_A_SELECT << p->index; | 85 | value = WINDOW_A_SELECT << p->index; |
83 | tegra_dc_writel(dc, value, DC_CMD_DISPLAY_WINDOW_HEADER); | 86 | tegra_dc_writel(dc, value, DC_CMD_DISPLAY_WINDOW_HEADER); |
84 | 87 | ||
@@ -140,6 +143,7 @@ static int tegra_dc_add_planes(struct drm_device *drm, struct tegra_dc *dc) | |||
140 | static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y, | 143 | static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y, |
141 | struct drm_framebuffer *fb) | 144 | struct drm_framebuffer *fb) |
142 | { | 145 | { |
146 | unsigned int format = tegra_dc_format(fb->pixel_format); | ||
143 | struct tegra_bo *bo = tegra_fb_get_plane(fb, 0); | 147 | struct tegra_bo *bo = tegra_fb_get_plane(fb, 0); |
144 | unsigned long value; | 148 | unsigned long value; |
145 | 149 | ||
@@ -150,6 +154,7 @@ static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y, | |||
150 | 154 | ||
151 | tegra_dc_writel(dc, bo->paddr + value, DC_WINBUF_START_ADDR); | 155 | tegra_dc_writel(dc, bo->paddr + value, DC_WINBUF_START_ADDR); |
152 | 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); | ||
153 | 158 | ||
154 | value = GENERAL_UPDATE | WIN_A_UPDATE; | 159 | value = GENERAL_UPDATE | WIN_A_UPDATE; |
155 | tegra_dc_writel(dc, value, DC_CMD_STATE_CONTROL); | 160 | tegra_dc_writel(dc, value, DC_CMD_STATE_CONTROL); |