All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: lucas.demarchi@intel.com
Subject: [igt-dev] [PATCH 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value
Date: Fri, 13 Jan 2023 14:40:40 +0530	[thread overview]
Message-ID: <20230113091041.27032-2-jeevan.b@intel.com> (raw)
In-Reply-To: <20230113091041.27032-1-jeevan.b@intel.com>

Use intel_get_uc_mocs instead of hardcoding to get table entry.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 lib/igt_draw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 975d65cd..bfe9cd50 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -36,6 +36,7 @@
 #include "i830_reg.h"
 #include "i915/gem_create.h"
 #include "i915/gem_mman.h"
+#include "i915/intel_mocs.h"
 
 #ifndef PAGE_ALIGN
 #ifndef PAGE_SIZE
@@ -703,7 +704,7 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 
 		intel_bb_out(ibb, XY_FAST_COLOR_BLT | blt_cmd_depth);
 		/* DG2 MOCS entry 2 is "UC - Non-Coherent; GO:Memory" */
-		intel_bb_out(ibb, blt_cmd_tiling | 2 << 21 | (pitch-1));
+		intel_bb_out(ibb, blt_cmd_tiling | intel_get_uc_mocs(fd) << 21 | (pitch-1));
 		intel_bb_out(ibb, (rect->y << 16) | rect->x);
 		intel_bb_out(ibb, ((rect->y + rect->h) << 16) | (rect->x + rect->w));
 		intel_bb_emit_reloc_fenced(ibb, dst->handle, 0,
-- 
2.19.1

  reply	other threads:[~2023-01-13  9:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13  9:10 [igt-dev] [PATCH 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B
2023-01-13  9:10 ` Jeevan B [this message]
2023-01-13 11:32   ` [igt-dev] [PATCH 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Zbigniew Kempczyński
2023-01-16 19:15   ` Kamil Konieczny
2023-01-18 10:12     ` B, Jeevan
2023-01-13  9:10 ` [igt-dev] [PATCH 2/2] lib/igt_draw: Add MOCS values for MTL Jeevan B
2023-01-13 11:30   ` Zbigniew Kempczyński
2023-01-18 10:15     ` B, Jeevan
2023-01-18 20:36       ` Lucas De Marchi
2023-01-13 11:32   ` Zbigniew Kempczyński
2023-01-13  9:46 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_draw: Change MOCS settings for MTL (rev9) Patchwork
2023-01-13 17:40 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-01-19 16:57 [igt-dev] [PATCH 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B
2023-01-19 16:57 ` [igt-dev] [PATCH 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B

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=20230113091041.27032-2-jeevan.b@intel.com \
    --to=jeevan.b@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lucas.demarchi@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.