Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Pranay Samala <pranay.samala@intel.com>, igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, kunal1.joshi@intel.com,
	sameer.lattannavar@intel.com, pranay.samala@intel.com
Subject: Re: [PATCH i-g-t 2/2] tests/kms: Simplify DRM debug severity update
Date: Tue, 11 Mar 2025 10:55:22 +0200	[thread overview]
Message-ID: <87frjkgd51.fsf@intel.com> (raw)
In-Reply-To: <20250310171539.273699-3-pranay.samala@intel.com>

On Mon, 10 Mar 2025, Pranay Samala <pranay.samala@intel.com> wrote:
> This fixes directly sends the bits to be include in the
> DRM debug mask using "igt_drm_debug_severity_update(DRM_UT_KMS)".

That category alone is not enough for the test. In general, we ask bug
reporters to use something like 0x1e mask for drm.debug. Maybe we can
reduce from that for specific tests, but KMS alone is not enough.

> If any other verbosity is needed then it can also be
> included doing bitwise OR in the parametes.

Perhaps, but the interface becomes cumbersome to use. And the function's
parameter indicates a single enum, not a mask of enumerators.

And the interface doesn't support a test using different sets of
categories for different parts of the test, if so desired.

BR,
Jani.

> Fixes: a2ab0ec12ef4 ("tests/kms_atomic_transition: Reducing debug loglevel dynamically")
> Fixes: 4baeb7397d71 ("tests/intel/kms_dp_linktrain_fallback: Reduce debug loglevel dynamically")
> Fixes: 7a8a3744466f ("tests/kms_cursor_legacy: Reduce debug loglevel dynamically")
> Signed-off-by: Pranay Samala <pranay.samala@intel.com>
> ---
>  tests/intel/kms_dp_linktrain_fallback.c | 12 +++---------
>  tests/kms_atomic_transition.c           | 11 +----------
>  tests/kms_cursor_legacy.c               | 10 +---------
>  3 files changed, 5 insertions(+), 28 deletions(-)
>
> diff --git a/tests/intel/kms_dp_linktrain_fallback.c b/tests/intel/kms_dp_linktrain_fallback.c
> index 6a872efd2..66687a3d2 100644
> --- a/tests/intel/kms_dp_linktrain_fallback.c
> +++ b/tests/intel/kms_dp_linktrain_fallback.c
> @@ -613,7 +613,6 @@ igt_main
>  	data_t data = {};
>  
>  	igt_fixture {
> -		int dir, current_log_level;
>  		data.drm_fd = drm_open_driver_master(DRIVER_INTEL |
>  						     DRIVER_XE);
>  		kmstest_set_vt_graphics_mode();
> @@ -621,18 +620,13 @@ igt_main
>  		igt_display_require_output(&data.display);
>  		for_each_pipe(&data.display, data.pipe)
>  			data.n_pipes++;
> -		dir = igt_sysfs_drm_module_params_open();
> -		if (dir >= 0) {
> -			current_log_level = igt_drm_debug_level_get(dir);
> -			close(dir);
> -
> -			if (current_log_level > 10)
> -				igt_drm_debug_level_update(10);
> -		}
>  		/*
>  		 * Some environments may have environment
>  		 * variable set to ignore long hpd, disable it for this test
>  		 */
> +
> +		igt_drm_debug_severity_update(DRM_UT_KMS);
> +
>  		igt_assert_f(igt_ignore_long_hpd(data.drm_fd, false),
>  			     "Unable to disable ignore long hpd\n");
>  	}
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index 0342af206..6c5bfa188 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -1171,8 +1171,6 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>  	int pipe_count = 0;
>  
>  	igt_fixture {
> -		int dir, current_log_level;
> -
>  		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>  
>  		kmstest_set_vt_graphics_mode();
> @@ -1185,14 +1183,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>  		for_each_connected_output(&data.display, output)
>  			count++;
>  
> -		dir = igt_sysfs_drm_module_params_open();
> -		if (dir >= 0) {
> -			current_log_level = igt_drm_debug_level_get(dir);
> -			close(dir);
> -
> -			if (current_log_level > 10)
> -				igt_drm_debug_level_update(10);
> -		}
> +		igt_drm_debug_severity_update(DRM_UT_KMS);
>  	}
>  
>  	igt_describe("Check toggling of primary plane with vblank");
> diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> index 44f031e7b..e317fbf30 100644
> --- a/tests/kms_cursor_legacy.c
> +++ b/tests/kms_cursor_legacy.c
> @@ -1839,7 +1839,6 @@ igt_main
>  	};
>  
>  	igt_fixture {
> -		int dir, current_log_level;
>  		display.drm_fd = drm_open_driver_master(DRIVER_ANY);
>  		kmstest_set_vt_graphics_mode();
>  
> @@ -1851,14 +1850,7 @@ igt_main
>  		 */
>  		intel_psr2_restore = i915_psr2_sel_fetch_to_psr1(display.drm_fd, NULL);
>  
> -		dir = igt_sysfs_drm_module_params_open();
> -		if (dir >= 0) {
> -			current_log_level = igt_drm_debug_level_get(dir);
> -			close(dir);
> -
> -			if (current_log_level > 10)
> -				igt_drm_debug_level_update(10);
> -		}
> +		igt_drm_debug_severity_update(DRM_UT_KMS);
>  	}
>  
>  	igt_describe("Test checks how many cursor updates we can fit between vblanks "

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-03-11  8:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 17:15 [PATCH i-g-t 0/2] Refactor DRM Debug Severity Handling for enhanced precision Pranay Samala
2025-03-10 17:15 ` [PATCH i-g-t 1/2] lib/igt_sysfs: Update DRM debug severity handling to use bitmask for verbosity control Pranay Samala
2025-03-11  8:49   ` Jani Nikula
2025-03-10 17:15 ` [PATCH i-g-t 2/2] tests/kms: Simplify DRM debug severity update Pranay Samala
2025-03-11  8:55   ` Jani Nikula [this message]
2025-03-11  0:47 ` ✓ Xe.CI.BAT: success for Refactor DRM Debug Severity Handling for enhanced precision Patchwork
2025-03-11  1:05 ` ✓ i915.CI.BAT: " Patchwork
2025-03-11 20:44 ` ✗ Xe.CI.Full: failure " 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=87frjkgd51.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    --cc=kunal1.joshi@intel.com \
    --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