public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: IGT development <igt-dev@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 2/9] tests:core_prop_blob: Drop local_ prefixes
Date: Thu, 28 Feb 2019 16:29:30 +0200	[thread overview]
Message-ID: <20190228142930.GI20097@intel.com> (raw)
In-Reply-To: <20190228141918.26043-2-daniel.vetter@ffwll.ch>

On Thu, Feb 28, 2019 at 03:19:11PM +0100, Daniel Vetter wrote:
> Been a while this landed in libdrm ...
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  tests/core_prop_blob.c | 55 ++++++++++++++++----------------------------------
>  1 file changed, 17 insertions(+), 38 deletions(-)
> 
> diff --git a/tests/core_prop_blob.c b/tests/core_prop_blob.c
> index a7e787be993d..0a2004c33040 100644
> --- a/tests/core_prop_blob.c
> +++ b/tests/core_prop_blob.c
> @@ -33,27 +33,6 @@
>  
>  IGT_TEST_DESCRIPTION("Tests behaviour of mass-data 'blob' properties.");
>  
> -struct local_drm_mode_get_blob {
> -	uint32_t blob_id;
> -	uint32_t length;
> -	uint64_t data;
> -};
> -struct local_drm_mode_create_blob {
> -	uint64_t data;
> -	uint32_t length;
> -	uint32_t blob_id;
> -};
> -struct local_drm_mode_destroy_blob {
> -	uint32_t blob_id;
> -};
> -
> -#define LOCAL_DRM_IOCTL_MODE_GETPROPBLOB	DRM_IOWR(0xAC, \
> -						struct local_drm_mode_get_blob)
> -#define LOCAL_DRM_IOCTL_MODE_CREATEPROPBLOB	DRM_IOWR(0xBD, \
> -						struct local_drm_mode_create_blob)
> -#define LOCAL_DRM_IOCTL_MODE_DESTROYPROPBLOB	DRM_IOWR(0xBE, \
> -						struct local_drm_mode_destroy_blob)
> -
>  static const struct drm_mode_modeinfo test_mode_valid = {
>  	.clock = 1234,
>  	.hdisplay = 640,
> @@ -80,33 +59,33 @@ static const struct drm_mode_modeinfo test_mode_valid = {
>  
>  static void igt_require_propblob(int fd)
>  {
> -	struct local_drm_mode_create_blob c;
> -	struct local_drm_mode_destroy_blob d;
> +	struct drm_mode_create_blob c;
> +	struct drm_mode_destroy_blob d;
>  	uint32_t blob_data;
>  	c.data = (uintptr_t) &blob_data;
>  	c.length = sizeof(blob_data);
>  
> -	igt_require(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_CREATEPROPBLOB, &c) == 0);
> +	igt_require(drmIoctl(fd, DRM_IOCTL_MODE_CREATEPROPBLOB, &c) == 0);
>  	d.blob_id = c.blob_id;
> -	igt_require(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_DESTROYPROPBLOB, &d) == 0);
> +	igt_require(drmIoctl(fd, DRM_IOCTL_MODE_DESTROYPROPBLOB, &d) == 0);
>  }
>  
>  static int
>  validate_prop(int fd, uint32_t prop_id)
>  {
> -	struct local_drm_mode_get_blob get;
> +	struct drm_mode_get_blob get;
>  	struct drm_mode_modeinfo ret_mode;
>  
>  	get.blob_id = prop_id;
>  	get.length = 0;
>  	get.data = (uintptr_t) 0;
> -	ioctl_or_ret_errno(fd, LOCAL_DRM_IOCTL_MODE_GETPROPBLOB, &get);
> +	ioctl_or_ret_errno(fd, DRM_IOCTL_MODE_GETPROPBLOB, &get);
>  
>  	if (get.length != sizeof(test_mode_valid))
>  		return ENOMEM;
>  
>  	get.data = (uintptr_t) &ret_mode;
> -	ioctl_or_ret_errno(fd, LOCAL_DRM_IOCTL_MODE_GETPROPBLOB, &get);
> +	ioctl_or_ret_errno(fd, DRM_IOCTL_MODE_GETPROPBLOB, &get);
>  
>  	if (memcmp(&ret_mode, &test_mode_valid, sizeof(test_mode_valid)) != 0)
>  		return EINVAL;
> @@ -117,12 +96,12 @@ validate_prop(int fd, uint32_t prop_id)
>  static uint32_t
>  create_prop(int fd)
>  {
> -	struct local_drm_mode_create_blob create;
> +	struct drm_mode_create_blob create;
>  
>  	create.length = sizeof(test_mode_valid);
>  	create.data = (uintptr_t) &test_mode_valid;
>  
> -	do_ioctl(fd, LOCAL_DRM_IOCTL_MODE_CREATEPROPBLOB, &create);
> +	do_ioctl(fd, DRM_IOCTL_MODE_CREATEPROPBLOB, &create);
>  	igt_assert_neq_u32(create.blob_id, 0);
>  
>  	return create.blob_id;
> @@ -131,10 +110,10 @@ create_prop(int fd)
>  static int
>  destroy_prop(int fd, uint32_t prop_id)
>  {
> -	struct local_drm_mode_destroy_blob destroy;
> +	struct drm_mode_destroy_blob destroy;
>  
>  	destroy.blob_id = prop_id;
> -	ioctl_or_ret_errno(fd, LOCAL_DRM_IOCTL_MODE_DESTROYPROPBLOB, &destroy);
> +	ioctl_or_ret_errno(fd, DRM_IOCTL_MODE_DESTROYPROPBLOB, &destroy);
>  
>  	return 0;
>  }
> @@ -142,8 +121,8 @@ destroy_prop(int fd, uint32_t prop_id)
>  static void
>  test_validate(int fd)
>  {
> -	struct local_drm_mode_create_blob create;
> -	struct local_drm_mode_get_blob get;
> +	struct drm_mode_create_blob create;
> +	struct drm_mode_get_blob get;
>  	char too_small[32];
>  	uint32_t prop_id;
>  
> @@ -152,24 +131,24 @@ test_validate(int fd)
>  	/* Outlandish size. */
>  	create.length = 0x10000;
>  	create.data = (uintptr_t) &too_small;
> -	do_ioctl_err(fd, LOCAL_DRM_IOCTL_MODE_CREATEPROPBLOB, &create, EFAULT);
> +	do_ioctl_err(fd, DRM_IOCTL_MODE_CREATEPROPBLOB, &create, EFAULT);
>  
>  	/* Outlandish address. */
>  	create.length = sizeof(test_mode_valid);
>  	create.data = (uintptr_t) 0xdeadbeee;
> -	do_ioctl_err(fd, LOCAL_DRM_IOCTL_MODE_CREATEPROPBLOB, &create, EFAULT);
> +	do_ioctl_err(fd, DRM_IOCTL_MODE_CREATEPROPBLOB, &create, EFAULT);
>  
>  	/* When we pass an incorrect size, the kernel should correct us. */
>  	prop_id = create_prop(fd);
>  	get.blob_id = prop_id;
>  	get.length = sizeof(too_small);
>  	get.data = (uintptr_t) too_small;
> -	do_ioctl(fd, LOCAL_DRM_IOCTL_MODE_GETPROPBLOB, &get);
> +	do_ioctl(fd, DRM_IOCTL_MODE_GETPROPBLOB, &get);
>  	igt_assert_eq_u32(get.length, sizeof(test_mode_valid));
>  
>  	get.blob_id = prop_id;
>  	get.data = (uintptr_t) 0xdeadbeee;
> -	do_ioctl_err(fd, LOCAL_DRM_IOCTL_MODE_CREATEPROPBLOB, &create, EFAULT);
> +	do_ioctl_err(fd, DRM_IOCTL_MODE_CREATEPROPBLOB, &create, EFAULT);
>  }
>  
>  static void
> -- 
> 2.14.4
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-02-28 14:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 14:19 [igt-dev] [PATCH i-g-t 1/9] tests/kms_addfb_basic: Check that only the owner can rmfb Daniel Vetter
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 2/9] tests:core_prop_blob: Drop local_ prefixes Daniel Vetter
2019-02-28 14:29   ` Ville Syrjälä [this message]
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 3/9] tests: s/core_prop_blob/kms_prop_blob Daniel Vetter
2019-02-28 14:30   ` Ville Syrjälä
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 4/9] tests/kms_lease: test implicit primary plane usage in page_flip ioctl Daniel Vetter
2019-03-27  8:04   ` Boris Brezillon
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 5/9] tests/kms_lease: test implicit primary plane usage in setcrtc ioctl Daniel Vetter
2019-03-27  8:26   ` Boris Brezillon
2019-03-27  9:21     ` Daniel Vetter
2019-03-27 10:10       ` Boris Brezillon
2019-03-27 12:14         ` Daniel Vetter
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 6/9] tests/kms_lease: test implicit cursor plane usage Daniel Vetter
2019-03-27  8:28   ` Boris Brezillon
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 7/9] tests/kms_lease: Adjust to kernel errno changes Daniel Vetter
2019-03-27  8:29   ` Boris Brezillon
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 8/9] tests/kms_lease: Handle new errno from idr/xa double insert Daniel Vetter
2019-03-27  8:30   ` Boris Brezillon
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 9/9] tests/kms_lease: Check crtc used in atomic ioctl Daniel Vetter
2019-03-27  8:38   ` Boris Brezillon
2019-03-27  9:23     ` Daniel Vetter
2019-02-28 14:29 ` [igt-dev] [PATCH i-g-t 1/9] tests/kms_addfb_basic: Check that only the owner can rmfb Ville Syrjälä
2019-02-28 14:36 ` Chris Wilson
2019-02-28 15:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/9] " Patchwork
2019-02-28 18:05 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-28  9:09   ` Daniel Vetter

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=20190228142930.GI20097@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox