From patchwork Mon Sep 16 18:00:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 2899241 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 AC34ABFF05 for ; Mon, 16 Sep 2013 18:24:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF9A52016A for ; Mon, 16 Sep 2013 18:24:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DD85620170 for ; Mon, 16 Sep 2013 18:24:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AAC38E6FB5 for ; Mon, 16 Sep 2013 11:24:10 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 911B2E6E9D for ; Mon, 16 Sep 2013 11:00:25 -0700 (PDT) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 16 Sep 2013 11:00:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,917,1371106800"; d="scan'208";a="295506523" Received: from unknown (HELO strange.amr.corp.intel.com) ([10.255.15.2]) by AZSMGA002.ch.intel.com with ESMTP; 16 Sep 2013 11:00:10 -0700 From: Damien Lespiau To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 3/3] drm: Introduce a drmSetClientCap() wrapper Date: Mon, 16 Sep 2013 19:00:04 +0100 Message-Id: <1379354404-6498-4-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1379354404-6498-1-git-send-email-damien.lespiau@intel.com> References: <1379354404-6498-1-git-send-email-damien.lespiau@intel.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 That wraps around the new DRM_SET_CLIENT_CAP ioctl. v2: SET_CAP -> SET_CLIENT_CAP renaming Signed-off-by: Damien Lespiau --- xf86drm.c | 7 +++++++ xf86drm.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/xf86drm.c b/xf86drm.c index 4791a05..720952f 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -823,6 +823,13 @@ int drmGetCap(int fd, uint64_t capability, uint64_t *value) return 0; } +int drmSetClientCap(int fd, uint64_t capability, uint64_t value) +{ + struct drm_set_client_cap cap = { capability, value }; + + return drmIoctl(fd, DRM_IOCTL_SET_CLIENT_CAP, &cap); +} + /** * Free the bus ID information. * diff --git a/xf86drm.h b/xf86drm.h index 5ecb284..1e763a3 100644 --- a/xf86drm.h +++ b/xf86drm.h @@ -609,6 +609,8 @@ extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle, unsigned int num, void *data); extern int drmCtlInstHandler(int fd, int irq); extern int drmCtlUninstHandler(int fd); +extern int drmSetClientCap(int fd, uint64_t capability, + uint64_t value); /* General user-level programmer's API: authenticated client and/or X */ extern int drmMap(int fd,