All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 04/17] Add basic PXP testing of buffer and context alloc
Date: Mon, 17 May 2021 13:26:34 +0300	[thread overview]
Message-ID: <YKJE2lzbAp11yVuZ@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20210515230142.1816456-5-alan.previn.teres.alexis@intel.com>

On Sat, May 15, 2021 at 04:01:29PM -0700, Alan Previn wrote:
> Test PXP capability support as well as the allocation of protected
> buffers and protected contexts.
> 
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> ---
>  tests/i915/gem_pxp.c | 381 +++++++++++++++++++++++++++++++++++++++++++
>  tests/meson.build    |   1 +
>  2 files changed, 382 insertions(+)
>  create mode 100644 tests/i915/gem_pxp.c
> 
> diff --git a/tests/i915/gem_pxp.c b/tests/i915/gem_pxp.c
> new file mode 100644
> index 00000000..be7b2749
> --- /dev/null
> +++ b/tests/i915/gem_pxp.c
> @@ -0,0 +1,381 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2021 Intel Corporation
> + */
> +
> +#include <sys/ioctl.h>
> +
> +#include "igt.h"
> +#include "i915/gem.h"
> +
> +IGT_TEST_DESCRIPTION("Test PXP that manages protected content through arbitrated HW-PXP-session");
> +/* Note: PXP = "Protected Xe Path" */
> +
> +static bool is_pxp_hw_supported(int i915)
> +{
> +	uint32_t devid = intel_get_drm_devid(i915);
> +
> +	if (IS_TIGERLAKE(devid) || IS_ROCKETLAKE(devid) || IS_ALDERLAKE_S(devid))
> +		return true;
> +
> +	return false;
> +}
> +
> +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, ...)


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2021-05-17 10:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 23:01 [igt-dev] [PATCH i-g-t 00/17] Introduce PXP Test Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 01/17] Sync i915_drm.h UAPI from kernel Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 02/17] Add PXP UAPI support in i915_drm.h Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 03/17] Upadte IOCTL wrapper with DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 04/17] Add basic PXP testing of buffer and context alloc Alan Previn
2021-05-17  3:10   ` Dixit, Ashutosh
2021-05-17 10:26   ` Petri Latvala [this message]
2021-05-17 14:42     ` Dixit, Ashutosh
2021-05-17 14:50       ` Petri Latvala
2021-05-17 16:34         ` Teres Alexis, Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 05/17] Perform a regular 3d copy as a control checkpoint Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 06/17] Add PXP attribute support in batchbuffer and buffer_ops libs Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 07/17] Add MI_SET_APPID instruction definition Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 08/17] Enable protected session cmd in gen12_render_copyfunc Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 09/17] Add subtest to copy raw source to protected dest Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 10/17] Add test where both src and dest are protected Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 11/17] Verify PXP teardown occured through suspend-resume Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 12/17] Verify execbuf fails with stale PXP context after teardown Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 13/17] Verify execbuf fails with stale PXP buffer " Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 14/17] Verify execbuf ok with stale prot-buff and regular context Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 15/17] Ensure RESET_STAT reports invalidated protected context Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 16/17] Verify protected surfaces are dma buffer sharable Alan Previn
2021-05-15 23:01 ` [igt-dev] [PATCH i-g-t 17/17] tests/i915_pxp: CRC validation for display tests Alan Previn
2021-05-16  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Introduce PXP Test (rev4) Patchwork
2021-05-16  2:13 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-05-18 10:33 [igt-dev] [PATCH i-g-t 00/17] Introduce PXP Test Alan Previn
2021-05-18 10:33 ` [igt-dev] [PATCH i-g-t 04/17] Add basic PXP testing of buffer and context alloc Alan Previn
2021-06-02 20:23   ` Rodrigo Vivi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKJE2lzbAp11yVuZ@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.