[igt-dev] [PATCH 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value
B, Jeevan
jeevan.b at intel.com
Wed Jan 18 10:12:54 UTC 2023
> -----Original Message-----
> From: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Sent: Tuesday, January 17, 2023 12:45 AM
> To: igt-dev at lists.freedesktop.org
> Cc: B, Jeevan <jeevan.b at intel.com>; Kempczynski, Zbigniew
> <zbigniew.kempczynski at intel.com>; De Marchi, Lucas
> <lucas.demarchi at intel.com>; kamil.konieczny at linux.intel.com
> Subject: Re: [PATCH 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS
> value
>
> Hi,
>
> On 2023-01-13 at 14:40:40 +0530, Jeevan B wrote:
> > Use intel_get_uc_mocs instead of hardcoding to get table entry.
> >
> > Signed-off-by: Jeevan B <jeevan.b at 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" */
> ---------------- ^
> Please remove this old comment from here as after change it will start working
> for DG1 and other archs.
>
> Btw this is independent from 2/2 and imho should be first.
Hi,
I agree with Kamil, This patch should be 1/2.
Thanks
Jeevan B
>
> Regards,
> Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
>
> > - 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
> >
More information about the igt-dev
mailing list