Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value

Lucas De Marchi
2023-01-13T16:25:14Z

On Fri, Jan 13, 2023 at 11:52:32AM +0530, Jeevan B wrote:
>Use intel_get_uc_mocs instead of hardcoding to get table entry.
>
>Signed-off-by: Jeevan B <jeevan.b@intel.com>

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Lucas De Marchi

>---
> lib/igt_draw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/lib/igt_draw.c b/lib/igt_draw.c
>index 975d65cd..d8f4596a 100644
>--- a/lib/igt_draw.c
>+++ b/lib/igt_draw.c
>@@ -703,7 +703,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
>