From patchwork Wed Sep 5 23:47:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Singh Rawat X-Patchwork-Id: 10589665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0C6D157A for ; Wed, 5 Sep 2018 23:48:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A43542A543 for ; Wed, 5 Sep 2018 23:48:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 928872A524; Wed, 5 Sep 2018 23:48:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 13D792A524 for ; Wed, 5 Sep 2018 23:48:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C6336E15B; Wed, 5 Sep 2018 23:48:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EX13-EDG-OU-002.vmware.com (ex13-edg-ou-002.vmware.com [208.91.0.190]) by gabe.freedesktop.org (Postfix) with ESMTPS id 355666E15B for ; Wed, 5 Sep 2018 23:48:16 +0000 (UTC) Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Wed, 5 Sep 2018 16:48:08 -0700 Received: from ubuntu.localdomain (promb-2n-dhcp79.eng.vmware.com [10.20.88.79]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 85467B0749; Wed, 5 Sep 2018 19:48:15 -0400 (EDT) From: Deepak Rawat To: , , , Subject: [PATCH libdrm] xf86drm: Add signed32 rectangle Date: Wed, 5 Sep 2018 16:47:51 -0700 Message-ID: <20180905234751.2400-1-drawat@vmware.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Received-SPF: None (EX13-EDG-OU-002.vmware.com: drawat@vmware.com does not designate permitted sender hosts) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Deepak Rawat , lukasz.spintzyk@displaylink.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP With drm subsystem using struct drm_rect to manage rectangular area this export it to user-space. Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS. Signed-off-by: Deepak Rawat --- include/drm/drm_mode.h | 19 +++++++++++++++++++ xf86drmMode.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 5f9fadbd..9e7bdc26 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h @@ -855,6 +855,25 @@ struct drm_mode_revoke_lease { __u32 lessee_id; }; +/** + * struct drm_mode_rect - two dimensional rectangle + * @x1: horizontal starting coordinate (inclusive) + * @y1: vertical starting coordinate (inclusive) + * @x2: horizontal ending coordinate (exclusive) + * @y2: vertical ending coordinate (exclusive) + * + * With drm subsystem using struct drm_rect to manage rectangular area this + * export it to user-space. + * + * Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS. + */ +struct drm_mode_rect { + __s32 x1; + __s32 y1; + __s32 x2; + __s32 y2; +}; + #if defined(__cplusplus) } #endif diff --git a/xf86drmMode.h b/xf86drmMode.h index 3cd27aee..a066e2b8 100644 --- a/xf86drmMode.h +++ b/xf86drmMode.h @@ -338,6 +338,8 @@ typedef struct _drmModePlaneRes { uint32_t *planes; } drmModePlaneRes, *drmModePlaneResPtr; +typedef struct drm_mode_rect drmModeRect, *drmModeRectPtr; + extern void drmModeFreeModeInfo( drmModeModeInfoPtr ptr ); extern void drmModeFreeResources( drmModeResPtr ptr ); extern void drmModeFreeFB( drmModeFBPtr ptr );