From: Tomi Valkeinen Date: Tue, 8 Apr 2014 13:18:41 +0000 (+0300) Subject: drm/omap: print warning when rotating non-TILER fb X-Git-Tag: accepted/tizen/common/20141203.182822~168^2~8^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ac96345899be859529e05af42f708ae7bd65782;p=platform%2Fkernel%2Flinux-arm64.git 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 --- diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index d2b8c49..8b01960 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, info->rotation_type = OMAP_DSS_ROT_TILER; info->screen_width = omap_gem_tiled_stride(plane->bo, orient); } else { + switch (win->rotation & 0xf) { + case 0: + case BIT(DRM_ROTATE_0): + /* OK */ + break; + + default: + dev_warn(fb->dev->dev, + "rotation '%d' ignored for non-tiled fb\n", + win->rotation); + win->rotation = 0; + break; + } + info->paddr = get_linear_addr(plane, format, 0, x, y); info->rotation_type = OMAP_DSS_ROT_DMA; info->screen_width = plane->pitch;