public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "juhapekka.heikkila@gmail.com" <juhapekka.heikkila@gmail.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"bhanuprakash.modem@gmail.com" <bhanuprakash.modem@gmail.com>,
	"karthik.b.s@intel.com" <karthik.b.s@intel.com>,
	"swati2.sharma@intel.com" <swati2.sharma@intel.com>,
	"kamil.konieczny@linux.intel.com"
	<kamil.konieczny@linux.intel.com>,
	"fshao@chromium.org" <fshao@chromium.org>
Cc: "gildekel@google.com" <gildekel@google.com>,
	"jani.nikula@intel.com" <jani.nikula@intel.com>,
	"markyacoub@chromium.org" <markyacoub@chromium.org>,
	"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
	"Paul-pl Chen (陳柏霖)" <Paul-pl.Chen@mediatek.com>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"Singo Chang (張興國)" <Singo.Chang@mediatek.com>
Subject: Re: [PATCH i-g-t 1/1] tests/kms_content_protection: Re-create framebuffer before each modeset
Date: Thu, 8 Jan 2026 14:17:44 +0000	[thread overview]
Message-ID: <656da96203574bdb080f44bed4d9f296544e5e5e.camel@mediatek.com> (raw)
In-Reply-To: <c34b7f2d-7d3d-4cab-8557-0a874e00678d@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3081 bytes --]

Hi,

On Thu, 2026-01-08 at 11:13 +0530, Karthik B S wrote:
> Hi Jason-JH,
> 
> On 1/7/2026 11:59 AM, Jason-JH Lin (林睿祥) wrote:
> > Hi Karthik,
> > 
> > On Wed, 2026-01-07 at 10:34 +0530, Karthik B S wrote:
> > > 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?
> > Yes, I did hit the issue.
> > Our first output has a resolution 3504x2190, while the second
> > output,
> > which supports HDCP, is 3840x2160, so the framebuffer is set to
> > 3840x2190.
> > 
> > Since out platform doesn't support scaling, atomic_check() returns
> > (-
> > ERANGE) when the framebuffer height needs to be scaled from 2190 to
> > 2160, and the test fails.
> Ideally it should be cropping and not invoke scaling, but yea as this
> test is not about cropping/scaling its better to simplify this test
> to 
> avoid the failure.
> > 
> > > > 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?
> > Yes, I definitely agree with this.
> > However, I was worried that it would break other tests in
> > kms_content_protection, so I didn't remove the existing fb
> > creation.
> > 
> > Since data.red and data.green are static global variables, Isimply
> > called igt_create_color_fb() again to overwrite the original fb,
> > but
> > this could indeed cause the potential problem of gem_handle not
> > being
> > properly released.
> Yea this is not recommended to overwrite the fb pointer as it will
> cause 
> leaks.
> > 
> > Do you know if I replaced the original create_fbs() to here, where
> > should the original igt_remove_fb() be moved to?
> 
> I think test_fini() should be the right place to handle this.
> 

OK, thanks for your advice.
I'll verify it and resend the next version.

Regard,
Jason-JH Lin

> Regards,
> Karthik.B.S
> 


[-- Attachment #2: Type: text/html, Size: 6814 bytes --]

  reply	other threads:[~2026-01-08 14:17 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 ` [PATCH i-g-t 1/1] " Karthik B S
2026-01-07  6:29   ` Jason-JH Lin (林睿祥)
2026-01-08  5:43     ` Karthik B S
2026-01-08 14:17       ` Jason-JH Lin (林睿祥) [this message]
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=656da96203574bdb080f44bed4d9f296544e5e5e.camel@mediatek.com \
    --to=jason-jh.lin@mediatek.com \
    --cc=Nancy.Lin@mediatek.com \
    --cc=Paul-pl.Chen@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Singo.Chang@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=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=markyacoub@chromium.org \
    --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