From: Karthik B S <karthik.b.s@intel.com>
To: Manasi Navare <navaremanasi@google.com>,
"Reddy Guddati, Santhosh" <santhosh.reddy.guddati@intel.com>
Cc: Jason-JH Lin <jason-jh.lin@mediatek.com>,
<igt-dev@lists.freedesktop.org>,
Swati Sharma <swati2.sharma@intel.com>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
Bhanuprakash Modem <bhanuprakash.modem@gmail.com>,
Fei Shao <fshao@chromium.org>, Jani <jani.nikula@intel.com>,
Paul-PL Chen <paul-pl.chen@mediatek.com>,
Nancy Lin <nancy.lin@mediatek.com>,
Singo Chang <singo.chang@mediatek.com>,
Gil Dekel <gildekel@google.com>, Yacoub <markyacoub@chromium.org>,
<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: Re: [PATCH i-g-t v5 1/3] tests/kms_content_protection: Add per-CRTC framebuffer infrastructure
Date: Wed, 6 May 2026 17:45:58 +0530 [thread overview]
Message-ID: <baf903e9-bdfc-4107-a703-b65686ab2fd7@intel.com> (raw)
In-Reply-To: <CAMNLLoSiS316uKO-1t31DmMcTaD9AC3ieJ7Kgfp=dF0sn6Nsbw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8501 bytes --]
Hi Manasi,
Santhosh from our team has tested this out at our end. Thanks Santhosh.
Will get this merged.
Thanks and Regards,
Karthik.B.S
On 5/6/2026 3:58 AM, Manasi Navare wrote:
> Hi @Karthik B S <mailto:karthik.b.s@intel.com> , were you able to test
> this locally for regressions?
> If you could add your R-B , we can get this landed as soon as possible.
> This is time critical for us and is required to scale to MTK platform
>
> Regards
> Manasi
>
> On Mon, May 4, 2026 at 1:32 PM Manasi Navare <navaremanasi@google.com>
> 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>
> 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>
>>
>> @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
>>
>> Regards
>> Manasi
>>
>> On Wed, Apr 29, 2026 at 1:31 PM Manasi Navare
>> <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, @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> 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>
>> Reviewed-by: Fei Shao <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
>>
[-- Attachment #2: Type: text/html, Size: 20291 bytes --]
next prev parent reply other threads:[~2026-05-06 12:16 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 [this message]
2026-05-06 18:15 ` Manasi Navare
2026-05-06 10:57 ` Reddy Guddati, Santhosh
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=baf903e9-bdfc-4107-a703-b65686ab2fd7@intel.com \
--to=karthik.b.s@intel.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=bhanuprakash.modem@gmail.com \
--cc=fshao@chromium.org \
--cc=gildekel@google.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jason-jh.lin@mediatek.com \
--cc=juhapekka.heikkila@gmail.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=markyacoub@chromium.org \
--cc=nancy.lin@mediatek.com \
--cc=navaremanasi@google.com \
--cc=paul-pl.chen@mediatek.com \
--cc=santhosh.reddy.guddati@intel.com \
--cc=singo.chang@mediatek.com \
--cc=swati2.sharma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox