public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ser, Simon" <simon.ser@intel.com>
To: "Vasilev, Oleg" <oleg.vasilev@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH 1/2] lib: prepare helpers for generic prime test
Date: Thu, 4 Jul 2019 10:26:22 +0000	[thread overview]
Message-ID: <845d373c1a9ca32ee550a04a9cfa1e0ed0469406.camel@intel.com> (raw)
In-Reply-To: <20190704095604.16589-1-oleg.vasilev@intel.com>

On Thu, 2019-07-04 at 12:56 +0300, Oleg Vasilev wrote:
> - Add vkms to gpu providers list
> - Expose fb_init

Maybe this commit could be split into two?

> Signed-off-by: Oleg Vasilev <oleg.vasilev@intel.com>
> ---
>  lib/drmtest.c |  1 +
>  lib/drmtest.h |  1 +
>  lib/igt_fb.c  | 38 ++++++++++++++++++--------------------
>  lib/igt_fb.h  |  4 ++++
>  4 files changed, 24 insertions(+), 20 deletions(-)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index 25f20353..81f4bf32 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -210,6 +210,7 @@ static const struct module {
>  	{ DRIVER_V3D, "v3d" },
>  	{ DRIVER_VC4, "vc4" },
>  	{ DRIVER_VGEM, "vgem" },
> +	{ DRIVER_VKMS, "vkms" },
>  	{ DRIVER_VIRTIO, "virtio_gpu", modprobe_virtio },
>  	{}
>  };
> diff --git a/lib/drmtest.h b/lib/drmtest.h
> index 6c4c3899..d4043ff1 100644
> --- a/lib/drmtest.h
> +++ b/lib/drmtest.h
> @@ -45,6 +45,7 @@
>  #define DRIVER_AMDGPU	(1 << 4)
>  #define DRIVER_V3D	(1 << 5)
>  #define DRIVER_PANFROST	(1 << 6)
> +#define DRIVER_VKMS	(1 << 7)
>  /*
>   * Exclude DRVER_VGEM from DRIVER_ANY since if you run on a system
>   * with vgem as well as a supported driver, you can end up with a
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 415a3d65..49c1dbe4 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -485,12 +485,10 @@ static int fb_num_planes(const struct igt_fb *fb)
>  		return format->num_planes;
>  }
>  
> -static void fb_init(struct igt_fb *fb,
> -		    int fd, int width, int height,
> -		    uint32_t drm_format,
> -		    uint64_t modifier,
> -		    enum igt_color_encoding color_encoding,
> -		    enum igt_color_range color_range)
> +void igt_init_fb(struct igt_fb *fb, int fd, int width, int height,
> +		 uint32_t drm_format, uint64_t modifier,
> +		 enum igt_color_encoding color_encoding,
> +		 enum igt_color_range color_range)
>  {
>  	const struct format_desc_struct *f = lookup_drm_format(drm_format);
>  
> @@ -627,8 +625,8 @@ void igt_calc_fb_size(int fd, int width, int height, uint32_t drm_format, uint64
>  {
>  	struct igt_fb fb;
>  
> -	fb_init(&fb, fd, width, height, drm_format, modifier,
> -		IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
> +	igt_init_fb(&fb, fd, width, height, drm_format, modifier,
> +		    IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
>  
>  	fb.size = calc_fb_size(&fb);
>  
> @@ -855,8 +853,8 @@ void igt_create_bo_for_fb(int fd, int width, int height,
>  			  uint32_t format, uint64_t modifier,
>  			  struct igt_fb *fb /* out */)
>  {
> -	fb_init(fb, fd, width, height, format, modifier,
> -		IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
> +	igt_init_fb(fb, fd, width, height, format, modifier,
> +		    IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
>  	create_bo_for_fb(fb);
>  }
>  
> @@ -885,8 +883,8 @@ int igt_create_bo_with_dimensions(int fd, int width, int height,
>  {
>  	struct igt_fb fb;
>  
> -	fb_init(&fb, fd, width, height, format, modifier,
> -		IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
> +	igt_init_fb(&fb, fd, width, height, format, modifier,
> +		    IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
>  
>  	for (int i = 0; i < fb.num_planes; i++)
>  		fb.strides[i] = stride;
> @@ -1440,8 +1438,8 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  	enum igt_color_range color_range = IGT_COLOR_YCBCR_LIMITED_RANGE;
>  	uint32_t flags = 0;
>  
> -	fb_init(fb, fd, width, height, format, modifier,
> -		color_encoding, color_range);
> +	igt_init_fb(fb, fd, width, height, format, modifier,
> +		    color_encoding, color_range);
>  
>  	for (int i = 0; i < fb->num_planes; i++)
>  		fb->strides[i] = bo_stride;
> @@ -1971,9 +1969,9 @@ static void setup_linear_mapping(struct fb_blit_upload *blit)
>  	 * destination, tiling it at the same time.
>  	 */
>  
> -	fb_init(&linear->fb, fb->fd, fb->width, fb->height,
> -		fb->drm_format, LOCAL_DRM_FORMAT_MOD_NONE,
> -		fb->color_encoding, fb->color_range);
> +	igt_init_fb(&linear->fb, fb->fd, fb->width, fb->height,
> +		    fb->drm_format, LOCAL_DRM_FORMAT_MOD_NONE,
> +		    fb->color_encoding, fb->color_range);
>  
>  	create_bo_for_fb(&linear->fb);
>  
> @@ -2127,9 +2125,9 @@ static void *igt_fb_create_cairo_shadow_buffer(int fd,
>  
>  	igt_assert(shadow);
>  
> -	fb_init(shadow, fd, width, height,
> -		drm_format, LOCAL_DRM_FORMAT_MOD_NONE,
> -		IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
> +	igt_init_fb(shadow, fd, width, height,
> +		    drm_format, LOCAL_DRM_FORMAT_MOD_NONE,
> +		    IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
>  
>  	shadow->strides[0] = ALIGN(width * (shadow->plane_bpp[0] / 8), 16);
>  	shadow->size = ALIGN((uint64_t)shadow->strides[0] * height,
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index be786911..3746fa1a 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -117,6 +117,10 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
>  			  unsigned *width_ret, unsigned *height_ret);
>  void igt_calc_fb_size(int fd, int width, int height, uint32_t format, uint64_t modifier,
>  		      uint64_t *size_ret, unsigned *stride_ret);
> +void igt_init_fb(struct igt_fb *fb, int fd, int width, int height,
> +		 uint32_t drm_format, uint64_t modifier,
> +		 enum igt_color_encoding color_encoding,
> +		 enum igt_color_range color_range);
>  unsigned int
>  igt_create_fb_with_bo_size(int fd, int width, int height,
>  			   uint32_t format, uint64_t modifier,
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-07-04 10:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04  9:56 [igt-dev] [PATCH 1/2] lib: prepare helpers for generic prime test Oleg Vasilev
2019-07-04  9:56 ` [igt-dev] [PATCH 2/2] tests/prime_generic: add vendor-agnostic prime tests Oleg Vasilev
2019-07-09 13:48   ` Rodrigo Siqueira
2019-07-10 16:35   ` Daniel Vetter
2019-07-11  9:09     ` Vasilev, Oleg
2019-07-11 12:36       ` Daniel Vetter
2019-07-11 15:20         ` Ser, Simon
2019-07-11 17:19           ` Daniel Vetter
2019-07-12  8:36             ` Vasilev, Oleg
2019-07-12 10:24             ` Ser, Simon
2019-07-04 10:26 ` Ser, Simon [this message]
2019-07-04 10:31 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [1/2] lib: prepare helpers for generic prime test Patchwork
2019-07-04 10:57 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-07-05 10:53 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2019-07-05 12:07 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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=845d373c1a9ca32ee550a04a9cfa1e0ed0469406.camel@intel.com \
    --to=simon.ser@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=oleg.vasilev@intel.com \
    /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