From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Praveen Paneri <praveen.paneri@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 2/7] lib/igt_fb: Add helper function for tile_to_mod
Date: Tue, 11 Jul 2017 15:44:27 -0300 [thread overview]
Message-ID: <1499798667.2649.10.camel@intel.com> (raw)
In-Reply-To: <1493390254-5232-3-git-send-email-praveen.paneri@intel.com>
Em Sex, 2017-04-28 às 20:07 +0530, Praveen Paneri escreveu:
> igt_get_fb_tile_size function takes modifer as an argument
> This helper function will let users to convert tiling to
> modifier and use igt_get_fb_tile_size()
>
> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
> ---
> lib/igt_fb.c | 26 ++++++++++++++++++++++++++
> lib/igt_fb.h | 1 +
> 2 files changed, 27 insertions(+)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 9ba1e3b..27baf79 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -216,6 +216,32 @@ uint64_t igt_fb_mod_to_tiling(uint64_t modifier)
> }
> }
>
> +/**
> + * igt_fb_tiling_to_mod:
> + * @tiling: DRM framebuffer tiling
> + *
> + * This function converts a DRM framebuffer tiling to its
> corresponding
> + * modifier constant.
> + *
> + * Returns:
> + * A tiling constant
A modifier constant.
Besides this, the patch looks good.
> + */
> +uint64_t igt_fb_tiling_to_mod(uint64_t tiling)
> +{
> + switch (tiling) {
> + case I915_TILING_NONE:
> + return LOCAL_DRM_FORMAT_MOD_NONE;
> + case I915_TILING_X:
> + return LOCAL_I915_FORMAT_MOD_X_TILED;
> + case I915_TILING_Y:
> + return LOCAL_I915_FORMAT_MOD_Y_TILED;
> + case I915_TILING_Yf:
> + return LOCAL_I915_FORMAT_MOD_Yf_TILED;
> + default:
> + igt_assert(0);
> + }
> +}
> +
> /* helpers to create nice-looking framebuffers */
> static int create_bo_for_fb(int fd, int width, int height, uint32_t
> format,
> uint64_t tiling, unsigned size, unsigned
> stride,
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index 414cb3d..a01671b 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -131,6 +131,7 @@ int igt_create_bo_with_dimensions(int fd, int
> width, int height, uint32_t format
> bool *is_dumb);
>
> uint64_t igt_fb_mod_to_tiling(uint64_t modifier);
> +uint64_t igt_fb_tiling_to_mod(uint64_t tiling);
>
> /* cairo-based painting */
> cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-07-11 18:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 14:37 [PATCH v2 0/7] Add Y-tiling support into IGTs Praveen Paneri
2017-04-28 14:37 ` [PATCH v2 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size Praveen Paneri
2017-07-11 18:41 ` Paulo Zanoni
2017-04-28 14:37 ` [PATCH v2 2/7] lib/igt_fb: Add helper function for tile_to_mod Praveen Paneri
2017-07-11 18:44 ` Paulo Zanoni [this message]
2017-04-28 14:37 ` [PATCH v2 3/7] lib/igt_draw: Add Y-tiling support Praveen Paneri
2017-06-09 10:18 ` [PATCH] " Praveen Paneri
2017-06-23 5:16 ` Praveen Paneri
2017-07-13 21:33 ` Paulo Zanoni
2017-07-14 14:02 ` Praveen Paneri
2017-04-28 14:37 ` [PATCH v2 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method Praveen Paneri
2017-07-13 19:59 ` Paulo Zanoni
2017-07-14 13:57 ` Praveen Paneri
2017-04-28 14:37 ` [PATCH v2 5/7] tests/kms_draw_crc: add support for Y tiling Praveen Paneri
2017-07-11 19:03 ` Paulo Zanoni
2017-07-12 8:15 ` Praveen Paneri
2017-07-13 20:19 ` Paulo Zanoni
2017-07-14 14:00 ` Praveen Paneri
2017-04-28 14:37 ` [PATCH v2 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support Praveen Paneri
2017-07-12 20:17 ` Paulo Zanoni
2017-07-14 10:15 ` Praveen Paneri
2017-04-28 14:37 ` [PATCH v2 7/7] igt/kms_fbc_crc.c : Add Y-tile tests Praveen Paneri
2017-07-12 21:01 ` Paulo Zanoni
2017-07-14 13:55 ` Praveen Paneri
2017-07-14 14:25 ` Paulo Zanoni
2017-07-17 13:33 ` Praveen Paneri
2017-04-28 19:21 ` [PATCH v2 0/7] Add Y-tiling support into IGTs Paulo Zanoni
2017-04-29 3:14 ` Praveen Paneri
2017-06-06 16:58 ` Paulo Zanoni
2017-06-15 11:03 ` Praveen Paneri
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=1499798667.2649.10.camel@intel.com \
--to=paulo.r.zanoni@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=praveen.paneri@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 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.