[igt-dev] [PATCH i-g-t 44/50] tests/kms_cursor_legacy: Adopt to use allocator
Rodrigo Siqueira
Rodrigo.Siqueira at amd.com
Tue Aug 3 15:05:57 UTC 2021
On 07/30, Zbigniew Kempczyński wrote:
> On Fri, Jul 23, 2021 at 10:26:21AM -0400, Rodrigo Siqueira wrote:
> > Hi Kempczyński,
> >
> > I tried part of this series in an AMD device, and it introduces a
> > regression in the basic-flip-before-cursor-legacy (probably other tests
> > will start to fail on AMD). For the new version, could you split this
> > series in two? One dedicated to generic changes and kms tests, and the
> > other focused on i915? This will make it easier to review.
>
> Hi Rodrigo.
>
> Change in kms_cursor_legacy adds supporting allocator in spinner code
> (.ahnd = ahnd). get_reloc_ahnd() asks for supporting relocations
> in i915 so maybe this is root cause of the failure.
>
> Which subtests from kms_cursor_legacy you're using? Could you verify
> if you'll replace:
I tested basic-flip-before-cursor-legacy. However, I did not tested
everything because this test take a long time.
>
> uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0);
>
> to
>
> uint64_t ahnd = (flags & BASIC_BUSY) ? get_reloc_ahnd(display->drm_fd, 0) : 0;
>
> issue will be solved?
Yes, that fixed the issue when I added in the basic_flip_cursor
function.
Thanks
Siqueira
> --
> Zbigniew
>
>
> >
> > Thanks
> > Siqueira
> >
> > On 07/22, Zbigniew Kempczyński wrote:
> > > For newer gens we're not able to rely on relocations. Adopt to use
> > > offsets acquired from the allocator.
> > >
> > > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > > Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
> > > Cc: Petri Latvala <petri.latvala at intel.com>
> > > ---
> > > tests/kms_cursor_legacy.c | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> > > index 75a822c4e..4f96c880e 100644
> > > --- a/tests/kms_cursor_legacy.c
> > > +++ b/tests/kms_cursor_legacy.c
> > > @@ -517,6 +517,7 @@ static void basic_flip_cursor(igt_display_t *display,
> > > struct igt_fb fb_info, cursor_fb, cursor_fb2, argb_fb;
> > > unsigned vblank_start;
> > > enum pipe pipe = find_connected_pipe(display, false);
> > > + uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0);
> > > igt_spin_t *spin;
> > > int i, miss1 = 0, miss2 = 0, delta;
> > >
> > > @@ -548,6 +549,7 @@ static void basic_flip_cursor(igt_display_t *display,
> > > spin = NULL;
> > > if (flags & BASIC_BUSY)
> > > spin = igt_spin_new(display->drm_fd,
> > > + .ahnd = ahnd,
> > > .dependency = fb_info.gem_handle);
> > >
> > > /* Start with a synchronous query to align with the vblank */
> > > @@ -631,6 +633,7 @@ static void basic_flip_cursor(igt_display_t *display,
> > > igt_remove_fb(display->drm_fd, &argb_fb);
> > > if (cursor_fb2.gem_handle)
> > > igt_remove_fb(display->drm_fd, &cursor_fb2);
> > > + put_ahnd(ahnd);
> > > }
> > >
> > > static int
> > > @@ -1319,6 +1322,7 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
> > > igt_pipe_t *pipe_connected = &display->pipes[pipe];
> > > igt_plane_t *plane_primary = igt_pipe_get_plane_type(pipe_connected, DRM_PLANE_TYPE_PRIMARY);
> > > igt_crc_t crcs[2], test_crc;
> > > + uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0);
> > >
> > > if (atomic)
> > > igt_require(display->is_atomic);
> > > @@ -1366,6 +1370,7 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
> > > igt_spin_t *spin;
> > >
> > > spin = igt_spin_new(display->drm_fd,
> > > + .ahnd = ahnd,
> > > .dependency = fb_info[1].gem_handle);
> > >
> > > vblank_start = kmstest_get_vblank(display->drm_fd, pipe, DRM_VBLANK_NEXTONMISS);
> > > @@ -1394,6 +1399,7 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
> > > igt_remove_fb(display->drm_fd, &fb_info[1]);
> > > igt_remove_fb(display->drm_fd, &fb_info[0]);
> > > igt_remove_fb(display->drm_fd, &cursor_fb);
> > > + put_ahnd(ahnd);
> > > }
> > >
> > > igt_main
> > > --
> > > 2.26.0
> > >
> > > _______________________________________________
> > > igt-dev mailing list
> > > igt-dev at lists.freedesktop.org
> > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Figt-dev&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7C3dcef109673e465caaac08d9530f235f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637632146746647908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gpapeZA1PhJE6kvBFEU%2BzrVAIz4OnDByegc5pJBa6Ms%3D&reserved=0
> >
> > --
> > Rodrigo Siqueira
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsiqueira.tech%2F&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7C3dcef109673e465caaac08d9530f235f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637632146746647908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ycmN5bKNTN9u0Xl1ELOSF%2BITbQO4FlDhf7%2Bn1rGi%2BBo%3D&reserved=0
--
Rodrigo Siqueira
https://siqueira.tech
More information about the igt-dev
mailing list