Skip to content

Commit

Permalink
drm/omap: print warning when rotating non-TILER fb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Apr 15, 2014
1 parent 5e19c06 commit 5ac9634
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/gpu/drm/omapdrm/omap_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ac9634

Please sign in to comment.