public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: Lohith BS <lohith.bs@intel.com>,
	intel-gfx@lists.freedesktop.org, rodrigo.vivi@intel.com,
	jani.saarinen@intel.com, daniel.vetter@ffwll.ch,
	chris@chris-wilson.co.uk, jari.tahvanainen@intel.com
Cc: ankit.k.nautiyal@intel.com, paulo.r.zanoni@intel.com
Subject: Re: [PATCH i-g-t v13] tests/kms_frontbuffer_tracking: Including DRRS test coverage
Date: Wed, 17 Jan 2018 10:35:24 +0530	[thread overview]
Message-ID: <32b087b8-cf02-e51b-6461-15a8b5e7c281@intel.com> (raw)
In-Reply-To: <1515595620-23742-1-git-send-email-lohith.bs@intel.com>

Summary from IRC discussions with Rodrigo:

drrs_disable will get called on all test setups(including the drrs 
non-capable). So we cant fail/skip the sub_test based on the return 
value from drrs_set(0)

drrs_enable will get called only when the test setup is capable of drrs. 
And also after the request for enabling drrs, drrs state is verified 
through i915_drrs_status.

So functionally it is not necessary to validate the debugfs_write return 
value. But no harm in double checking the error state for drrs_set(1). 
Rodrigo, as per above understanding i have mentioned the expected deltas 
inline. If you confirm, we will submit the next version. Thanks for the 
time.


On Wednesday 10 January 2018 08:17 PM, Lohith BS wrote:
> Dynamic Refresh Rate Switch(DRRS) is used to switch the panel's
> refresh rate to the lowest vrefresh supported by panel, when frame is
> not flipped for more than a Sec.
>
> In kernel, DRRS uses the front buffer tracking infrastructure.
> Hence DRRS test coverage is added along with other frontbuffer tracking
> based features such as FBC and PSR tests.
>
> Here, we are testing DRRS with other features in all possible
> combinations, in all required test cases, to capture any possible
> regression.
>
> v2: Addressed the comments and suggestions from Vlad, Marius.
>      The signoff details from the earlier work are also included.
>
> v3: Modified vblank rate calculation by using reply-sequence,
>      provided by drmWaitVBlank, as suggested by Chris Wilson.
>
> v4: As suggested from Chris Wilson and Daniel Vetter
>      1) Avoided using pthread for calculating vblank refresh rate,
>         instead used drmWaitVBlank reply sequence.
>      2) Avoided using kernel-specific info like transitional delays,
>         instead polling mechanism with timeout is used.
>      3) Included edp-DRRS as a subtest in kms_frontbuffer_tracking.c,
>         instead of having a separate test.
>
> v5: This patch adds DRRS as a new feature in the
>      kms_frontbuffer_tracking IGT.
>      DRRS switch to lower vrefresh rate is tested at slow-draw subtest.
>
>      Note:
>      1) Currently kernel doesn't have support to enable and disable
>         the DRRS feature dynamically(as in case of PSR). Hence if the
>         panel supports DRRS it will be enabled by default.
>
>      This is in continuation of last patch
> 	"https://patchwork.freedesktop.org/patch/162726/"
>
> v6: This patch adds runtime enable and disable feature for testing DRRS
>
> v7: This patch adds runtime enable and disable feature for testing DRRS
>      through debugfs entry "i915_drrs_ctl".
>
> v8: Commit message is updated to reflect current implementation.
>
> v9: Addressed Paulo Zanoni comments.
>      Check for DRRS_LOW at tests with OFFSCREEN + FBS_INDIVIDUAL.
>
> v10: Corrected DRRS state expectation in suspend related subtests.
>
> v11: Removing the global flag is_psr_drrs_combo [Rodrigo].
>
> v12: Rewriting the DRRS inactive deduction [Rodrigo].
>
> v13: En/Dis-able DRRS only when DRRS is capable on the setup.
>
> Signed-off-by: Lohith BS <lohith.bs@intel.com>
> Signed-off-by: aknautiy <ankit.k.nautiyal@intel.com>
> ---
>   tests/kms_frontbuffer_tracking.c | 172 +++++++++++++++++++++++++++++++++++++--
>   1 file changed, 164 insertions(+), 8 deletions(-)
>
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index 1601cab..6b2299b 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -34,7 +34,7 @@
>   
>   
>   IGT_TEST_DESCRIPTION("Test the Kernel's frontbuffer tracking mechanism and "
> -		     "its related features: FBC and PSR");
> +		     "its related features: FBC, PSR and DRRS");
>   
>   /*
>    * One of the aspects of this test is that, for every subtest, we try different
> @@ -105,8 +105,9 @@ struct test_mode {
>   		FEATURE_NONE  = 0,
>   		FEATURE_FBC   = 1,
>   		FEATURE_PSR   = 2,
> -		FEATURE_COUNT = 4,
> -		FEATURE_DEFAULT = 4,
> +		FEATURE_DRRS  = 4,
> +		FEATURE_COUNT = 8,
> +		FEATURE_DEFAULT = 8,
>   	} feature;
>   
>   	/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and
> @@ -182,6 +183,13 @@ struct {
>   	.can_test = false,
>   };
>   
> +#define MAX_DRRS_STATUS_BUF_LEN 256
> +
> +struct {
> +	bool can_test;
> +} drrs = {
> +	.can_test = false,
> +};
>   
>   #define SINK_CRC_SIZE 12
>   typedef struct {
> @@ -790,7 +798,14 @@ static void __debugfs_read(const char *param, char *buf, int len)
>   	buf[len] = '\0';
>   }
>   
> +static void __debugfs_write(const char *param, char *buf, int len)
> +{
> +	igt_assert_eq(igt_sysfs_write(drm.debugfs, param, buf, len - 1),
> +		      len - 1);
> +}
> +
redefining the __debugfs_write() as below:

static int __debugfs_write(const char *param, char *buf, int len)
{
	return igt_sysfs_write(drm.debugfs, param, buf, len - 1);
}

>   #define debugfs_read(p, arr) __debugfs_read(p, arr, sizeof(arr))
> +#define debugfs_write(p, arr) __debugfs_write(p, arr, sizeof(arr))
>   
>   static bool fbc_is_enabled(void)
>   {
> @@ -825,6 +840,62 @@ static void psr_print_status(void)
>   	igt_info("PSR status:\n%s\n", buf);
>   }
>   
> +void drrs_set(unsigned int val)
> +{
> +	char buf[2];
> +
> +	if (!drrs.can_test)
> +		return;
removing above two lines.
> +
> +	igt_debug("Manually %sabling DRRS. %llu\n", val ? "en" : "dis", val);
> +	snprintf(buf, sizeof(buf), "%d", val);
> +	debugfs_write("i915_drrs_ctl", buf);
  replacing above line with below code

	ret = debugfs_write("i915_drrs_ctl", buf);

	/* drrs_enable can't fail, as that is called on drrs capable setup only. */
	if (val)
		igt_assert_eq(ret, sizeof(buf) - 1);

--Ram

> +}
> +
> +static bool is_drrs_high(void)
> +{
> +	char buf[MAX_DRRS_STATUS_BUF_LEN];
>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-01-17  5:09 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1505724732-17529-1-git-send-email-lohith.bs@intel.com>
2017-09-18 19:54 ` [PATCH] Idleness DRRS: Rodrigo Vivi
2017-09-19 10:46   ` Ramalingam C
2017-09-19 18:12     ` Rodrigo Vivi
2017-10-31  9:20       ` [PATCH 0/2] DRRS coverage in frontbuffer tracking IGT Ramalingam C
2017-10-31  9:20         ` [PATCH 1/2] drm/i915: Runtime disable for eDP DRRS Ramalingam C
2017-10-31 18:57           ` Rodrigo Vivi
2017-11-01 16:44             ` C, Ramalingam
2017-11-07 18:38               ` [PATCH v2 " Ramalingam C
2017-11-17 18:53                 ` Rodrigo Vivi
2017-11-19 14:55                   ` C, Ramalingam
2017-11-21 20:59                     ` Rodrigo Vivi
2017-10-31  9:20         ` [PATCH 2/2] i915/drrs/debugfs: module param and psr status Ramalingam C
2017-11-07 18:40           ` [PATCH v2 2/2] i915/drrs/debugfs: crtc id " Ramalingam C
2017-11-17 18:56             ` Rodrigo Vivi
2017-11-20  3:39               ` C, Ramalingam
2017-11-20  4:23               ` [PATCH v3] i915/drrs/debugfs: psr status info addition Ramalingam C
2017-11-21 20:56                 ` Rodrigo Vivi
2017-10-31  9:20         ` [PATCH i-g-t] tests/kms_frontbuffer_tracking: Idleness DRRS coverage Ramalingam C
2017-11-10 16:22           ` [PATCH i-g-t] Idleness DRRS: Lohith BS
2017-12-06 15:13             ` [PATCH i-g-t v8] tests/kms_frontbuffer_tracking: Including DRRS test coverage Lohith BS
2017-12-06 18:30               ` Paulo Zanoni
2017-12-11 13:12               ` [PATCH i-g-t v9] " Lohith BS
2018-01-01 13:45                 ` [PATCH i-g-t v10] " Lohith BS
2018-01-02 20:34                   ` Rodrigo Vivi
2018-01-03 16:02                     ` Bs, Lohith
2018-01-03 15:02                   ` [PATCH i-g-t v11] " Lohith BS
2018-01-03 19:21                     ` Rodrigo Vivi
2018-01-03 22:14                       ` Ramalingam C
2018-01-05 11:40                     ` [PATCH i-g-t v12] " Lohith BS
2018-01-05 17:55                       ` Rodrigo Vivi
2018-01-06 10:48                         ` Ramalingam C
2018-01-06 13:37                           ` Ramalingam C
2018-01-10 14:47                       ` [PATCH i-g-t v13] " Lohith BS
2018-01-10 18:15                         ` Rodrigo Vivi
2018-01-11  5:27                           ` Ramalingam C
2018-01-11 20:22                             ` Rodrigo Vivi
2018-01-11  8:40                         ` Daniel Vetter
2018-01-17  5:05                         ` Ramalingam C [this message]
2017-10-31  9:28       ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Runtime disable for eDP DRRS Patchwork
2017-10-31  9:48       ` ✓ Fi.CI.BAT: success " Patchwork
2017-10-31 10:33       ` ✗ Fi.CI.BAT: warning for tests/kms_frontbuffer_tracking: Idleness DRRS coverage Patchwork
2017-11-08  7:26       ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Runtime disable for eDP DRRS (rev3) Patchwork
2017-11-08  8:11       ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-10 16:49       ` ✗ Fi.CI.BAT: warning for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev2) Patchwork
2017-11-20  4:46       ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/2] drm/i915: Runtime disable for eDP DRRS (rev4) Patchwork
2017-12-06 16:32       ` ✗ Fi.CI.BAT: warning for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev3) Patchwork
2017-12-11 15:56       ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev4) Patchwork
2017-12-11 17:11       ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-28 15:59       ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Runtime disable for eDP DRRS (rev4) Patchwork
2017-12-28 16:45       ` ✓ Fi.CI.IGT: " Patchwork
2018-01-02 10:37       ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev5) Patchwork
2018-01-02 13:26       ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-03 15:30       ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev6) Patchwork
2018-01-03 18:49       ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-05 12:04       ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev7) Patchwork
2018-01-05 13:25       ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-10 15:11       ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev8) Patchwork
2018-01-10 16:14       ` ✓ Fi.CI.IGT: " Patchwork
2017-09-19 10:14 ` [PATCH] Idleness DRRS: Ramalingam C

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=32b087b8-cf02-e51b-6461-15a8b5e7c281@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.saarinen@intel.com \
    --cc=jari.tahvanainen@intel.com \
    --cc=lohith.bs@intel.com \
    --cc=paulo.r.zanoni@intel.com \
    --cc=rodrigo.vivi@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