From 7c80e128429d639742043f8fbdd7f1551c940ea3 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 4 Sep 2012 16:35:56 +0000 Subject: drm: support for rotated scanout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For drivers that can support rotated scanout, the extra parameter checking in drm-core, while nice, tends to get confused. To solve this drivers can set the crtc or plane invert_dimensions field so that the dimension checking takes into account the rotation that the driver is performing. v1: original v2: remove invert_dimensions from plane, at Ville's suggestion. Userspace can give rotated src coordinates, so invert_dimensions is not required for planes. Signed-off-by: Rob Clark Reviewed-by: Ville Syrjälä Signed-off-by: Dave Airlie --- include/drm/drm_crtc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/drm/drm_crtc.h') diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 68fdb299e39f..8e405b82707d 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -368,6 +368,9 @@ struct drm_crtc_funcs { * @enabled: is this CRTC enabled? * @mode: current mode timings * @hwmode: mode timings as programmed to hw regs + * @invert_dimensions: for purposes of error checking crtc vs fb sizes, + * invert the width/height of the crtc. This is used if the driver + * is performing 90 or 270 degree rotated scanout * @x: x position on screen * @y: y position on screen * @funcs: CRTC control functions @@ -401,6 +404,8 @@ struct drm_crtc { */ struct drm_display_mode hwmode; + bool invert_dimensions; + int x, y; const struct drm_crtc_funcs *funcs; -- cgit v1.2.2