All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Reddy Guddati, Santhosh" <santhosh.reddy.guddati@intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <swati2.sharma@intel.com>
Subject: Re: [PATCH i-g-t v4 04/12] tests/intel/kms_frontbuffer_tracking: consolidate fbc tests skip checks
Date: Thu, 16 Jul 2026 13:07:31 +0530	[thread overview]
Message-ID: <f3f2e10b-be18-4b9f-b196-7966920ce3df@intel.com> (raw)
In-Reply-To: <20260601204407.39934-5-vinod.govindapillai@intel.com>



On 02-06-2026 02:13, Vinod Govindapillai wrote:
> While looking for "no fbc reasons" and decide whether to skip any specific
> fbc related test, read the debugfs fbc status only once and look for any
> skip reasons. Move this as a library function so that other FBC specific
> tests could use the same library and all the skips reasons can be
> maintained in a single place.
> 
> v2: Use the correct test for status comparison (Santhosh)
> 
> Suggested-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>

Reviewed-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
> ---
>   lib/i915/intel_fbc.c                   | 37 +++++++++++++++
>   lib/i915/intel_fbc.h                   |  1 +
>   tests/intel/kms_frontbuffer_tracking.c | 63 ++++----------------------
>   3 files changed, 47 insertions(+), 54 deletions(-)
> 
> diff --git a/lib/i915/intel_fbc.c b/lib/i915/intel_fbc.c
> index 4e629097a..5692c6af8 100644
> --- a/lib/i915/intel_fbc.c
> +++ b/lib/i915/intel_fbc.c
> @@ -63,6 +63,43 @@ void intel_fbc_get_status(igt_crtc_t *crtc, char *fbc_status, int buf_size)
>   					buf_size);
>   }
>   
> +/**
> + * intel_fbc_found_skip_reason
> + * @device: fd of the device
> + * @crtc_index: crtc index
> + *
> + * Read the debugfs entry for current fbc status of a crtc and check for any reasons
> + * why FBC cannot be enabled. This helps in skipping FBC test cases where FBC cannot
> + * be enabled. These no fbc reasons are defined by the driver.
> + *
> + * Returns:
> + * True if there is a reason that FBC cannot be enabled otherwise false.
> + */
> +bool intel_fbc_found_skip_reason(int device, int crtc_index)
> +{
> +	const char *const no_fbc_reasons[] = {
> +		"FBC disabled: not enough stolen memory",
> +		"FBC disabled: stride not supported",
> +		"FBC disabled: plane size too big",
> +		"FBC disabled: surface size too big",
> +		"FBC disabled: PSR1 enabled (Wa_14016291713)"
> +	};
> +	bool found_reason = false;
> +	char fbc_status[FBC_STATUS_BUF_LEN];
> +	int i;
> +
> +	intel_fbc_get_status_crtc_index(device, crtc_index, fbc_status,
> +					sizeof(fbc_status));
> +
> +	if (strstr(fbc_status, "FBC enabled\n"))
> +		return false;
> +
> +	for (i = 0; !found_reason && i < ARRAY_SIZE(no_fbc_reasons); i++)
> +		found_reason = strstr(fbc_status, no_fbc_reasons[i]);
> +
> +	return found_reason;
> +}
> +
>   /**
>    * intel_fbc_supported:
>    * @crtc: CRTC
> diff --git a/lib/i915/intel_fbc.h b/lib/i915/intel_fbc.h
> index 60b86e366..32126309e 100644
> --- a/lib/i915/intel_fbc.h
> +++ b/lib/i915/intel_fbc.h
> @@ -20,5 +20,6 @@ bool intel_fbc_supported_for_psr_mode(igt_display_t *display, enum psr_mode mode
>   void intel_fbc_get_status_crtc_index(int device, int crtc_index,
>   				     char *fbc_status, int buf_size);
>   void intel_fbc_get_status(igt_crtc_t *crtc, char *fbc_status, int buf_size);
> +bool intel_fbc_found_skip_reason(int device, int crtc_index);
>   
>   #endif
> diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
> index fabfe11fc..4155939b6 100644
> --- a/tests/intel/kms_frontbuffer_tracking.c
> +++ b/tests/intel/kms_frontbuffer_tracking.c
> @@ -1715,51 +1715,6 @@ static bool fbc_wait_for_compression(void)
>   	return igt_wait(fbc_is_compressing(), 2000, 1);
>   }
>   
> -static bool fbc_not_enough_stolen(void)
> -{
> -	char fbc_status[128];
> -
> -	intel_fbc_get_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
> -
> -	return strstr(fbc_status, "FBC disabled: not enough stolen memory\n");
> -}
> -
> -static bool fbc_stride_not_supported(void)
> -{
> -	char fbc_status[128];
> -
> -	intel_fbc_get_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
> -
> -	return strstr(fbc_status, "FBC disabled: stride not supported\n");
> -}
> -
> -static bool fbc_plane_size_too_big(void)
> -{
> -	char fbc_status[128];
> -
> -	intel_fbc_get_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
> -
> -	return strstr(fbc_status, "FBC disabled: plane size too big\n");
> -}
> -
> -static bool fbc_surface_size_too_big(void)
> -{
> -	char fbc_status[128];
> -
> -	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
> -
> -	return strstr(fbc_status, "FBC disabled: surface size too big\n");
> -}
> -
> -static bool fbc_psr_not_possible(void)
> -{
> -	char fbc_status[128];
> -
> -	intel_fbc_get_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
> -
> -	return strstr(fbc_status, "FBC disabled: PSR1 enabled (Wa_14016291713)");
> -}
> -
>   static bool fbc_enable_per_plane(int plane_index, igt_crtc_t *crtc)
>   {
>   	char fbc_status[PATH_MAX];
> @@ -2480,6 +2435,8 @@ static void hdr_print_status(igt_output_t *output)
>   
>   static void do_status_assertions(int flags)
>   {
> +	igt_crtc_t *crtc = prim_mode_params.crtc;
> +
>   	if (!opt.check_status) {
>   		/* Make sure we settle before continuing. */
>   		sleep(1);
> @@ -2497,27 +2454,25 @@ static void do_status_assertions(int flags)
>   			igt_assert_f(false, "DRRS LOW\n");
>   		}
>   	} else if (flags & ASSERT_DRRS_INACTIVE) {
> -		if (!intel_is_drrs_inactive(prim_mode_params.crtc)) {
> +		if (!intel_is_drrs_inactive(crtc)) {
>   			drrs_print_status();
>   			igt_assert_f(false, "DRRS INACTIVE\n");
>   		}
>   	}
>   
>   	if (flags & ASSERT_FBC_ENABLED) {
> -		igt_require(!fbc_not_enough_stolen());
> -		igt_require(!fbc_stride_not_supported());
> -		igt_require(!fbc_plane_size_too_big());
> -		igt_require(!fbc_surface_size_too_big());
> -		igt_require(!fbc_psr_not_possible());
> -		if (!intel_fbc_wait_until_enabled(prim_mode_params.crtc)) {
> -			igt_assert_f(intel_fbc_is_enabled(prim_mode_params.crtc, IGT_LOG_WARN),
> +		igt_require(!intel_fbc_found_skip_reason(crtc->display->drm_fd,
> +							 crtc->crtc_index));
> +
> +		if (!intel_fbc_wait_until_enabled(crtc)) {
> +			igt_assert_f(intel_fbc_is_enabled(crtc, IGT_LOG_WARN),
>   				     "FBC disabled\n");
>   		}
>   
>   		if (opt.fbc_check_compression)
>   			igt_assert(fbc_wait_for_compression());
>   	} else if (flags & ASSERT_FBC_DISABLED) {
> -		igt_assert(!intel_fbc_wait_until_enabled(prim_mode_params.crtc));
> +		igt_assert(!intel_fbc_wait_until_enabled(crtc));
>   	}
>   
>   	if (flags & ASSERT_PSR_ENABLED) {


  reply	other threads:[~2026-07-16  7:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 20:43 [PATCH i-g-t v4 00/12] updates to fbc tests Vinod Govindapillai
2026-06-01 20:43 ` [PATCH i-g-t v4 01/12] lib/i915/fbc: extract intel_fbc_get_fbc_status() Vinod Govindapillai
2026-07-10  4:50   ` Reddy Guddati, Santhosh
2026-06-01 20:43 ` [PATCH i-g-t v4 02/12] tests/intel/kms_frontbuffer_tracking: use intel_fbc_get_status() Vinod Govindapillai
2026-07-10  5:11   ` Reddy Guddati, Santhosh
2026-06-01 20:43 ` [PATCH i-g-t v4 03/12] tests/intel/kms_frontbuffer_tracking: update the outdated fbc status reasons Vinod Govindapillai
2026-07-10  5:16   ` Reddy Guddati, Santhosh
2026-06-01 20:43 ` [PATCH i-g-t v4 04/12] tests/intel/kms_frontbuffer_tracking: consolidate fbc tests skip checks Vinod Govindapillai
2026-07-16  7:37   ` Reddy Guddati, Santhosh [this message]
2026-06-01 20:44 ` [PATCH i-g-t v4 05/12] tests/intel/kms_frontbuffer_tracking: use a bigger buffer for fbc status Vinod Govindapillai
2026-06-01 20:44 ` [PATCH i-g-t v4 06/12] tests/intel/kms_fbcon_fbt: " Vinod Govindapillai
2026-06-01 20:44 ` [PATCH i-g-t v4 07/12] tests/intel/kms_fbcon_fbt: update the outdated fbc skip reasons Vinod Govindapillai
2026-07-10  5:21   ` Reddy Guddati, Santhosh
2026-06-01 20:44 ` [PATCH i-g-t v4 08/12] tests/intel/kms_fbcon_fbt: refactor the code to get the right fbc status Vinod Govindapillai
2026-07-10  5:43   ` Reddy Guddati, Santhosh
2026-06-01 20:44 ` [PATCH i-g-t v4 09/12] tests/intel/kms_fbcon_fbt: find and store the crtc index Vinod Govindapillai
2026-07-10  5:44   ` Reddy Guddati, Santhosh
2026-06-01 20:44 ` [PATCH i-g-t v4 10/12] tests/intel/kms_fbcon_fbt: find the correct fbc status of a pipe Vinod Govindapillai
2026-07-16  7:41   ` Reddy Guddati, Santhosh
2026-06-01 20:44 ` [PATCH i-g-t v4 11/12] tests/intel/kms_fbcon_fbt: use common routine to skip tests on fbc status Vinod Govindapillai
2026-07-16  7:46   ` Reddy Guddati, Santhosh
2026-06-01 20:44 ` [PATCH i-g-t v4 12/12] tests/intel/fbc: detatiled debug info for unsupported plane size for fbc Vinod Govindapillai
2026-07-10  5:06   ` Reddy Guddati, Santhosh
2026-06-02  0:06 ` ✓ i915.CI.BAT: success for updates to fbc tests (rev4) Patchwork
2026-06-02  0:08 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-02  9:29 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-02 10:41 ` ✗ i915.CI.Full: " Patchwork

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=f3f2e10b-be18-4b9f-b196-7966920ce3df@intel.com \
    --to=santhosh.reddy.guddati@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=swati2.sharma@intel.com \
    --cc=vinod.govindapillai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.