Re: [PATCH] drm/omap: fix plane rotation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 5, 2014 at 2:33 PM, Grazvydas Ignotas <notasas@xxxxxxxxx> wrote:
> Plane rotation with omapdrm is currently broken.
> It seems omap_plane_mode_set() expects width and height in screen
> coordinates, so pass it like that.
>
> Cc: Rob Clark <robdclark@xxxxxxxxx>
> Signed-off-by: Grazvydas Ignotas <notasas@xxxxxxxxx>
> ---
>  drivers/gpu/drm/omapdrm/omap_plane.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
> index 370580c..5611f15 100644
> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
> @@ -253,6 +253,14 @@ static int omap_plane_update(struct drm_plane *plane,
>
>         drm_framebuffer_reference(fb);
>
> +       /* omap_plane_mode_set() takes adjusted src */
> +       switch (omap_plane->win.rotation & 0xf) {
> +       case BIT(DRM_ROTATE_90):
> +       case BIT(DRM_ROTATE_270):
> +               swap(src_w, src_h);
> +               break;
> +       }
> +

hmm, I think that the better thing would be to do this in
omap_framebuffer_update_scanout().  In fact we do already swap
src_w/src_h there.  Only we don't swap the width/height parameters we
pass down to omapdss.  Not quite sure if something changed in omapdss
with regards to rotation_type, but keeping it with the rest of the
rotation related maths in _update_scanout() seems cleaner.

BR,
-R

>         return omap_plane_mode_set(plane, crtc, fb,
>                         crtc_x, crtc_y, crtc_w, crtc_h,
>                         src_x, src_y, src_w, src_h,
> --
> 1.7.9.5
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux