public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@intel.com>
To: Pranay Samala <pranay.samala@intel.com>, <igt-dev@lists.freedesktop.org>
Cc: <sameer.lattannavar@intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/kms_sharpness_filter: Fix stale mode pointer in joiner bypass
Date: Wed, 25 Mar 2026 15:25:14 +0530	[thread overview]
Message-ID: <aa0c4831-2f94-4d2c-ad11-4a22c9a656bb@intel.com> (raw)
In-Reply-To: <20260323141101.2657652-1-pranay.samala@intel.com>

Hi Pranay,

On 3/23/2026 7:41 PM, Pranay Samala wrote:
> When joiner mode is detected, the returned mode pointer from
> igt_get_non_joiner_mode() points into connector-owned memory
> which can become invalid after subsequent display state changes.
>
> Fix this by copying the mode into local variable for stable
> storage. Skip the output if no non-joiner mode is found.
>
> Fixes: 10dccc7fc82f ("tests/intel/kms_sharpness_filter: Detect and bypass joiner modes")
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/7045
> Signed-off-by: Pranay Samala <pranay.samala@intel.com>
> ---
>   tests/intel/kms_sharpness_filter.c | 13 +++++++++++--
>   1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
> index 96fb139ae..c2295c0ee 100644
> --- a/tests/intel/kms_sharpness_filter.c
> +++ b/tests/intel/kms_sharpness_filter.c
> @@ -430,6 +430,7 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
>   	igt_display_t *display = &data->display;
>   	igt_output_t *output;
>   	igt_crtc_t *crtc;
> +	drmModeModeInfo *m, selected_mode;
>   	char name[40];
>   
>   	for_each_connected_output(display, output) {
> @@ -438,7 +439,6 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
>   
>   			data->output = output;
>   			data->crtc = crtc;
> -			data->mode = igt_output_get_mode(data->output);
>   
>   			/*
>   			 * FIXME: Joiner + CASF currently unsupported.
> @@ -446,7 +446,15 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
>   			 * Until then, run on non-joiner mode in joiner configuration.
>   			 */
>   			if (is_joiner_mode(data->drm_fd, data->output)) {
> -				data->mode = igt_get_non_joiner_mode(data->drm_fd, data->output);
> +				m = igt_get_non_joiner_mode(data->drm_fd, data->output);
> +				if (!m) {
> +					igt_info("No non-joiner mode found on %s\n",
> +						 igt_output_name(data->output));
> +					continue;
> +				}
> +
> +				selected_mode = *m;
> +				data->mode = &selected_mode;

Instead of doing this, if we get the mode after setting the CRTC on the 
output and we should be getting the correct mode. Could you please check 
this.

Thanks and Regards,
Karthik.B.S
>   				igt_info("Executing on mode %dx%d@%d\n",
>   					 data->mode->hdisplay,
>   					 data->mode->vdisplay,
> @@ -463,6 +471,7 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
>   
>   			igt_output_set_crtc(data->output,
>   					    data->crtc);
> +			igt_output_override_mode(data->output, data->mode);
>   
>   			if (!intel_pipe_output_combo_valid(display)) {
>   				igt_output_set_crtc(data->output, NULL);

      parent reply	other threads:[~2026-03-25  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 14:11 [PATCH i-g-t] tests/intel/kms_sharpness_filter: Fix stale mode pointer in joiner bypass Pranay Samala
2026-03-23 16:55 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-23 17:21 ` ✓ i915.CI.BAT: " Patchwork
2026-03-24  0:21 ` ✓ Xe.CI.FULL: " Patchwork
2026-03-24  2:52 ` ✗ i915.CI.Full: failure " Patchwork
2026-03-24 15:19 ` [PATCH i-g-t] " Garg, Nemesa
2026-03-25  9:55 ` Karthik B S [this message]

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=aa0c4831-2f94-4d2c-ad11-4a22c9a656bb@intel.com \
    --to=karthik.b.s@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=pranay.samala@intel.com \
    --cc=sameer.lattannavar@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