diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-04-08 09:18:41 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-04-15 06:35:14 -0400 |
commit | 5ac96345899be859529e05af42f708ae7bd65782 (patch) | |
tree | 51de48868775faffd2cc1ec6be77db9bb5f2d16e /drivers/gpu/drm/omapdrm/omap_fb.c | |
parent | 5e19c06d0e570a347669acc2b850c2f730090b60 (diff) |
drm/omap: print warning when rotating non-TILER fb
Print a warning when the user tries to rotate a non-TILER framebuffer.
Also set the rotation to 0, to avoid constant flood of the warnings in
case of page flipping.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fb.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_fb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index d2b8c49bfb4a..8b019602ffe6 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c | |||
@@ -218,6 +218,20 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, | |||
218 | info->rotation_type = OMAP_DSS_ROT_TILER; | 218 | info->rotation_type = OMAP_DSS_ROT_TILER; |
219 | info->screen_width = omap_gem_tiled_stride(plane->bo, orient); | 219 | info->screen_width = omap_gem_tiled_stride(plane->bo, orient); |
220 | } else { | 220 | } else { |
221 | switch (win->rotation & 0xf) { | ||
222 | case 0: | ||
223 | case BIT(DRM_ROTATE_0): | ||
224 | /* OK */ | ||
225 | break; | ||
226 | |||
227 | default: | ||
228 | dev_warn(fb->dev->dev, | ||
229 | "rotation '%d' ignored for non-tiled fb\n", | ||
230 | win->rotation); | ||
231 | win->rotation = 0; | ||
232 | break; | ||
233 | } | ||
234 | |||
221 | info->paddr = get_linear_addr(plane, format, 0, x, y); | 235 | info->paddr = get_linear_addr(plane, format, 0, x, y); |
222 | info->rotation_type = OMAP_DSS_ROT_DMA; | 236 | info->rotation_type = OMAP_DSS_ROT_DMA; |
223 | info->screen_width = plane->pitch; | 237 | info->screen_width = plane->pitch; |