From patchwork Thu May 1 11:56:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 4098921 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AD217BFF02 for ; Thu, 1 May 2014 11:57:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E660D201F4 for ; Thu, 1 May 2014 11:56:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C877D201C0 for ; Thu, 1 May 2014 11:56:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CD166E313; Thu, 1 May 2014 04:56:56 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AFE06E313 for ; Thu, 1 May 2014 04:56:54 -0700 (PDT) Received: by mail-ve0-f178.google.com with SMTP id jw12so3714091veb.37 for ; Thu, 01 May 2014 04:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=Om1rL83mc3oMWEcJ0lGyaTy0QMcQndcC1PZuRKtFJm4=; b=btfWvz4X2B99gtXQU+zaqgK0J+RXD+wffgzPN5dHeuYDuRf691/bgZXb8onEAUprTU jtfN15IItg8Xa0ZFQOrg6MB2pLm55/KQiRkiD8I9kkpzMAL1Qa8djwU2wyWHtV1+xAE/ YqGoD9Crby5bha0n8cxS21176rP85v4WOSw44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Om1rL83mc3oMWEcJ0lGyaTy0QMcQndcC1PZuRKtFJm4=; b=HwDtxwULN08unU8Weg7A9Js4CPn4WiZmiU9YXAXiWB3ftyBdwlPIHZy3EG0lMatjEL vA7bSd/B+QW6a9Xu8QiHOy3BSD/wzbT+ixow7FWxYWUsBoircfs6qfNZarU9qSxE3Gl4 yYSzrII1riVbgwWILoavbbirwoqNImxQpY1OgkcRNtmb7gnDgiO4e3hZX627XVrcFpbf pNNz2BwhT8gWXskrNAi5HuMuneeV29pWxLxG4HAFUPgPcrgcSaAYyfYA6Um8SiluFCTD FDBVnSWYWDQ7792Bdk0FJn0uX+T8t366w8DQ2wsepguLTWUtBWQWbperBHN/IkTTFHaZ FfHA== X-Gm-Message-State: ALoCoQmCQ0onjkSN4njU/o4Z4HIhty4yAFr+3/qaXiNV8bvyhfBMa1u6whjdWwtNTaEOFY5j+l2t X-Received: by 10.220.12.66 with SMTP id w2mr8490815vcw.15.1398945412610; Thu, 01 May 2014 04:56:52 -0700 (PDT) Received: from djkurtzt530-glaptop.corp.google.com (dhcp-172-30-214-188.tpe.corp.google.com [172.30.214.188]) by mx.google.com with ESMTPSA id xr10sm36131249vec.2.2014.05.01.04.56.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 04:56:51 -0700 (PDT) From: Daniel Kurtz To: Jesse Barnes Subject: [PATCH] Use signed location for drmModeSetPlane Date: Thu, 1 May 2014 19:56:43 +0800 Message-Id: <1398945403-19018-1-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.9.1.423.g4596e3a Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ville Syrjälä --- 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);