[igt-dev] [PATCH i-g-t 2/2] tests/kms_lease: replacing drmModeAtomicCommit
Petri Latvala
petri.latvala at intel.com
Mon Dec 20 13:39:42 UTC 2021
On Mon, Dec 20, 2021 at 03:11:53PM +0530, Ananya Sharma wrote:
> Signed-off-by: Ananya Sharma <ananya.sharma at intel.com>
> ---
> tests/kms_lease.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index c5c88e14..db433958 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -477,7 +477,7 @@ static void atomic_implicit_crtc(data_t *data)
> igt_assert(ret >= 0);
>
> /* sanity check */
> - ret = drmModeAtomicCommit(data->master.fd, req, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
> + ret = igt_display_commit2(&data->master.display, COMMIT_ATOMIC);
> igt_assert(ret == 0 || ret == -EINVAL);
>
> ret = drmModeAtomicCommit(mcl.fd, req, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
> @@ -492,7 +492,7 @@ static void atomic_implicit_crtc(data_t *data)
> igt_assert(ret >= 0);
>
> /* sanity check */
> - ret = drmModeAtomicCommit(data->master.fd, req, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
> + ret = igt_display_commit2(&data->master.display, COMMIT_ATOMIC);
If you wanted to replace the calls with an equivalent igt wrapper,
these are not equivalent. You dropped TEST_ONLY from these calls.
--
Petri Latvala
More information about the igt-dev
mailing list