From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 1/4] tests/kms_plane_scaling: Add support for testing AMDGPU
Date: Tue, 13 Nov 2018 19:08:50 +0200 [thread overview]
Message-ID: <20181113170850.GH9144@intel.com> (raw)
In-Reply-To: <72a7cc17-b404-f3df-4a04-95c1fce49679@amd.com>
On Tue, Nov 13, 2018 at 05:00:24PM +0000, Kazlauskas, Nicholas wrote:
> On 11/13/18 11:57 AM, Ville Syrjälä wrote:
> > On Tue, Nov 13, 2018 at 10:23:47AM -0500, Nicholas Kazlauskas wrote:
> >> The plane_scaling subtests are capable of running on AMDGPU when
> >> not using i915 specific tiling formats and when the test only requires
> >> one scaler per pipe.
> >
> > I don't see any specific reason why we'd want to use tiled formats on
> > i915 either. The only exception is the rotation test which requires
> > Y tiling for 90/270 degrees. I think everything else should be fine
> > with linear.
>
> Sure, I don't mind swapping everything to linear on everything but the
> rotation tests as part of a v2 then if it's that fine by you.
Yeah, I can't immediately see a reason against that. And if I'm
wrong CI will hopefully explode :)
>
> Nicholas Kazlauskas
>
> >
> >>
> >> This patch removes the forced i915 devid and gen checks from non i915
> >> devices. It also adds logic for getting the number of scalers per pipe
> >> in a way that doesn't only depend on devid. One scaler per pipe is
> >> assumed for AMDGPU.
> >>
> >> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> >> ---
> >> tests/kms_plane_scaling.c | 46 ++++++++++++++++++++++++---------------
> >> 1 file changed, 29 insertions(+), 17 deletions(-)
> >>
> >> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> >> index 773162ec..ee29f11e 100644
> >> --- a/tests/kms_plane_scaling.c
> >> +++ b/tests/kms_plane_scaling.c
> >> @@ -46,11 +46,14 @@ typedef struct {
> >> igt_plane_t *plane4;
> >> } data_t;
> >>
> >> -static int get_num_scalers(uint32_t devid, enum pipe pipe)
> >> +static int get_num_scalers(data_t* d, enum pipe pipe)
> >> {
> >> - igt_require(intel_gen(devid) >= 9);
> >> + if (!is_i915_device(d->drm_fd))
> >> + return 1;
> >> +
> >> + igt_require(intel_gen(d->devid) >= 9);
> >>
> >> - if (intel_gen(devid) >= 10)
> >> + if (intel_gen(d->devid) >= 10)
> >> return 2;
> >> else if (pipe != PIPE_C)
> >> return 2;
> >> @@ -79,6 +82,8 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
> >> igt_plane_t *plane, drmModeModeInfo *mode)
> >> {
> >> igt_display_t *display = &data->display;
> >> + uint64_t tiling = is_i915_device(data->drm_fd) ?
> >> + LOCAL_I915_FORMAT_MOD_X_TILED : LOCAL_DRM_FORMAT_MOD_NONE;
> >>
> >> cleanup_crtc(data);
> >>
> >> @@ -90,7 +95,7 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
> >> /* allocate fb for plane 1 */
> >> igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
> >> DRM_FORMAT_XRGB8888,
> >> - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
> >> + tiling,
> >> &data->fb[0]);
> >>
> >> igt_plane_set_fb(plane, &data->fb[0]);
> >> @@ -170,6 +175,8 @@ static void test_scaler_with_rotation_pipe(data_t *d, enum pipe pipe,
> >> {
> >> igt_display_t *display = &d->display;
> >> igt_plane_t *plane;
> >> + uint64_t tiling = is_i915_device(d->drm_fd) ?
> >> + LOCAL_I915_FORMAT_MOD_Y_TILED : LOCAL_DRM_FORMAT_MOD_NONE;
> >>
> >> igt_output_set_pipe(output, pipe);
> >> for_each_plane_on_pipe(display, pipe, plane) {
> >> @@ -183,8 +190,8 @@ static void test_scaler_with_rotation_pipe(data_t *d, enum pipe pipe,
> >> if (igt_fb_supported_format(format) &&
> >> can_rotate(d, format))
> >> check_scaling_pipe_plane_rot(d, plane, format,
> >> - LOCAL_I915_FORMAT_MOD_Y_TILED,
> >> - pipe, output, rot);
> >> + tiling, pipe,
> >> + output, rot);
> >> }
> >> }
> >> }
> >> @@ -264,6 +271,8 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
> >> igt_display_t *display = &d->display;
> >> drmModeModeInfo *mode;
> >> int primary_plane_scaling = 0; /* For now */
> >> + uint64_t tiling = is_i915_device(display->drm_fd) ?
> >> + LOCAL_I915_FORMAT_MOD_X_TILED : LOCAL_DRM_FORMAT_MOD_NONE;
> >>
> >> mode = igt_output_get_mode(output);
> >>
> >> @@ -273,13 +282,13 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
> >>
> >> igt_create_color_pattern_fb(display->drm_fd, 600, 600,
> >> DRM_FORMAT_XRGB8888,
> >> - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
> >> + tiling,
> >> .5, .5, .5, &d->fb[1]);
> >>
> >> igt_create_pattern_fb(d->drm_fd,
> >> mode->hdisplay, mode->vdisplay,
> >> DRM_FORMAT_XRGB8888,
> >> - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
> >> + tiling,
> >> &d->fb[2]);
> >>
> >> if (primary_plane_scaling) {
> >> @@ -425,7 +434,7 @@ test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe, igt_outpu
> >> {
> >> drmModeModeInfo *mode;
> >>
> >> - igt_require(get_num_scalers(d->devid, pipe) >= 2);
> >> + igt_require(get_num_scalers(d, pipe) >= 2);
> >>
> >> mode = igt_output_get_mode(output);
> >> d->plane1 = &d->display.pipes[pipe].planes[0];
> >> @@ -480,6 +489,8 @@ static void test_scaler_with_multi_pipe_plane(data_t *d)
> >> igt_output_t *output1, *output2;
> >> drmModeModeInfo *mode1, *mode2;
> >> enum pipe pipe1, pipe2;
> >> + uint64_t tiling = is_i915_device(display->drm_fd) ?
> >> + LOCAL_I915_FORMAT_MOD_Y_TILED : LOCAL_DRM_FORMAT_MOD_NONE;
> >>
> >> cleanup_crtc(d);
> >>
> >> @@ -492,28 +503,28 @@ static void test_scaler_with_multi_pipe_plane(data_t *d)
> >> igt_output_set_pipe(output2, pipe2);
> >>
> >> d->plane1 = igt_output_get_plane(output1, 0);
> >> - d->plane2 = get_num_scalers(d->devid, pipe1) >= 2 ? igt_output_get_plane(output1, 1) : NULL;
> >> + d->plane2 = get_num_scalers(d, pipe1) >= 2 ? igt_output_get_plane(output1, 1) : NULL;
> >> d->plane3 = igt_output_get_plane(output2, 0);
> >> - d->plane4 = get_num_scalers(d->devid, pipe2) >= 2 ? igt_output_get_plane(output2, 1) : NULL;
> >> + d->plane4 = get_num_scalers(d, pipe2) >= 2 ? igt_output_get_plane(output2, 1) : NULL;
> >>
> >> mode1 = igt_output_get_mode(output1);
> >> mode2 = igt_output_get_mode(output2);
> >>
> >> igt_create_pattern_fb(d->drm_fd, 600, 600,
> >> DRM_FORMAT_XRGB8888,
> >> - LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb[0]);
> >> + tiling, &d->fb[0]);
> >>
> >> igt_create_pattern_fb(d->drm_fd, 500, 500,
> >> DRM_FORMAT_XRGB8888,
> >> - LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb[1]);
> >> + tiling, &d->fb[1]);
> >>
> >> igt_create_pattern_fb(d->drm_fd, 700, 700,
> >> DRM_FORMAT_XRGB8888,
> >> - LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb[2]);
> >> + tiling, &d->fb[2]);
> >>
> >> igt_create_pattern_fb(d->drm_fd, 400, 400,
> >> DRM_FORMAT_XRGB8888,
> >> - LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb[3]);
> >> + tiling, &d->fb[3]);
> >>
> >> igt_plane_set_fb(d->plane1, &d->fb[0]);
> >> if (d->plane2)
> >> @@ -545,7 +556,8 @@ igt_main
> >> data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> >> igt_require_pipe_crc(data.drm_fd);
> >> igt_display_require(&data.display, data.drm_fd);
> >> - data.devid = intel_get_drm_devid(data.drm_fd);
> >> + data.devid = is_i915_device(data.drm_fd) ?
> >> + intel_get_drm_devid(data.drm_fd) : 0;
> >> igt_require(data.display.is_atomic);
> >> }
> >>
> >> @@ -555,7 +567,7 @@ igt_main
> >> igt_fixture {
> >> igt_display_require_output_on_pipe(&data.display, pipe);
> >>
> >> - igt_require(get_num_scalers(data.devid, pipe) > 0);
> >> + igt_require(get_num_scalers(&data, pipe) > 0);
> >> }
> >>
> >> igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))
> >> --
> >> 2.17.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
next prev parent reply other threads:[~2018-11-13 17:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 15:23 [igt-dev] [PATCH i-g-t 1/4] tests/kms_plane_scaling: Add support for testing AMDGPU Nicholas Kazlauskas
2018-11-13 15:23 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_plane_multiple: Add tiled-none plane position subtests Nicholas Kazlauskas
2018-11-13 16:58 ` Ville Syrjälä
2018-11-13 17:02 ` Kazlauskas, Nicholas
2018-11-13 17:15 ` Ville Syrjälä
2018-11-27 18:36 ` Kazlauskas, Nicholas
2018-11-27 19:00 ` Ville Syrjälä
2018-11-13 15:23 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_plane_lowres: Only test i915 features on i915 Nicholas Kazlauskas
2018-11-13 17:00 ` Ville Syrjälä
2018-11-13 15:23 ` [igt-dev] [PATCH i-g-t 4/4] tests: Enable plane tests for AMDGPU Nicholas Kazlauskas
2018-11-13 16:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] tests/kms_plane_scaling: Add support for testing AMDGPU Patchwork
2018-11-13 16:57 ` [igt-dev] [PATCH i-g-t 1/4] " Ville Syrjälä
2018-11-13 17:00 ` Kazlauskas, Nicholas
2018-11-13 17:08 ` Ville Syrjälä [this message]
2018-11-13 19:51 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/4] " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2018-11-28 14:56 [igt-dev] [PATCH i-g-t 1/4] " Nicholas Kazlauskas
2018-11-30 13:51 ` Ville Syrjälä
2018-11-30 13:55 ` Kazlauskas, Nicholas
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=20181113170850.GH9144@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=igt-dev@lists.freedesktop.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.