From: Mika Kahola <mika.kahola@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 04/14] lib/igt_kms: Allow setting any plane property through the universal path
Date: Thu, 19 Oct 2017 14:04:39 +0300 [thread overview]
Message-ID: <1508411079.3274.126.camel@intel.com> (raw)
In-Reply-To: <20171012115435.18880-5-maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
On Thu, 2017-10-12 at 13:54 +0200, Maarten Lankhorst wrote:
> Blacklist some explicit atomic properties. We could theoretically set
> them but that's not what the legacy path is for. :)
>
> When adding new properties, this means we could test those through
> the legacy commit.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> lib/igt_kms.c | 39 +++++++++++++++++++++++++++++++++------
> 1 file changed, 33 insertions(+), 6 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 02de39b8fc7f..be89632547e5 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -2097,7 +2097,22 @@ igt_atomic_prepare_plane_commit(igt_plane_t
> *plane, igt_pipe_t *pipe,
> }
> }
>
> -
> +/*
> + * Properties that can be changed through legacy SetProperty:
> + * - Obviously not the XYWH SRC/CRTC coordinates.
> + * - Not CRTC_ID or FENCE_ID, done through SetPlane.
> + * - Can't set IN_FENCE_FD, that would be silly.
> + *
> + * Theoretically the above can all be set through the legacy path
> + * with the atomic cap set, but that's not how our legacy plane
> + * commit behaves, so blacklist it by default.
> + */
> +#define LEGACY_PLANE_COMMIT_MASK \
> + (((1ULL << IGT_NUM_PLANE_PROPS) - 1) & \
> + ~(IGT_PLANE_COORD_CHANGED_MASK | \
> + (1ULL << IGT_PLANE_FB_ID) | \
> + (1ULL << IGT_PLANE_CRTC_ID) | \
> + (1ULL << IGT_PLANE_IN_FENCE_FD)))
>
> /*
> * Commit position and fb changes to a DRM plane via the SetPlane
> ioctl; if the
> @@ -2111,7 +2126,7 @@ static int igt_drm_plane_commit(igt_plane_t
> *plane,
> {
> igt_display_t *display = pipe->display;
> uint32_t fb_id, crtc_id;
> - int ret;
> + int ret, i;
> uint32_t src_x;
> uint32_t src_y;
> uint32_t src_w;
> @@ -2120,6 +2135,7 @@ static int igt_drm_plane_commit(igt_plane_t
> *plane,
> int32_t crtc_y;
> uint32_t crtc_w;
> uint32_t crtc_h;
> + uint64_t changed_mask;
> bool setplane =
> igt_plane_is_prop_changed(plane, IGT_PLANE_FB_ID) ||
> plane->changed & IGT_PLANE_COORD_CHANGED_MASK;
> @@ -2184,10 +2200,21 @@ static int igt_drm_plane_commit(igt_plane_t
> *plane,
> CHECK_RETURN(ret, fail_on_error);
> }
>
> - if (igt_plane_is_prop_changed(plane, IGT_PLANE_ROTATION)) {
> + changed_mask = plane->changed & LEGACY_PLANE_COMMIT_MASK;
> +
> + for (i = 0; i < IGT_NUM_PLANE_PROPS; i++) {
> + if (!(changed_mask & (1 << i)))
> + continue;
> +
> + LOG(display, "SetProp plane %s.%d \"%s\" to
> 0x%"PRIx64"/%"PRIi64"\n",
> + kmstest_pipe_name(pipe->pipe), plane->index,
> igt_plane_prop_names[i],
> + plane->values[i], plane->values[i]);
> +
> + igt_assert(plane->props[i]);
> +
> ret = igt_plane_set_property(plane,
> - plane-
> >props[IGT_PLANE_ROTATION],
> - plane-
> >values[IGT_PLANE_ROTATION]);
> + plane->props[i],
> + plane->values[i]);
>
> CHECK_RETURN(ret, fail_on_error);
> }
> @@ -2555,7 +2582,7 @@ display_commit_changed(igt_display_t *display,
> enum igt_commit_style s)
> if (s != COMMIT_LEGACY ||
> !(plane->type ==
> DRM_PLANE_TYPE_PRIMARY ||
> plane->type ==
> DRM_PLANE_TYPE_CURSOR))
> - igt_plane_clear_prop_changed
> (plane, IGT_PLANE_ROTATION);
> + plane->changed &=
> ~LEGACY_PLANE_COMMIT_MASK;
> }
> }
> }
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-19 11:03 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 11:54 [PATCH i-g-t v2 00/14] lib/igt_kms: Rewrite property handling to better match atomic Maarten Lankhorst
2017-10-12 11:54 ` [PATCH i-g-t v2 01/14] lib/igt_kms: Rework connector properties to be more atomic, v2 Maarten Lankhorst
2017-10-12 11:54 ` [PATCH i-g-t v2 02/14] lib/igt_kms: Rework plane properties to be more atomic, v5 Maarten Lankhorst
2017-10-19 9:08 ` Mika Kahola
2017-10-19 9:44 ` Maarten Lankhorst
2017-10-20 8:03 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 03/14] lib/igt_kms: Rework pipe properties to be more atomic, v7 Maarten Lankhorst
2017-10-19 10:28 ` Mika Kahola
2018-03-05 14:37 ` Maxime Ripard
2018-03-06 13:41 ` Daniel Vetter
2018-03-06 13:47 ` Maarten Lankhorst
2017-10-12 11:54 ` [PATCH i-g-t v2 04/14] lib/igt_kms: Allow setting any plane property through the universal path Maarten Lankhorst
2017-10-19 11:04 ` Mika Kahola [this message]
2017-10-12 11:54 ` [PATCH i-g-t v2 05/14] lib/igt_kms: Allow setting any output property through the !atomic paths Maarten Lankhorst
2017-10-20 9:38 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 06/14] lib/igt_kms: Export property blob functions for output/pipe/plane, v2 Maarten Lankhorst
2017-10-19 11:24 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 07/14] lib/igt_kms: Unexport broadcast rgb API Maarten Lankhorst
2017-10-19 11:28 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 08/14] lib/igt_kms: Add igt_$obj_has_prop functions Maarten Lankhorst
2017-10-12 15:33 ` [PATCH i-g-t v2] lib/igt_kms: Add igt_$obj_has_prop functions, v2 Maarten Lankhorst
2017-10-19 12:06 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 09/14] lib/igt_kms: Add igt_$obj_get_prop functions Maarten Lankhorst
2017-10-19 12:58 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 10/14] lib/igt_kms: Remove igt_pipe_get_property Maarten Lankhorst
2017-10-19 13:18 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 11/14] lib/igt_kms: Remove igt_crtc_set_background() Maarten Lankhorst
2017-10-20 6:33 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 12/14] tests/kms_color: Rework tests slightly to work better with new atomic api Maarten Lankhorst
2017-10-20 7:14 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 13/14] tests/chamelium: Remove reliance on output->config.pipe Maarten Lankhorst
2017-10-20 7:15 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 14/14] tests/kms_atomic: Convert/rewrite tests to use igt_kms framework Maarten Lankhorst
2017-10-12 15:33 ` [PATCH i-g-t v2] tests/kms_atomic: Convert/rewrite tests to use igt_kms framework, v2 Maarten Lankhorst
2017-10-20 10:02 ` Mika Kahola
2017-10-20 10:08 ` Maarten Lankhorst
2017-10-20 10:16 ` Mika Kahola
2017-10-20 11:43 ` Maarten Lankhorst
2017-10-12 12:28 ` ✓ Fi.CI.BAT: success for lib/igt_kms: Rewrite property handling to better match atomic. (rev4) Patchwork
2017-10-12 15:01 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-10-12 16:04 ` ✓ Fi.CI.BAT: success for lib/igt_kms: Rewrite property handling to better match atomic. (rev6) Patchwork
2017-10-12 23:47 ` ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508411079.3274.126.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox