public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@intel.com>
To: 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>
Cc: 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 1/1] tests/kms_content_protection: Re-create framebuffer before each modeset
Date: Wed, 7 Jan 2026 10:34:13 +0530	[thread overview]
Message-ID: <30bf18ef-c09a-4719-a0ed-0c20d49ce7e4@intel.com> (raw)
In-Reply-To: <20260106102207.2530864-1-jason-jh.lin@mediatek.com>

Hi,

On 1/6/2026 3:51 PM, Jason-JH Lin wrote:
> The red and green framebuffers were previously created only once at
> the beginning of the test. If the test runs on multiple outputs with
> different resolutions, the pre-created framebuffer's size might not
> match the mode of a subsequent output, causing the modeset to fail.
I see that the test is already creating fb's considering the max 
width/height among of all the available outputs, so ideally this issue 
should not be hit. Are we seeing any actual failures which this patch 
fixes or just doing this as a fail safe?
>
> This patch moves the framebuffer creation logic inside the
> modeset_with_fb() function. This ensures that for every modeset
> operation, a new framebuffer is created with dimensions that
> perfectly match the current output's mode, preventing potential
> modeset failures on systems with multiple displays of varying
> resolutions.

If we indeed see the issue and go ahead with this patch, fb cleanups 
need to be handled for the additional fb's created. Currently we are 
doing fb cleanup only once at the end of the test.

Also we need to remove the existing fb creation as it becomes redundant 
with this change?

Regards,
Karthik.B.S
>
> Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
> ---
>   tests/kms_content_protection.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 377bab9a3afb..980091871679 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -250,6 +250,13 @@ static void modeset_with_fb(const enum pipe pipe, igt_output_t *output,
>   
>   	mode = igt_output_get_mode(output);
>   
> +	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.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.green);
> +
>   	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>   	igt_plane_set_fb(primary, &data.red);
>   	igt_fb_set_size(&data.red, primary, mode->hdisplay, mode->vdisplay);

  parent reply	other threads:[~2026-01-07  5:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 10:21 [PATCH i-g-t 1/1] tests/kms_content_protection: Re-create framebuffer before each modeset Jason-JH Lin
2026-01-06 11:40 ` ✓ Xe.CI.BAT: success for series starting with [i-g-t,1/1] " Patchwork
2026-01-06 12:03 ` ✓ i915.CI.BAT: " Patchwork
2026-01-06 15:36 ` ✗ Xe.CI.Full: failure " Patchwork
2026-01-06 18:46 ` ✗ i915.CI.Full: " Patchwork
2026-01-07  5:04 ` Karthik B S [this message]
2026-01-07  6:29   ` [PATCH i-g-t 1/1] " Jason-JH Lin (林睿祥)
2026-01-08  5:43     ` Karthik B S
2026-01-08 14:17       ` Jason-JH Lin (林睿祥)
2026-02-10 10:34         ` Jason-JH Lin (林睿祥)
2026-02-13  7:02           ` Karthik B S

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=30bf18ef-c09a-4719-a0ed-0c20d49ce7e4@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=paul-pl.chen@mediatek.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