From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: igt-dev@lists.freedesktop.org,
Clinton Taylor <clinton.a.taylor@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 5/7] lib/igt_fb: Function to create a bo for passed in igt_fb
Date: Fri, 22 Feb 2019 18:20:31 +0200 [thread overview]
Message-ID: <20190222162031.GS20097@intel.com> (raw)
In-Reply-To: <20190221144109.28220-6-dhinakaran.pandiyan@intel.com>
On Thu, Feb 21, 2019 at 06:41:07AM -0800, Dhinakaran Pandiyan wrote:
> In order to execute negative tests that validate fb creation, tests need to
> be able to call the addfb ioctl themselves so that the arguments can be
> manipulated. Add a library function to provide an initialized fb without
> registering the fb with the kernel.
>
> Cc: Clinton Taylor <clinton.a.taylor@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> lib/igt_fb.c | 9 +++++++++
> lib/igt_fb.h | 3 +++
> 2 files changed, 12 insertions(+)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index b475a686..81c48453 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -689,6 +689,15 @@ out:
> return fb->gem_handle;
> }
>
> +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);
> + create_bo_for_fb(fb);
> +}
Hmm. Ah igt_create_bo_with_dimensions() doesn't hand out the igt_fb.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +
> /**
> * igt_create_bo_with_dimensions:
> * @fd: open drm file descriptor
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index a5a1a2ba..8645ab27 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -143,6 +143,9 @@ int igt_dirty_fb(int fd, struct igt_fb *fb);
> void *igt_fb_map_buffer(int fd, struct igt_fb *fb);
> void igt_fb_unmap_buffer(struct igt_fb *fb, void *buffer);
>
> +void igt_create_bo_for_fb(int fd, int width, int height,
> + uint32_t format, uint64_t modifier,
> + struct igt_fb *fb);
> int igt_create_bo_with_dimensions(int fd, int width, int height, uint32_t format,
> uint64_t modifier, unsigned stride,
> uint64_t *size_ret, unsigned *stride_ret,
> --
> 2.17.1
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-02-22 16:20 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 14:41 [igt-dev] [PATCH i-g-t 0/7] Use rendercopy for generating CCS buffers Dhinakaran Pandiyan
2019-02-21 14:41 ` [igt-dev] [PATCH i-g-t 1/7] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
2019-02-25 13:39 ` Katarzyna Dec
2019-02-26 21:00 ` Pandiyan, Dhinakaran
2019-02-27 12:56 ` Katarzyna Dec
2019-03-01 20:17 ` Dhinakaran Pandiyan
2019-02-21 14:41 ` [igt-dev] [PATCH i-g-t 2/7] tests/gem_render_copy: Test Yf tiling Dhinakaran Pandiyan
2019-02-25 13:49 ` Katarzyna Dec
2019-03-05 1:50 ` Dhinakaran Pandiyan
2019-02-21 14:41 ` [igt-dev] [PATCH i-g-t 3/7] lib/igt_fb: Use rendercopy for rendering into compressed buffers Dhinakaran Pandiyan
2019-02-21 18:04 ` [igt-dev] [PATCH i-g-t v2 3/8] " Dhinakaran Pandiyan
2019-02-21 14:41 ` [igt-dev] [PATCH i-g-t 4/7] lib/igt_fb: s/tiling/modifier/ where appropriate Dhinakaran Pandiyan
2019-02-21 18:05 ` [igt-dev] [PATCH i-g-t v2 4/8] " Dhinakaran Pandiyan
2019-02-21 14:41 ` [igt-dev] [PATCH i-g-t 5/7] lib/igt_fb: Function to create a bo for passed in igt_fb Dhinakaran Pandiyan
2019-02-22 16:20 ` Ville Syrjälä [this message]
2019-02-21 14:41 ` [igt-dev] [PATCH i-g-t 6/7] tests/kms_ccs: Generate compressed surfaces with rendercopy Dhinakaran Pandiyan
2019-02-22 16:13 ` Ville Syrjälä
2019-02-21 14:41 ` [igt-dev] [PATCH i-g-t 7/7] tests/kms_ccs: Larger fb to fully cover up the primary plane Dhinakaran Pandiyan
2019-02-22 14:19 ` Juha-Pekka Heikkila
2019-02-22 16:18 ` Clinton Taylor
2019-02-23 13:43 ` Juha-Pekka Heikkilä
2019-02-27 7:50 ` Dhinakaran Pandiyan
2019-02-27 14:18 ` Ville Syrjälä
2019-02-21 22:37 ` [igt-dev] ✓ Fi.CI.BAT: success for Use rendercopy for generating CCS buffers Patchwork
2019-02-22 10:57 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20190222162031.GS20097@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=clinton.a.taylor@intel.com \
--cc=dhinakaran.pandiyan@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