From patchwork Thu Feb 28 00:29:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 10832431 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 56EC21390 for ; Thu, 28 Feb 2019 00:30:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 486BE2DE68 for ; Thu, 28 Feb 2019 00:30:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46DA82E4F7; Thu, 28 Feb 2019 00:30:17 +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 E33242DE68 for ; Thu, 28 Feb 2019 00:30:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A94E96E141; Thu, 28 Feb 2019 00:30:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id BD1B76E141 for ; Thu, 28 Feb 2019 00:30:13 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id i20so8812592pfo.6 for ; Wed, 27 Feb 2019 16:30:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zZDs+smo4htiV5e3Ebff6QfpS/yYI5kkpl8fogcaDjA=; b=uQPIL5epdTxPKtR+/SRlniC00WGxCS1xbPvXYRR8ZMv+DzAMfVe2DtZ0vYmAaORSbs w2tc6rdkhyY496crz0U+zG0BX5tjd5YjpNnKU/Eu6QuJy5X5qR1WHMOYFLRDbMyy60DL A/SZaeCiA6V18ZJADaXDQEA7IGZx0q6VTu6qR1BB7bueJAk6Y+bUPtfAV+MU8Zp7C1/M kmBgYaJ/sgG/SCtlSuTS/0IzZqRh9/P++zP2NwXlN/f8lMqcGgmDzXEm9jwrlvz00rrH AjGtwezs5ZQ0CsHssPa/f4VerF4JZQZc4u1WP169QhotmrtgwtTKHqsTWIKhhehHkDKO ZQWg== X-Gm-Message-State: AHQUAuakzhcGc3OLs7gFxO6AFSWSYT4cAhHC4M0Imr8rHFwcdkcHJqpa +MuYQBGpYvwT1ZKVPWd6DUoSIOAX9iM= X-Google-Smtp-Source: AHgI3IbCAxE1bTbPvvTUYyShfY9Gdjb0+CER7C4W6XX9GFw6IpYibMGZwX1WMIWiIgjleq7Wi6TdpA== X-Received: by 2002:a63:3193:: with SMTP id x141mr5619578pgx.438.1551313812753; Wed, 27 Feb 2019 16:30:12 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:c9f6:e96:6490:6ba0]) by smtp.gmail.com with ESMTPSA id z189sm2984871pfb.146.2019.02.27.16.30.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Feb 2019 16:30:11 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH] virtgpu: Update kernel header Date: Wed, 27 Feb 2019 16:29:59 -0800 Message-Id: <20190228002959.1780-1-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zZDs+smo4htiV5e3Ebff6QfpS/yYI5kkpl8fogcaDjA=; b=GAqQumBQgaLqq4eeUxXvmXvlvvMvvMr8c3yuncR1j2VG4IR3YIml+JpZvedu4n5OiK +FBxk8XZhGdW0AyBu3o05eYPIcYrb8yJce/F9FKXMW3YM/IP90amOXg7hpB/egBoPFvT UEC6mQ7NZApm97YGs9ejFMfxlk2vHgD1DCC6s= 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: robert.foss@collabora.com, Gurchetan Singh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Generated using make headers_install. This brings in the in/out fence support for explicit synchronization. Signed-off-by: Gurchetan Singh --- include/drm/virtgpu_drm.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/drm/virtgpu_drm.h b/include/drm/virtgpu_drm.h index 9a781f06..acb21912 100644 --- a/include/drm/virtgpu_drm.h +++ b/include/drm/virtgpu_drm.h @@ -47,6 +47,13 @@ extern "C" { #define DRM_VIRTGPU_WAIT 0x08 #define DRM_VIRTGPU_GET_CAPS 0x09 +#define VIRTGPU_EXECBUF_FENCE_FD_IN 0x01 +#define VIRTGPU_EXECBUF_FENCE_FD_OUT 0x02 +#define VIRTGPU_EXECBUF_FLAGS (\ + VIRTGPU_EXECBUF_FENCE_FD_IN |\ + VIRTGPU_EXECBUF_FENCE_FD_OUT |\ + 0) + struct drm_virtgpu_map { __u64 offset; /* use for mmap system call */ __u32 handle; @@ -54,16 +61,18 @@ struct drm_virtgpu_map { }; struct drm_virtgpu_execbuffer { - __u32 flags; /* for future use */ + __u32 flags; __u32 size; __u64 command; /* void* */ __u64 bo_handles; __u32 num_bo_handles; - __u32 pad; + __s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT) */ }; #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ #define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 /* do we have the capset fix */ +#define VIRTGPU_PARAM_NO_TRANSFER 3 /* have VIRTIO_GPU_F_NO_TRANSFER */ +#define VIRTGPU_PARAM_HOST_COHERENT 4 /* have VIRTIO_GPU_F_HOST_COHERENT */ struct drm_virtgpu_getparam { __u64 param; @@ -137,7 +146,7 @@ struct drm_virtgpu_get_caps { DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map) #define DRM_IOCTL_VIRTGPU_EXECBUFFER \ - DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\ + DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\ struct drm_virtgpu_execbuffer) #define DRM_IOCTL_VIRTGPU_GETPARAM \