Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Reddy Guddati, Santhosh" <santhosh.reddy.guddati@intel.com>
To: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v5 1/3] tests/kms_content_protection: Add per-CRTC framebuffer infrastructure
Date: Wed, 6 May 2026 16:27:11 +0530	[thread overview]
Message-ID: <01e1a5cd-eac9-49c8-bd20-05de2f554c59@intel.com> (raw)
In-Reply-To: <CAMNLLoRO_-bF0-SaUVgMq0R0T8mc6yk4GmPY=_FCJwhLWohigA@mail.gmail.com>



On 05-05-2026 02:02, Manasi Navare wrote:
> Thanks a lot @Karthik B S <mailto:karthik.b.s@intel.com>  for your response,
> And appreciate you trying this on your end and for your help on getting 
> this landed.
> 
> Regards
> Manasi
> 
> On Mon, May 4, 2026 at 1:31 AM Karthik B S <karthik.b.s@intel.com 
> <mailto:karthik.b.s@intel.com>> wrote:
> 
>     __
> 
>     Hi Manasi,
> 
>     On 5/1/2026 4:29 AM, Manasi Navare wrote:
>>     This change looks good to me,
>>
>>     Reviewed-by: Manasi Navare <navaremanasi@google.com
>>     <mailto:navaremanasi@google.com>>
>>
>>     @Karthik B S <mailto:karthik.b.s@intel.com>  and others from Intel
>>     signal boosting this, could we get some traction on this, its
>>     reviewed by the team, could we please land this?
> 
>     Sure, the idea LGTM in general. Will try this out at our end once
>     before merging as this test doesn't have coverage on CI currently.
> 
>     Regards,
>     Karthik.B.S

I have tested these patches on a mst and non mst setup locally. The 
changes and the results LGTM.

Regards,
Santhosh

Tested-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
Reviewed-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>


