[igt-dev] [PATCH i-g-t 2/9] tests/kms_atomic: Add the test for CRTC_ID/FB_ID mismatch.
Mika Kahola
mika.kahola at intel.com
Mon Feb 5 10:53:23 UTC 2018
On Thu, 2018-02-01 at 16:39 +0100, Maarten Lankhorst wrote:
> This check was missing, and caused a WARN_ON that dates back to
> the original design of atomic.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> Sent to see if it passes shards, doesn't need to be reviewed further.
I reviewed it anyway
Reviewed-by: Mika Kahola <mika.kahola at intel.com>
>
> tests/kms_atomic.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index 9204d7e18698..2e21b53b8c87 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -485,6 +485,10 @@ static void plane_invalid_params(igt_pipe_t
> *pipe,
> igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, pipe-
> >values[IGT_CRTC_MODE_ID]);
> plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
>
> + /* Valid, but invalid because CRTC_ID is set. */
> + igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, 0);
> + plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> +
> igt_plane_set_fb(plane, fb);
> plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> @@ -501,6 +505,10 @@ static void plane_invalid_params(igt_pipe_t
> *pipe,
> igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, pipe-
> >values[IGT_CRTC_MODE_ID]);
> plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
>
> + /* Valid, but invalid because FB_ID is set. */
> + igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, 0);
> + plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> +
> igt_plane_set_fb(plane, fb);
> plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
--
Mika Kahola - Intel OTC
More information about the igt-dev
mailing list