From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <20230526130001.71730-1-nunes.erico@gmail.com> <20230526130001.71730-4-nunes.erico@gmail.com> <20230605111738.stcgxju5kjqkdjyi@kamilkon-desk1> In-Reply-To: <20230605111738.stcgxju5kjqkdjyi@kamilkon-desk1> From: Erico Nunes Date: Tue, 6 Jun 2023 16:51:39 +0200 Message-ID: To: Kamil Konieczny , igt-dev@lists.freedesktop.org, Erico Nunes , anarsoul@gmail.com, yuq825@gmail.com, lima@lists.freedesktop.org, Petri Latvala Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [igt-dev] [PATCH i-g-t v2 3/3] tests/lima: Add initial tests for lima List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Hi Kamil, On Mon, Jun 5, 2023 at 1:18=E2=80=AFPM Kamil Konieczny wrote: > > + map =3D 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 do= esn't > > + * have the old contents. > > + */ > > + bo =3D igt_lima_gem_new(fd2, size); > > + map =3D igt_lima_mmap_bo(fd2, bo->handle, size, PROT_READ= | PROT_WRITE); > --------------- ^ > Same here, mey be NULL. > > > + for (i =3D 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