All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Jessica Zhang <quic_jesszhan@quicinc.com>, igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [v4 4/9] tests/kms_plane_scaling: Downscaling each plane
Date: Thu, 17 Feb 2022 17:45:57 +0530	[thread overview]
Message-ID: <f477c5f7-be29-bd08-41b9-ac802dc9ca30@intel.com> (raw)
In-Reply-To: <a85c6701-43ad-4b25-6184-8798e8db2e2d@quicinc.com>

Hi Jessica/Petri,

Sorry missed your mail.

Do you think we should drop upscaling and downscaling single plane tests 
from
my series
https://patchwork.freedesktop.org/series/98333/ ?
That should be covered by your tests?

What do you think?

On 16-Feb-22 6:15 AM, Jessica Zhang wrote:
> 
> 
> On 2/15/2022 4:23 AM, Swati Sharma wrote:
>> Subtest for testing downscaling for each plane
>> individually (checked 1 plane per "class" like
>> we do in other tests).
>>
>> v2: -set modifier as LINEAR (Ville)
>>      -shared code for upscaling and downscaling tests (Ville)
>>      -removed num_scaler() check and added try_commit() (Ville)
>>
>> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> 
> Hi Swati,
> 
> FYI, Petri and I have been working on a similar patch: [1][2]
> 
> For the latest version we've modified `check_scaling_pipe_plane_rot` so 
> that it takes in a custom buffer height/width and created multiple 
> subtests for different scaling factors.
> 
> I see that you've added tests for both upscaling and downscaling that do 
> something similar. Maybe our changes to `check_scaling_pipe_plane_rot` 
> can be useful for your series to reduce redundant code in both the 
> upscale and downscale cases? Let me know your thoughts on this.
> 
> Thanks,
> 
> Jessica Zhang
> 
> [1] latest version: 
> https://patchwork.freedesktop.org/patch/470921/?series=99364&rev=2
> [2] earlier version: 
> https://patchwork.freedesktop.org/patch/470856/?series=97584&rev=5
> 
>> ---
>>   tests/kms_plane_scaling.c | 55 ++++++++++++++++++++++++++++++++++++++-
>>   1 file changed, 54 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
>> index 39f2de3c..e960a6c5 100644
>> --- a/tests/kms_plane_scaling.c
>> +++ b/tests/kms_plane_scaling.c
>> @@ -32,6 +32,7 @@ IGT_TEST_DESCRIPTION("Test display plane scaling");
>>   /* Test flags. */
>>   enum {
>>       TEST_UPSCALING = 1 << 0,
>> +    TEST_DOWNSCALING = 1 << 1,
>>   };
>>   typedef struct {
>> @@ -266,6 +267,48 @@ __test_plane_upscaling(data_t *d, igt_plane_t 
>> *plane,
>>       igt_skip_on_f(ret == -EINVAL, "Scaling op not supported\n");
>>   }
>> +static void
>> +__test_plane_downscaling(data_t *d, igt_plane_t *plane,
>> +                 enum pipe pipe, igt_output_t *output)
>> +{
>> +    igt_display_t *display = &d->display;
>> +    int width, height;
>> +    drmModeModeInfo *mode;
>> +    bool test_complete = false;
>> +    int scaling = 50;
>> +    int ret;
>> +
>> +    cleanup_crtc(d);
>> +
>> +    igt_output_set_pipe(output, pipe);
>> +    mode = igt_output_get_mode(output);
>> +    width = mode->hdisplay;
>> +    height = mode->vdisplay;
>> +
>> +    igt_create_color_pattern_fb(display->drm_fd,
>> +                    width, height,
>> +                    DRM_FORMAT_XRGB8888,
>> +                    I915_TILING_NONE,
>> +                    1.0, 0.0, 0.0, &d->fb[0]);
>> +
>> +    igt_plane_set_fb(plane, &d->fb[0]);
>> +
>> +    while(!test_complete) {
>> +        igt_plane_set_size(plane, (width * scaling) / 100, (height * 
>> scaling) / 100);
>> +        ret = igt_display_try_commit_atomic(display, 
>> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>> +
>> +        if (ret != -EINVAL)
>> +            test_complete = true;
>> +
>> +        scaling += 5;
>> +    }
>> +
>> +    igt_plane_set_fb(plane, NULL);
>> +    igt_remove_fb(display->drm_fd, &d->fb[0]);
>> +
>> +    igt_skip_on_f(ret == -EINVAL, "Scaling op not supported\n");
>> +}
>> +
>>   static void
>>   test_plane_scaling(data_t *d, enum pipe pipe, igt_output_t *output, 
>> uint32_t flags)
>>   {
>> @@ -285,9 +328,12 @@ test_plane_scaling(data_t *d, enum pipe pipe, 
>> igt_output_t *output, uint32_t fla
>>               uint32_t format = plane->drm_plane->formats[j];
>>               if (test_format(d, &tested_formats, format) &&
>>                   igt_plane_has_format_mod(plane, format, modifier) &&
>> -                can_scale(d, format))
>> +                can_scale(d, format)) {
>>                   if (flags & TEST_UPSCALING)
>>                       __test_plane_upscaling(d, plane, pipe, output);
>> +                if (flags & TEST_DOWNSCALING)
>> +                    __test_plane_downscaling(d, plane, pipe, output);
>> +                }
>>           }
>>           igt_vec_fini(&tested_formats);
>> @@ -618,6 +664,13 @@ igt_main_args("", long_opts, help_str, 
>> opt_handler, &data)
>>                       test_plane_scaling(&data, pipe, output, 
>> TEST_UPSCALING);
>>           }
>> +        igt_describe("Tests plane downscaling.");
>> +        igt_subtest_with_dynamic("plane-downscaling") {
>> +            for_each_pipe_with_single_output(&data.display, pipe, 
>> output)
>> +                igt_dynamic_f("pipe-%s-%s-downscaling", 
>> kmstest_pipe_name(pipe), igt_output_name(output))
>> +                    test_plane_scaling(&data, pipe, output, 
>> TEST_DOWNSCALING);
>> +        }
>> +
>>           igt_describe("Tests scaling with pixel formats.");
>>           igt_subtest_with_dynamic("scaler-with-pixel-format") {
>>               for_each_pipe_with_single_output(&data.display, pipe, 
>> output)
>> -- 
>> 2.25.1
>>

-- 
~Swati Sharma

  parent reply	other threads:[~2022-02-17 12:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 12:23 [igt-dev] [v4 0/9] Addition of new plane scaling test cases Swati Sharma
2022-02-15 12:23 ` [igt-dev] [v4 1/9] tests/kms_plane_scaling: Removal of plane-scaling subtest Swati Sharma
2022-02-15 12:23 ` [igt-dev] [v4 2/9] tests/kms_plane_scaling: Add output name in dynamic subtests Swati Sharma
2022-02-15 12:23 ` [igt-dev] [v4 3/9] tests/kms_plane_scaling: Upscaling each plane Swati Sharma
2022-02-15 20:43   ` Ville Syrjälä
2022-02-15 12:23 ` [igt-dev] [v4 4/9] tests/kms_plane_scaling: Downscaling " Swati Sharma
2022-02-15 20:43   ` Ville Syrjälä
     [not found]   ` <a85c6701-43ad-4b25-6184-8798e8db2e2d@quicinc.com>
2022-02-17 12:15     ` Sharma, Swati2 [this message]
2022-02-17 18:22       ` Jessica Zhang
2022-02-17 18:37         ` Sharma, Swati2
2022-02-22 19:36           ` Jessica Zhang
2022-02-23  6:46             ` Sharma, Swati2
2022-02-15 12:23 ` [igt-dev] [v4 5/9] tests/kms_plane_scaling: Upscaling on 2 planes Swati Sharma
2022-02-15 20:43   ` Ville Syrjälä
2022-02-15 12:23 ` [igt-dev] [v4 6/9] tests/kms_plane_scaling: Downscaling " Swati Sharma
2022-02-15 12:23 ` [igt-dev] [v4 7/9] tests/kms_plane_scaling: Upscaling and downscaling scenario Swati Sharma
2022-02-15 12:23 ` [igt-dev] [v4 8/9] tests/kms_plane_scaling: Add negative test to check num of scalers Swati Sharma
2022-02-15 12:23 ` [igt-dev] [v4 9/9] tests/kms_plane_scaling: Refactor clipping-clamping subtest Swati Sharma
2022-02-15 18:23 ` [igt-dev] ✓ Fi.CI.BAT: success for Addition of new plane scaling test cases (rev6) Patchwork
2022-02-15 21:59 ` [igt-dev] ✗ 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=f477c5f7-be29-bd08-41b9-ac802dc9ca30@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    --cc=quic_jesszhan@quicinc.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.