Use signed location for drmModeSetPlane
authorDaniel Kurtz <djkurtz@chromium.org>
Thu, 1 May 2014 11:56:43 +0000 (19:56 +0800)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 1 May 2014 20:38:13 +0000 (23:38 +0300)
DRM_IOCTL_MODE_SETPLANE crtc_x, crtc_y are s32.
This is to allow a destination location that is partially off screen.

Make this more obvious to users of libdrm by using signed crtc_x/_y
parameters for drmModeSetPlane() as well.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
xf86drmMode.c
xf86drmMode.h

index a6bb2ee..7ca89b3 100644 (file)
@@ -906,7 +906,7 @@ int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id,
 
 int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id,
                    uint32_t fb_id, uint32_t flags,
-                   uint32_t crtc_x, uint32_t crtc_y,
+                   int32_t crtc_x, int32_t crtc_y,
                    uint32_t crtc_w, uint32_t crtc_h,
                    uint32_t src_x, uint32_t src_y,
                    uint32_t src_w, uint32_t src_h)
index 9bcb1d1..6eab565 100644 (file)
@@ -445,7 +445,7 @@ extern drmModePlaneResPtr drmModeGetPlaneResources(int fd);
 extern drmModePlanePtr drmModeGetPlane(int fd, uint32_t plane_id);
 extern int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id,
                           uint32_t fb_id, uint32_t flags,
-                          uint32_t crtc_x, uint32_t crtc_y,
+                          int32_t crtc_x, int32_t crtc_y,
                           uint32_t crtc_w, uint32_t crtc_h,
                           uint32_t src_x, uint32_t src_y,
                           uint32_t src_w, uint32_t src_h);