[igt-dev] [PATCH i-g-t v2] tests: Add variable refresh rate tests

Daniel Vetter daniel.vetter at ffwll.ch
Tue Apr 14 10:52:43 UTC 2020


> +/* Performs an asynchronous non-blocking page-flip on a pipe. */
> +static int
> +do_flip(data_t *data, enum pipe pipe_id, igt_fb_t *fb)
> +{
> +       igt_pipe_t *pipe = &data->display.pipes[pipe_id];
> +       int ret;
> +
> +       igt_set_timeout(1, "Scheduling page flip\n");
> +
> +       /*
> +        * Only the legacy flip ioctl supports async flips.
> +        * It's also non-blocking, but returns -EBUSY if flipping too fast.
> +        * 2x monitor tests will need async flips in the atomic API.
> +        */

Uh, if this is also how your amdgpu userspace works we've just fucked
up the uapi for good :-/

FLIP_ASYNC = please tear

VRR = please don't strictly obey the vrefresh, but very much dont tear

Tying them together means we're deeply mixing things up.

Also amdgpu is still using it's own flip implementation, which makes
me wonder whether VRR would even work with atomic, or whether that's
also butchered ...

How I thought this stuff was supposed to work:

- VRR_ENABLED controls whether we do VRR
- since atomic is awesome you can change that on every frame
- VRR has nothing to do with ASYNC

So a) do I read this correctly b) how do we get out of this hole (and
maybe c) amdgpu really needs to remove
amdgpu_display_crtc_page_flip_target asap).

Manasi pointed this out to me, so adding a few more people here.
-Daniel

> +       do {
> +               ret = drmModePageFlip(data->drm_fd, pipe->crtc_id,
> +                                     fb->fb_id,
> +                                     DRM_MODE_PAGE_FLIP_EVENT |
> +                                     DRM_MODE_PAGE_FLIP_ASYNC,
> +                                     data);
> +       } while (ret == -EBUSY);
> +
> +       igt_assert_eq(ret, 0);
> +       igt_reset_timeout();
> +
> +       return 0;
> +}
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the igt-dev mailing list