From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: petri.latvala@intel.com, swboyd@chromium.org,
igt-dev@lists.freedesktop.org, nganji@codeaurora.org,
seanpaul@chromium.org, quic_aravindh@quicinc.com,
quic_khsieh@quicinc.com
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_kms: commit only the primary plane which is prepared
Date: Wed, 23 Mar 2022 15:52:14 +0200 [thread overview]
Message-ID: <YjsmDuhyfj4l/C7s@intel.com> (raw)
In-Reply-To: <1647991289-19891-1-git-send-email-quic_abhinavk@quicinc.com>
On Tue, Mar 22, 2022 at 04:21:29PM -0700, Abhinav Kumar wrote:
> kms_atomic's test-only sub-test prepares only one primary plane
> but igt_plane_commit() tries to commit all the primary planes.
>
> For drivers having only one primary plane per display still
> work fine but when there is more than one primary plane, since
> FB_ID is not assigned for the second one, the API
> igt_primary_plane_commit_legacy() ends up calling the CRTC
> disable path incorrectly and hence failing the test.
>
> Since only one primary plane has been prepared, commit only
> that one by matching the index correctly.
>
> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> lib/igt_kms.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 34a2aa0..98a6e1b 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -3189,6 +3189,8 @@ static int igt_plane_commit(igt_plane_t *plane,
> enum igt_commit_style s,
> bool fail_on_error)
> {
> + igt_plane_t *plane_primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
> +
> if (pipe->display->first_commit || (s == COMMIT_UNIVERSAL &&
> igt_plane_is_prop_changed(plane, IGT_PLANE_ROTATION))) {
> int ret;
> @@ -3199,7 +3201,8 @@ static int igt_plane_commit(igt_plane_t *plane,
>
> if (plane->type == DRM_PLANE_TYPE_CURSOR && s == COMMIT_LEGACY) {
> return igt_cursor_commit_legacy(plane, pipe, fail_on_error);
> - } else if (plane->type == DRM_PLANE_TYPE_PRIMARY && s == COMMIT_LEGACY) {
> + } else if (plane->type == DRM_PLANE_TYPE_PRIMARY && s == COMMIT_LEGACY &&
> + (plane->index == plane_primary->index)) {
I think you should be able to simplify that to just
'plane == plane_primary && s == COMMIT_LEGACY'
> return igt_primary_plane_commit_legacy(plane, pipe,
> fail_on_error);
> } else {
> --
> 2.7.4
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-03-23 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 23:21 [igt-dev] [PATCH i-g-t] lib/igt_kms: commit only the primary plane which is prepared Abhinav Kumar
2022-03-23 0:20 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-03-23 9:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-03-23 13:52 ` Ville Syrjälä [this message]
2022-03-23 19:01 ` [igt-dev] [PATCH i-g-t] " Abhinav Kumar
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=YjsmDuhyfj4l/C7s@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nganji@codeaurora.org \
--cc=petri.latvala@intel.com \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_aravindh@quicinc.com \
--cc=quic_khsieh@quicinc.com \
--cc=seanpaul@chromium.org \
--cc=swboyd@chromium.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.