From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Praveen Paneri <praveen.paneri@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support
Date: Wed, 12 Jul 2017 17:17:24 -0300 [thread overview]
Message-ID: <1499890644.2649.20.camel@intel.com> (raw)
In-Reply-To: <1493390254-5232-7-git-send-email-praveen.paneri@intel.com>
Em Sex, 2017-04-28 às 20:07 +0530, Praveen Paneri escreveu:
> Allow tests to create Y-tiled bufferes using a separate
> argument to the test without increasing the number of
> subtests.
>
> v2: Changed tiling option to string (Paulo)
I had some minor nitpicks for this patch: reshuffling parameters
between lines and the way we handle the new argument and its help
message. Instead of requesting those trivial changes and creating yet
another review round-trip I just went ahead and implemented them as v3.
I hope you're fine with this approach. The patch can be applied without
the rest of the patches in the series, so I applied it & pushed to IGT
with my nitpicks and R-B.
>
> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
> ---
> tests/kms_frontbuffer_tracking.c | 48 ++++++++++++++++++++++++----
> ------------
> 1 file changed, 29 insertions(+), 19 deletions(-)
>
> diff --git a/tests/kms_frontbuffer_tracking.c
> b/tests/kms_frontbuffer_tracking.c
> index 7cea4de..62ae33a 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -252,6 +252,7 @@ struct {
> int only_pipes;
> int shared_fb_x_offset;
> int shared_fb_y_offset;
> + uint64_t tiling;
> } opt = {
> .check_status = true,
> .check_crc = true,
> @@ -264,6 +265,7 @@ struct {
> .only_pipes = PIPE_COUNT,
> .shared_fb_x_offset = 500,
> .shared_fb_y_offset = 500,
> + .tiling = LOCAL_I915_FORMAT_MOD_X_TILED,
> };
>
> struct modeset_params {
> @@ -578,7 +580,7 @@ static void create_fb(enum pixel_format pformat,
> int width, int height,
> if (plane == PLANE_CUR)
> tiling_for_size = LOCAL_DRM_FORMAT_MOD_NONE;
> else
> - tiling_for_size = LOCAL_I915_FORMAT_MOD_X_TILED;
> + tiling_for_size = opt.tiling;
>
> igt_calc_fb_size(drm.fd, width, height, bpp,
> tiling_for_size, &size,
> &stride);
> @@ -710,7 +712,7 @@ static void create_shared_fb(enum pixel_format
> format)
>
> big_h = prim_h + scnd_h + offs_h + opt.shared_fb_y_offset;
>
> - create_fb(format, big_w, big_h,
> LOCAL_I915_FORMAT_MOD_X_TILED,
> + create_fb(format, big_w, big_h, opt.tiling,
> PLANE_PRI, &s->big);
> }
>
> @@ -744,16 +746,16 @@ static void create_fbs(enum pixel_format
> format)
>
> create_fb(format, prim_mode_params.mode->hdisplay,
> prim_mode_params.mode->vdisplay,
> - LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s-
> >prim_pri);
> + opt.tiling, PLANE_PRI, &s->prim_pri);
> create_fb(format, prim_mode_params.cursor.w,
> prim_mode_params.cursor.h,
> LOCAL_DRM_FORMAT_MOD_NONE,
> PLANE_CUR, &s->prim_cur);
> create_fb(format, prim_mode_params.sprite.w,
> - prim_mode_params.sprite.h,
> LOCAL_I915_FORMAT_MOD_X_TILED,
> + prim_mode_params.sprite.h, opt.tiling,
> PLANE_SPR, &s->prim_spr);
>
> create_fb(format, offscreen_fb.w, offscreen_fb.h,
> - LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s-
> >offscreen);
> + opt.tiling, PLANE_PRI, &s->offscreen);
>
> create_shared_fb(format);
>
> @@ -762,11 +764,11 @@ static void create_fbs(enum pixel_format
> format)
>
> create_fb(format, scnd_mode_params.mode->hdisplay,
> scnd_mode_params.mode->vdisplay,
> - LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s-
> >scnd_pri);
> + opt.tiling, PLANE_PRI, &s->scnd_pri);
> create_fb(format, scnd_mode_params.cursor.w,
> scnd_mode_params.cursor.h,
> LOCAL_DRM_FORMAT_MOD_NONE, PLANE_CUR, &s-
> >scnd_cur);
> create_fb(format, scnd_mode_params.sprite.w,
> scnd_mode_params.sprite.h,
> - LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_SPR, &s-
> >scnd_spr);
> + opt.tiling, PLANE_SPR, &s->scnd_spr);
> }
>
> static bool set_mode_for_params(struct modeset_params *params)
> @@ -1252,7 +1254,7 @@ static void init_blue_crc(enum pixel_format
> format, bool mandatory_sink_crc)
>
> create_fb(format, prim_mode_params.mode->hdisplay,
> prim_mode_params.mode->vdisplay,
> - LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &blue);
> + opt.tiling, PLANE_PRI, &blue);
>
> fill_fb(&blue, COLOR_PRIM_BG);
>
> @@ -1287,7 +1289,7 @@ static void init_crcs(enum pixel_format format,
> for (r = 0; r < pattern->n_rects; r++)
> create_fb(format, prim_mode_params.mode->hdisplay,
> prim_mode_params.mode->vdisplay,
> - LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI,
> &tmp_fbs[r]);
> + opt.tiling, PLANE_PRI, &tmp_fbs[r]);
>
> for (r = 0; r < pattern->n_rects; r++)
> fill_fb(&tmp_fbs[r], COLOR_PRIM_BG);
> @@ -2386,7 +2388,7 @@ static void flip_subtest(const struct test_mode
> *t)
> prepare_subtest(t, pattern);
>
> create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> - LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> + opt.tiling, t->plane, &fb2);
> fill_fb(&fb2, bg_color);
> orig_fb = params->fb.fb;
>
> @@ -2432,7 +2434,7 @@ static void fliptrack_subtest(const struct
> test_mode *t, enum flip_type type)
> prepare_subtest(t, pattern);
>
> create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> - LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> + opt.tiling, t->plane, &fb2);
> fill_fb(&fb2, COLOR_PRIM_BG);
> orig_fb = params->fb.fb;
>
> @@ -2643,7 +2645,7 @@ static void fullscreen_plane_subtest(const
> struct test_mode *t)
> prepare_subtest(t, pattern);
>
> rect = pattern->get_rect(¶ms->fb, 0);
> - create_fb(t->format, rect.w, rect.h,
> LOCAL_I915_FORMAT_MOD_X_TILED,
> + create_fb(t->format, rect.w, rect.h, opt.tiling,
> t->plane, &fullscreen_fb);
> /* Call pick_color() again since PRI and SPR may not support
> the same
> * pixel formats. */
> @@ -2722,7 +2724,7 @@ static void scaledprimary_subtest(const struct
> test_mode *t)
> old_fb = params->fb.fb;
>
> create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> - LOCAL_I915_FORMAT_MOD_X_TILED,
> + opt.tiling,
> t->plane, &new_fb);
> fill_fb(&new_fb, COLOR_BLUE);
>
> @@ -2832,7 +2834,7 @@ static void modesetfrombusy_subtest(const
> struct test_mode *t)
> prepare_subtest(t, NULL);
>
> create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> - LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> + opt.tiling, t->plane, &fb2);
> fill_fb(&fb2, COLOR_PRIM_BG);
>
> start_busy_thread(params->fb.fb);
> @@ -2937,7 +2939,7 @@ static void farfromfence_subtest(const struct
> test_mode *t)
> target = pick_target(t, params);
>
> create_fb(t->format, params->mode->hdisplay, max_height,
> - LOCAL_I915_FORMAT_MOD_X_TILED, t->plane,
> &tall_fb);
> + opt.tiling, t->plane, &tall_fb);
>
> fill_fb(&tall_fb, COLOR_PRIM_BG);
>
> @@ -3012,7 +3014,7 @@ static void badstride_subtest(const struct
> test_mode *t)
> old_fb = params->fb.fb;
>
> create_fb(t->format, params->fb.fb->width + 4096, params-
> >fb.fb->height,
> - LOCAL_I915_FORMAT_MOD_X_TILED, t->plane,
> &wide_fb);
> + opt.tiling, t->plane, &wide_fb);
> igt_assert(wide_fb.stride > 16384);
>
> fill_fb(&wide_fb, COLOR_PRIM_BG);
> @@ -3079,7 +3081,7 @@ static void stridechange_subtest(const struct
> test_mode *t)
> old_fb = params->fb.fb;
>
> create_fb(t->format, params->fb.fb->width + 512, params-
> >fb.fb->height,
> - LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &new_fb);
> + opt.tiling, t->plane, &new_fb);
> fill_fb(&new_fb, COLOR_PRIM_BG);
>
> igt_assert(old_fb->stride != new_fb.stride);
> @@ -3198,7 +3200,7 @@ static void basic_subtest(const struct
> test_mode *t)
> prepare_subtest(t, pattern);
>
> create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> - LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> + opt.tiling, t->plane, &fb2);
> fb1 = params->fb.fb;
>
> for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT;
> method++, r++) {
> @@ -3267,6 +3269,12 @@ static int opt_handler(int option, int
> option_index, void *data)
> igt_assert_eq(opt.only_pipes, PIPE_COUNT);
> opt.only_pipes = PIPE_DUAL;
> break;
> + case 'l':
> + if (!strncmp(optarg, "y", 1))
> + opt.tiling = LOCAL_I915_FORMAT_MOD_Y_TILED;
> + else
> + opt.tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
> + break;
> default:
> igt_assert(false);
> }
> @@ -3286,7 +3294,8 @@ const char *help_str =
> " --shared-fb-x offset Use 'offset' as the X offset for the
> shared FB\n"
> " --shared-fb-y offset Use 'offset' as the Y offset for the
> shared FB\n"
> " --1p-only Only run subtests that use 1 pipe\n"
> -" --2p-only Only run subtests that use 2
> pipes\n";
> +" --2p-only Only run subtests that use 2 pipes\n"
> +" --tiling Select tiling mode-'x' or 'y'\n";
>
> static const char *pipes_str(int pipes)
> {
> @@ -3425,6 +3434,7 @@ int main(int argc, char *argv[])
> { "shared-fb-y", 1, 0, 'y'},
> { "1p-only", 0, 0, '1'},
> { "2p-only", 0, 0, '2'},
> + { "tiling", 1, 0, 'l'},
> { 0, 0, 0, 0 }
> };
>
_______________________________________________
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-12 20:17 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
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 [this message]
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=1499890644.2649.20.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).