From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 089C26E9B0 for ; Mon, 17 May 2021 14:42:50 +0000 (UTC) Date: Mon, 17 May 2021 07:42:49 -0700 Message-ID: <874kf1s9p2.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: References: <20210515230142.1816456-1-alan.previn.teres.alexis@intel.com> <20210515230142.1816456-5-alan.previn.teres.alexis@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [PATCH i-g-t 04/17] Add basic PXP testing of buffer and context alloc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Petri Latvala Cc: igt-dev@lists.freedesktop.org, Alan Previn List-ID: On Mon, 17 May 2021 03:26:34 -0700, Petri Latvala wrote: > > > +static int create_bo_ext(int i915, uint32_t size, bool protected_is_true, uint32_t *bo_out) > > +{ > > + int ret; > > + > > + struct drm_i915_gem_create_ext_protected_content protected_ext = { > > + .base = { .name = I915_GEM_CREATE_EXT_PROTECTED_CONTENT }, > > + .flags = 0, > > + }; > > + > > + struct drm_i915_gem_create_ext create_ext = { > > + .size = size, > > + .extensions = 0, > > + }; > > + > > + if (protected_is_true) > > + create_ext.extensions = (uintptr_t)&protected_ext; > > + > > + ret = ioctl(i915, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext); > > Why the naked ioctl on a DRM ioctl instead of the many wrappers we > have in lib? (do_ioctl, do_ioctl_err, igt_ioctl, ...) Mostly because Matt Auld's patchset which adds these wrappers for DRM_IOCTL_I915_GEM_CREATE_EXT has not yet been merged. _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev