From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_panel_fitting: Fix plane scaling avoidance on gen7/gen8
Date: Mon, 2 Sep 2019 19:51:41 +0300 [thread overview]
Message-ID: <20190902165141.GY7482@intel.com> (raw)
In-Reply-To: <20190830223023.16396-1-matthew.d.roper@intel.com>
On Fri, Aug 30, 2019 at 03:30:23PM -0700, Matt Roper wrote:
> Most gen7 and gen8 platforms can't do plane scaling, so we need to
> ensure the test doesn't try to do plane scaling on those platforms. The
> legacy non-atomic subtest bakes these platform characteristics into the
> test itself since legacy modesetting interfaces don't provide a way to
> probe platform capabilities like atomic does.
>
> Maarten previously tried to address this with commit 24c5e0778
> ("tests/kms_panel_fitting: Do not use scaling on gen7 and gen8, v2."),
> but he augmented an existing test for gen9+pipeC which comes too late
> since we've already turned on the plane at that point. We can fix this
> by moving the test up higher; not only before we enable panel fitting,
> but also before we turn on the sprite.
>
> Note that this still isn't a great subtest since it's very
> Intel-specific, despite being part of a generic KMS test that's intended
> for all vendors. A future enhancement might be to try to probe the
> platform capabilities with a TEST_ONLY atomic operation before using the
> legacy interfaces to actually program them.
>
> While touching the code, I also added some slight restructuring, added
> additional comments, and broke up >80 char lines to add clarity to
> what's going on.
>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> tests/kms_panel_fitting.c | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index 491e429f..a942294b 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -131,11 +131,10 @@ static void test_panel_fitting(data_t *d)
> igt_fb_set_position(&d->fb2, d->plane2, 100, 100);
> igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d->fb2.height-200);
> igt_plane_set_position(d->plane2, 100, 100);
> - igt_plane_set_size(d->plane2, mode->hdisplay-200, mode->vdisplay-200);
> - igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> /*
> - * most of gen7 and all of gen8 doesn't support scaling at all.
> + * Most of gen7 and all of gen8 doesn't support plane scaling
> + * at all.
> *
> * gen9 pipe C has only 1 scaler shared with the crtc, which
> * means pipe scaling can't work simultaneously with panel
> @@ -144,9 +143,24 @@ static void test_panel_fitting(data_t *d)
> * Since this is the legacy path, userspace has to know about
> * the HW limitations, whereas atomic can ask.
> */
> - if (IS_GEN8(devid) || (IS_GEN7(devid) && !IS_IVYBRIDGE(devid)) ||
> + if (IS_GEN8(devid) ||
> + (IS_GEN7(devid) && !IS_IVYBRIDGE(devid)) ||
> (IS_GEN9(devid) && pipe == PIPE_C))
> - igt_plane_set_size(d->plane2, d->fb2.width-200, d->fb2.height-200);
> + /* same as visible area of fb => no scaling */
> + igt_plane_set_size(d->plane2,
> + d->fb2.width-200,
> + d->fb2.height-200);
> + else
> + /*
> + * different than visible area of fb => plane scaling
> + * active
> + */
> + igt_plane_set_size(d->plane2,
> + mode->hdisplay-200,
> + mode->vdisplay-200);
> +
> + /* Plane scaling active (if possible), pfit off */
> + igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> /* enable panel fitting along with sprite scaling */
> mode->hdisplay = 1024;
> --
> 2.20.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_panel_fitting: Fix plane scaling avoidance on gen7/gen8
Date: Mon, 2 Sep 2019 19:51:41 +0300 [thread overview]
Message-ID: <20190902165141.GY7482@intel.com> (raw)
In-Reply-To: <20190830223023.16396-1-matthew.d.roper@intel.com>
On Fri, Aug 30, 2019 at 03:30:23PM -0700, Matt Roper wrote:
> Most gen7 and gen8 platforms can't do plane scaling, so we need to
> ensure the test doesn't try to do plane scaling on those platforms. The
> legacy non-atomic subtest bakes these platform characteristics into the
> test itself since legacy modesetting interfaces don't provide a way to
> probe platform capabilities like atomic does.
>
> Maarten previously tried to address this with commit 24c5e0778
> ("tests/kms_panel_fitting: Do not use scaling on gen7 and gen8, v2."),
> but he augmented an existing test for gen9+pipeC which comes too late
> since we've already turned on the plane at that point. We can fix this
> by moving the test up higher; not only before we enable panel fitting,
> but also before we turn on the sprite.
>
> Note that this still isn't a great subtest since it's very
> Intel-specific, despite being part of a generic KMS test that's intended
> for all vendors. A future enhancement might be to try to probe the
> platform capabilities with a TEST_ONLY atomic operation before using the
> legacy interfaces to actually program them.
>
> While touching the code, I also added some slight restructuring, added
> additional comments, and broke up >80 char lines to add clarity to
> what's going on.
>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> tests/kms_panel_fitting.c | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index 491e429f..a942294b 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -131,11 +131,10 @@ static void test_panel_fitting(data_t *d)
> igt_fb_set_position(&d->fb2, d->plane2, 100, 100);
> igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d->fb2.height-200);
> igt_plane_set_position(d->plane2, 100, 100);
> - igt_plane_set_size(d->plane2, mode->hdisplay-200, mode->vdisplay-200);
> - igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> /*
> - * most of gen7 and all of gen8 doesn't support scaling at all.
> + * Most of gen7 and all of gen8 doesn't support plane scaling
> + * at all.
> *
> * gen9 pipe C has only 1 scaler shared with the crtc, which
> * means pipe scaling can't work simultaneously with panel
> @@ -144,9 +143,24 @@ static void test_panel_fitting(data_t *d)
> * Since this is the legacy path, userspace has to know about
> * the HW limitations, whereas atomic can ask.
> */
> - if (IS_GEN8(devid) || (IS_GEN7(devid) && !IS_IVYBRIDGE(devid)) ||
> + if (IS_GEN8(devid) ||
> + (IS_GEN7(devid) && !IS_IVYBRIDGE(devid)) ||
> (IS_GEN9(devid) && pipe == PIPE_C))
> - igt_plane_set_size(d->plane2, d->fb2.width-200, d->fb2.height-200);
> + /* same as visible area of fb => no scaling */
> + igt_plane_set_size(d->plane2,
> + d->fb2.width-200,
> + d->fb2.height-200);
> + else
> + /*
> + * different than visible area of fb => plane scaling
> + * active
> + */
> + igt_plane_set_size(d->plane2,
> + mode->hdisplay-200,
> + mode->vdisplay-200);
> +
> + /* Plane scaling active (if possible), pfit off */
> + igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> /* enable panel fitting along with sprite scaling */
> mode->hdisplay = 1024;
> --
> 2.20.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-09-02 16:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 22:30 [igt-dev] [PATCH i-g-t] tests/kms_panel_fitting: Fix plane scaling avoidance on gen7/gen8 Matt Roper
2019-08-30 22:30 ` Matt Roper
2019-08-30 23:09 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-08-31 23:15 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-02 16:51 ` Ville Syrjälä [this message]
2019-09-02 16:51 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2019-09-02 21:10 ` Matt Roper
2019-09-02 21:10 ` Matt Roper
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=20190902165141.GY7482@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@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 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.