>>
>>     Regards
>>     Manasi
>>
>>     On Wed, Apr 29, 2026 at 1:31 PM Manasi Navare
>>     <navaremanasi@google.com <mailto:navaremanasi@google.com>> wrote:
>>
>>         Thanks Jason-JH for this improvement in the
>>         kms_content_protection IGT test.
>>         It makes sense to create a fb per CRTC given that each CRTC
>>         can have different mode timings/resolutions.
>>
>>         @karthik.b.s@intel.com <mailto:karthik.b.s@intel.com> ,
>>         @bhanuprakash.modem@gmail.com
>>         <mailto:bhanuprakash.modem@gmail.com>, @swati2.sharma@intel.com <mailto:swati2.sharma@intel.com>
>>         Could you please take a look at this patch and help provide
>>         feedback?
>>         We would like to get this landed as it helps improve our testing.
>>
>>         Regards
>>         Manasi
>>
>>
>>
>>         On Sun, Mar 29, 2026 at 8:22 PM Jason-JH Lin <jason-
>>         jh.lin@mediatek.com <mailto:jason-jh.lin@mediatek.com>> wrote:
>>
>>             Replace global framebuffers (data.red/green) with per-CRTC
>>             array
>>             (data.fbs[IGT_MAX_PIPES]) to support multiple outputs with
>>             different
>>             resolutions.
>>
>>             Add create_fbs()/remove_fbs() to manage framebuffer
>>             lifecycle at
>>             test initialization/cleanup, creating each FB with the
>>             resolution of
>>             the first output that can connect to that CRTC.
>>
>>             Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com
>>             <mailto:jason-jh.lin@mediatek.com>>
>>             Reviewed-by: Fei Shao <fshao@chromium.org
>>             <mailto:fshao@chromium.org>>
>>             ---
>>              tests/kms_content_protection.c | 50 +++++++++++++++++++++
>>             ++++---------
>>              1 file changed, 37 insertions(+), 13 deletions(-)
>>
>>             diff --git a/tests/kms_content_protection.c b/tests/
>>             kms_content_protection.c
>>             index caf3d7a56ae4..df9ff5efcaa2 100644
>>             --- a/tests/kms_content_protection.c
>>             +++ b/tests/kms_content_protection.c
>>             @@ -107,10 +107,15 @@
>>
>>              IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
>>
>>             +struct hdcp_test_fbs {
>>             +       struct igt_fb red;
>>             +       struct igt_fb green;
>>             +};
>>             +
>>              struct data {
>>                     int drm_fd;
>>                     igt_display_t display;
>>             -       struct igt_fb red, green;
>>             +       struct hdcp_test_fbs fbs[IGT_MAX_PIPES];
>>                     unsigned int cp_tests;
>>                     struct udev_monitor *uevent_monitor;
>>                     bool is_force_hdcp14;
>>             @@ -991,31 +996,49 @@ static void
>>             test_content_protection_cleanup(void)
>>                             igt_info("CP Prop being UNDESIRED on
>>             %s\n", output->name);
>>                             test_cp_disable(output, display-
>>             >is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>>                     }
>>             -
>>             -       igt_remove_fb(data.drm_fd, &data.red);
>>             -       igt_remove_fb(data.drm_fd, &data.green);
>>              }
>>
>>              static void create_fbs(void)
>>              {
>>             -       uint16_t width = 0, height = 0;
>>                     drmModeModeInfo *mode;
>>                     igt_output_t *output;
>>             +       igt_crtc_t *crtc;
>>
>>             +       /* Create framebuffers for each connected output's
>>             pipe */
>>                     for_each_connected_output(&data.display, output) {
>>                             mode = igt_output_get_mode(output);
>>                             igt_assert(mode);
>>
>>             -               width = max(width, mode->hdisplay);
>>             -               height = max(height, mode->vdisplay);
>>             +               /* Find a valid crtc for this output */
>>             +               for_each_crtc(&data.display, crtc) {
>>             +                       if (!
>>             igt_crtc_connector_valid(crtc, output))
>>             +                               continue;
>>             +
>>             +                       /* Skip if already created for
>>             this crtc */
>>             +                       if (data.fbs[crtc-
>>             >crtc_index].red.fb_id)
>>             +                               continue;
>>             +
>>             +  igt_create_color_fb(data.drm_fd, mode->hdisplay, mode-
>>             >vdisplay,
>>             +  DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
>>             +                                           1.f, 0.f, 0.f,
>>             &data.fbs[crtc->crtc_index].red);
>>             +  igt_create_color_fb(data.drm_fd, mode->hdisplay, mode-
>>             >vdisplay,
>>             +  DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
>>             +                                           0.f, 1.f, 0.f,
>>             &data.fbs[crtc->crtc_index].green);
>>             +                       break;
>>             +               }
>>                     }
>>             +}
>>
>>             -       igt_create_color_fb(data.drm_fd, width, height,
>>             -                           DRM_FORMAT_XRGB8888,
>>             DRM_FORMAT_MOD_LINEAR,
>>             -                           1.f, 0.f, 0.f, &data.red);
>>             -       igt_create_color_fb(data.drm_fd, width, height,
>>             -                           DRM_FORMAT_XRGB8888,
>>             DRM_FORMAT_MOD_LINEAR,
>>             -                           0.f, 1.f, 0.f, &data.green);
>>             +static void remove_fbs(void)
>>             +{
>>             +       igt_crtc_t *crtc;
>>             +
>>             +       for_each_crtc(&data.display, crtc) {
>>             +               if (data.fbs[crtc->crtc_index].red.fb_id)
>>             +                       igt_remove_fb(data.drm_fd,
>>             &data.fbs[crtc->crtc_index].red);
>>             +               if (data.fbs[crtc->crtc_index].green.fb_id)
>>             +                       igt_remove_fb(data.drm_fd,
>>             &data.fbs[crtc->crtc_index].green);
>>             +       }
>>              }
>>
>>              static const struct {
>>             @@ -1241,6 +1264,7 @@ int igt_main()
>>
>>                     igt_fixture() {
>>                             test_content_protection_cleanup();
>>             +               remove_fbs();
>>                             igt_display_fini(&data.display);
>>                             drm_close_driver(data.drm_fd);
>>                     }
>>             -- 
>>             2.43.0
>>


  parent reply	other threads:[~2026-05-06 10:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30  3:20 [PATCH i-g-t v5 0/3] Optimize framebuffer management Jason-JH Lin
2026-03-30  3:20 ` [PATCH i-g-t v5 1/3] tests/kms_content_protection: Add per-CRTC framebuffer infrastructure Jason-JH Lin
2026-04-29 20:31   ` Manasi Navare
2026-04-30 22:59     ` Manasi Navare
2026-05-04  8:31       ` Karthik B S
2026-05-04 20:32         ` Manasi Navare
2026-05-05 22:28           ` Manasi Navare
2026-05-06 12:15             ` Karthik B S
2026-05-06 18:15               ` Manasi Navare
2026-05-06 10:57           ` Reddy Guddati, Santhosh [this message]
2026-03-30  3:20 ` [PATCH i-g-t v5 2/3] tests/kms_content_protection: Pass crtc parameter and use per-CRTC FBs Jason-JH Lin
2026-04-17  4:12   ` Fei Shao
2026-05-06 11:05   ` Reddy Guddati, Santhosh
2026-03-30  3:20 ` [PATCH i-g-t v5 3/3] tests/kms_content_protection: Add FB cleanup for MST tests Jason-JH Lin
2026-05-06 11:13   ` Reddy Guddati, Santhosh
2026-03-30  4:14 ` ✓ Xe.CI.BAT: success for Optimize framebuffer management Patchwork
2026-03-30  4:37 ` ✓ i915.CI.BAT: " Patchwork
2026-03-30  4:37 ` Patchwork
2026-03-30  4:38 ` Patchwork
2026-03-30  4:38 ` Patchwork
2026-03-30  4:38 ` Patchwork
2026-03-30  5:10 ` ✓ Xe.CI.FULL: " Patchwork
2026-03-30  6:37 ` ✗ i915.CI.Full: failure " Patchwork
2026-04-14  5:59 ` [PATCH i-g-t v5 0/3] " Jason-JH Lin (林睿祥)

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=01e1a5cd-eac9-49c8-bd20-05de2f554c59@intel.com \
    --to=santhosh.reddy.guddati@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox