From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Praveen Paneri <praveen.paneri@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Akash Goel <akash.goel@intel.com>
Subject: Re: [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method
Date: Wed, 26 Apr 2017 11:06:32 -0300 [thread overview]
Message-ID: <1493215592.2504.134.camel@intel.com> (raw)
In-Reply-To: <1489778126-11988-5-git-send-email-praveen.paneri@intel.com>
Em Sáb, 2017-03-18 às 00:45 +0530, Praveen Paneri escreveu:
> From: Akash Goel <akash.goel@intel.com>
>
> Signed-off-by: Akash Goel <akash.goel@intel.com>
> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
> ---
> lib/igt_draw.c | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/lib/igt_draw.c b/lib/igt_draw.c
> index fcf8fba..17011d8 100644
> --- a/lib/igt_draw.c
> +++ b/lib/igt_draw.c
> @@ -31,6 +31,7 @@
> #include "igt_core.h"
> #include "igt_fb.h"
> #include "ioctl_wrappers.h"
> +#include "i830_reg.h"
>
> /**
> * SECTION:igt_draw
> @@ -487,6 +488,23 @@ static void draw_rect_blt(int fd, struct
> cmd_data *cmd_data,
> blt_cmd_tiling = (tiling) ? XY_COLOR_BLT_TILED : 0;
> pitch = (tiling) ? buf->stride / 4 : buf->stride;
>
> + if (tiling == I915_TILING_Y) {
> + /* To change the tile register, insert an
> MI_FLUSH_DW followed by an MI_LOAD_REGISTER_IMM */
> + BEGIN_BATCH(4, 0);
> + OUT_BATCH(MI_FLUSH_DW | 2);
> + OUT_BATCH(0x0);
> + OUT_BATCH(0x0);
> + OUT_BATCH(0x0);
> + ADVANCE_BATCH();
> +
> + BEGIN_BATCH(4, 0);
> + OUT_BATCH(MI_LOAD_REGISTER_IMM);
> + OUT_BATCH(0x22200); /* BCS_SWCTRL */
> + OUT_BATCH(((0x3 << 16) | 0x3)); /* enable the Y
> tiling */
> + OUT_BATCH(MI_NOOP);
> + ADVANCE_BATCH();
> + }
> +
> BEGIN_BATCH(6, 1);
> OUT_BATCH(XY_COLOR_BLT_CMD_NOLEN | XY_COLOR_BLT_WRITE_ALPHA
> |
> XY_COLOR_BLT_WRITE_RGB | blt_cmd_tiling |
> blt_cmd_len);
> @@ -497,6 +515,23 @@ static void draw_rect_blt(int fd, struct
> cmd_data *cmd_data,
> OUT_BATCH(color);
> ADVANCE_BATCH();
>
> + if (tiling == I915_TILING_Y) {
> + /* To change the tile register, insert an
> MI_FLUSH_DW followed by an MI_LOAD_REGISTER_IMM */
> + BEGIN_BATCH(4, 0);
> + OUT_BATCH(MI_FLUSH_DW | 2);
> + OUT_BATCH(0x0);
> + OUT_BATCH(0x0);
> + OUT_BATCH(0x0);
> + ADVANCE_BATCH();
> +
> + BEGIN_BATCH(4, 0);
> + OUT_BATCH(MI_LOAD_REGISTER_IMM);
> + OUT_BATCH(0x22200); /* BCS_SWCTRL */
> + OUT_BATCH((0x3 << 16)); /* Reset back to X-Tiling
> (default) */
> + OUT_BATCH(MI_NOOP);
> + ADVANCE_BATCH();
> + }
These are two almost identical copies of the same code. Please extract
them to a function that takes the tiling as the argument.
> +
> intel_batchbuffer_flush(batch);
> intel_batchbuffer_free(batch);
> }
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-04-26 14:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
2017-03-17 19:15 ` [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size Praveen Paneri
2017-03-20 9:48 ` Daniel Vetter
2017-03-21 8:20 ` Praveen Paneri
2017-03-17 19:15 ` [PATCH 2/7] lib/igt_fb: Add helper function for tile_to_mod Praveen Paneri
2017-03-17 19:15 ` [PATCH 3/7] lib/igt_draw: Add Y-tiling support Praveen Paneri
2017-03-17 19:15 ` [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method Praveen Paneri
2017-04-26 14:06 ` Paulo Zanoni [this message]
2017-03-17 19:15 ` [PATCH 5/7] tests/kms_draw_crc: add support for Y tiling Praveen Paneri
2017-03-17 19:15 ` [PATCH 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support Praveen Paneri
2017-04-26 14:02 ` Paulo Zanoni
2017-03-17 19:15 ` [PATCH 7/7] igt/kms_fbc_crc.c : Add Y-tile tests Praveen Paneri
2017-04-26 13:46 ` [PATCH 0/7] Add Y-tiling support into IGTs Paulo Zanoni
2017-04-26 14:51 ` Paulo Zanoni
2017-04-27 12:31 ` 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=1493215592.2504.134.camel@intel.com \
--to=paulo.r.zanoni@intel.com \
--cc=akash.goel@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.