All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use signed location for drmModeSetPlane
@ 2014-05-01 11:56 Daniel Kurtz
  2014-05-01 20:41 ` Ville Syrjälä
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Kurtz @ 2014-05-01 11:56 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: dri-devel

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.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
 xf86drmMode.c | 2 +-
 xf86drmMode.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xf86drmMode.c b/xf86drmMode.c
index a6bb2ee..7ca89b3 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -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)
diff --git a/xf86drmMode.h b/xf86drmMode.h
index 9bcb1d1..6eab565 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -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);
-- 
1.9.1.423.g4596e3a

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Use signed location for drmModeSetPlane
  2014-05-01 11:56 [PATCH] Use signed location for drmModeSetPlane Daniel Kurtz
@ 2014-05-01 20:41 ` Ville Syrjälä
  0 siblings, 0 replies; 2+ messages in thread
From: Ville Syrjälä @ 2014-05-01 20:41 UTC (permalink / raw)
  To: Daniel Kurtz; +Cc: dri-devel, Jesse Barnes

On Thu, May 01, 2014 at 07:56:43PM +0800, Daniel Kurtz wrote:
> 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.
> 
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

and pushed.

> ---
>  xf86drmMode.c | 2 +-
>  xf86drmMode.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xf86drmMode.c b/xf86drmMode.c
> index a6bb2ee..7ca89b3 100644
> --- a/xf86drmMode.c
> +++ b/xf86drmMode.c
> @@ -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)
> diff --git a/xf86drmMode.h b/xf86drmMode.h
> index 9bcb1d1..6eab565 100644
> --- a/xf86drmMode.h
> +++ b/xf86drmMode.h
> @@ -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);
> -- 
> 1.9.1.423.g4596e3a
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-01 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 11:56 [PATCH] Use signed location for drmModeSetPlane Daniel Kurtz
2014-05-01 20:41 ` Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.