From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Clinton Taylor <clinton.a.taylor@intel.com>,
Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: [igt-dev] [PATCH i-g-t 6/7] lib/igt_fb: Function to create a bo for passed in igt_fb
Date: Mon, 4 Mar 2019 17:47:41 -0800 [thread overview]
Message-ID: <20190305014742.3598-6-dhinakaran.pandiyan@intel.com> (raw)
In-Reply-To: <20190305014742.3598-1-dhinakaran.pandiyan@intel.com>
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>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.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 db12a30d..b00d839d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -743,6 +743,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);
+}
+
/**
* igt_create_bo_with_dimensions:
* @fd: open drm file descriptor
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 24d40b18..7667579b 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -147,6 +147,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
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-03-05 1:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 1:47 [igt-dev] [PATCH i-g-t 1/7] lib/rendercopy: Copy gen8 surface state definition to gen-9 header Dhinakaran Pandiyan
2019-03-05 1:47 ` [igt-dev] [PATCH i-g-t 2/7] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
2019-03-05 10:14 ` Katarzyna Dec
2019-03-07 1:39 ` Pandiyan, Dhinakaran
2019-03-05 1:47 ` [igt-dev] [PATCH i-g-t 3/7] tests/gem_render_copy: Test Yf tiling Dhinakaran Pandiyan
2019-03-05 14:26 ` Katarzyna Dec
2019-03-07 0:58 ` Dhinakaran Pandiyan
2019-03-08 9:59 ` Katarzyna Dec
2019-03-07 1:33 ` [igt-dev] [PATCH i-g-t v2 " Dhinakaran Pandiyan
2019-03-09 3:36 ` [igt-dev] [PATCH i-g-t v3 " Dhinakaran Pandiyan
2019-03-05 1:47 ` [igt-dev] [PATCH i-g-t 4/7] lib/igt_fb: Use rendercopy for rendering into compressed buffers Dhinakaran Pandiyan
2019-03-06 22:42 ` Clinton Taylor
2019-03-05 1:47 ` [igt-dev] [PATCH i-g-t 5/7] lib/igt_fb: s/tiling/modifier/ where appropriate Dhinakaran Pandiyan
2019-03-05 1:47 ` Dhinakaran Pandiyan [this message]
2019-03-05 1:47 ` [igt-dev] [PATCH i-g-t 7/7] tests/kms_ccs: Generate compressed surfaces with rendercopy Dhinakaran Pandiyan
2019-03-05 2:47 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/7] lib/rendercopy: Copy gen8 surface state definition to gen-9 header Patchwork
2019-03-05 8:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-05 10:12 ` [igt-dev] [PATCH i-g-t 1/7] " Katarzyna Dec
2019-03-07 2:07 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/7] lib/rendercopy: Copy gen8 surface state definition to gen-9 header (rev2) Patchwork
2019-03-07 3:03 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-09 4:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/7] lib/rendercopy: Copy gen8 surface state definition to gen-9 header (rev3) Patchwork
2019-03-09 9:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-12 10:13 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/7] lib/rendercopy: Copy gen8 surface state definition to gen-9 header (rev4) 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=20190305014742.3598-6-dhinakaran.pandiyan@intel.com \
--to=dhinakaran.pandiyan@intel.com \
--cc=clinton.a.taylor@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