[igt-dev] [PATCH i-g-t v2 3/3] tests/lima: Add initial tests for lima

Erico Nunes nunes.erico at gmail.com
Tue Jun 6 14:51:39 UTC 2023


Hi Kamil,

On Mon, Jun 5, 2023 at 1:18 PM Kamil Konieczny
<kamil.konieczny at linux.intel.com> wrote:
> > +             map = igt_lima_mmap_bo(fd, bo->handle, size, PROT_READ | PROT_WRITE);
> --------------- ^
> In your current implementation you can get NULL here.
>
> > +             memset(map, 0xd0, size);
> > +             munmap(map, size);
> > +             igt_lima_free_bo(fd, bo);
> > +
> > +             /* Now, allocate a BO on the other fd and make sure it doesn't
> > +              * have the old contents.
> > +              */
> > +             bo = igt_lima_gem_new(fd2, size);
> > +             map = igt_lima_mmap_bo(fd2, bo->handle, size, PROT_READ | PROT_WRITE);
> --------------- ^
> Same here, mey be NULL.
>
> > +             for (i = 0; i < size / 4; i++)
> -------------------------------------- ^
> It may be also sizeof(map[0]) instead of 4.

Thanks for the review. I'll send a v3 addressing these and the reviews
on previous patches in this series.
I just didn't do some of the changes pointed out here as I carried it
on as-is from the v3d/panfrost tests which I used as a reference. But
I can address they here for the initial lima tests.

Thanks

Erico


More information about the igt-dev mailing list