From patchwork Fri Dec 8 08:02:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kevin.rogovin@intel.com X-Patchwork-Id: 10101727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 39178605BA for ; Fri, 8 Dec 2017 08:02:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B06328B1C for ; Fri, 8 Dec 2017 08:02:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FE5128B1E; Fri, 8 Dec 2017 08:02:50 +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=-4.2 required=2.0 tests=BAYES_00, 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 E0A0828B1C for ; Fri, 8 Dec 2017 08:02:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F4AF6E8A5; Fri, 8 Dec 2017 08:02:49 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3256A89F41 for ; Fri, 8 Dec 2017 08:02:47 +0000 (UTC) Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Dec 2017 00:02:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,377,1508828400"; d="scan'208";a="1105783" Received: from dcraig1-mobl1.amr.corp.intel.com (HELO LittleBigTrouble.ger.corp.intel.com) ([10.252.5.15]) by orsmga008.jf.intel.com with ESMTP; 08 Dec 2017 00:02:45 -0800 From: kevin.rogovin@intel.com To: intel-gfx@lists.freedesktop.org Date: Fri, 8 Dec 2017 10:02:37 +0200 Message-Id: <1512720159-6843-2-git-send-email-kevin.rogovin@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512720159-6843-1-git-send-email-kevin.rogovin@intel.com> References: <1512720159-6843-1-git-send-email-kevin.rogovin@intel.com> Cc: Kevin Rogovin Subject: [Intel-gfx] [PATCH 1/3] drm-uapi:i915 define set/get (per-context) scratch page ioctl interface X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Kevin Rogovin --- include/drm-uapi/i915_drm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h index 7f28eea403..e75eea058b 100644 --- a/include/drm-uapi/i915_drm.h +++ b/include/drm-uapi/i915_drm.h @@ -1412,6 +1412,15 @@ struct drm_i915_gem_context_param { #define I915_CONTEXT_MAX_USER_PRIORITY 1023 /* inclusive */ #define I915_CONTEXT_DEFAULT_PRIORITY 0 #define I915_CONTEXT_MIN_USER_PRIORITY -1023 /* inclusive */ +/* Notes for set/get of I915_CONTEXT_PARAM_SCRATCH_PAGE_CONTENTS: + * 1) for the duration of set/get, the caller must guarantee + * that nothing can read/write the scratch page + * 2) on set and get, ioctl will write to drm_i915_gem_context_param::set + * the size of the scratch page + * 3) on get, first drm_i915_gem_context_param::size of the scratch + * page contents will be written to. + */ +#define I915_CONTEXT_PARAM_SCRATCH_PAGE_CONTENTS 0x7 __u64 value; };