Re: [Intel-gfx] [PATCH] Idleness DRRS:

2017-09-19 Thread Rodrigo Vivi
On Tue, Sep 19, 2017 at 10:46:49AM +, Ramalingam C wrote:
> 
> 
> On Tuesday 19 September 2017 01:24 AM, Rodrigo Vivi wrote:
> > On Mon, Sep 18, 2017 at 08:52:12AM +,  wrote:
> > > From: Lohith BS 
> > > 
> > >   By default the DRRS state will be at DRRS_HIGH_RR. When a Display
> > >   content is Idle for more than 1Sec Idleness will be declared and
> > >   DRRS_LOW_RR will be invoked, changing the refresh rate to the
> > >   lower most refresh rate supported by the panel. As soon as there
> > >   is a display content change there will be a DRRS state transition
> > >   as DRRS_LOW_RR--> DRRS_HIGH_RR, changing the refresh rate to the
> > >   highest refresh rate supported by the panel.
> > > 
> > > To test this, Idleness DRRS IGT will probe the DRRS state at below
> > > instances and compare with the expected state.
> > > 
> > >   InstanceExpected State
> > > 1. Immediately after rendering the still imageDRRS_HIGH_RR
> > > 2. After a delay of 1.2SecDRRS_LOW_RR
> > > 3. After changing the frame bufferDRRS_HIGH_RR
> > > 4. After a delay of 1.2SecDRRS_LOW_RR
> > > 5. After changing the frame bufferDRRS_HIGH_RR
> > > 6. After a delay of 1.2SecDRRS_LOW_RR
> > > 
> > > The test checks the driver DRRS state from the debugfs entry. To check the
> > > actual refresh-rate, the number of vblanks received per sec.
> > > The refresh-rate calculated is checked against the expected refresh-rate
> > > with a tolerance value of 2.
> > > 
> > > This patch is a continuation of the earlier work
> > > https://patchwork.freedesktop.org/patch/45472/ towards igt for idleness
> > > 
> > > DRRS. The code is tested on Broxton BXT_T platform.
> > > 
> > > 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/";
> > > 
> > > Signed-off-by: Lohith BS 
> > > Signed-off-by: Ramalingam C 
> > > Signed-off-by: Vandana Kannan 
> > > Signed-off-by: aknautiy 
> > > ---
> > >   tests/kms_frontbuffer_tracking.c | 161 
> > > ---
> > >   1 file changed, 152 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/tests/kms_frontbuffer_tracking.c 
> > > b/tests/kms_frontbuffer_tracking.c
> > > index a068c8a..4f44109 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 DRRS and PSR");
> > >   /*
> > >* 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 = 6,
> > > + FEATURE_DEFAULT = 6,
> > >   } feature;
> > >   /* Possible pixel formats. We just use FORMAT_DEFAULT for most 
> > > tests and
> > > @@ -180,6 +181,9 @@ struct {
> > >   bool can_test;
> > >   } psr = {
> > >   .can_test = false,
> > > +},
> > > +drrs  = {
> > > + .can_test = false,
> > >   };
> > > @@ -822,6 +826,52 @@ static void psr_print_status(void)
> > >   igt_info("PSR status:\n%s\n", buf);
> > >   }
> > > +static bool is_drrs_high(void)
> > > +{
> > > + char buf[256];
> > > +
> > > + debugfs_read("i915_drrs_status", buf);
> > > + return strstr(buf, "DRRS_HIGH_RR");
> > > +}
> > > +
> > > +static bool is_drrs_low(void)
> > > +{
> > > + char buf[256];
> 

Re: [Intel-gfx] [PATCH] Idleness DRRS:

2017-09-19 Thread Ramalingam C



On Tuesday 19 September 2017 01:24 AM, Rodrigo Vivi wrote:

On Mon, Sep 18, 2017 at 08:52:12AM +,  wrote:

From: Lohith BS 

By default the DRRS state will be at DRRS_HIGH_RR. When a Display
content is Idle for more than 1Sec Idleness will be declared and
DRRS_LOW_RR will be invoked, changing the refresh rate to the
lower most refresh rate supported by the panel. As soon as there
is a display content change there will be a DRRS state transition
as DRRS_LOW_RR--> DRRS_HIGH_RR, changing the refresh rate to the
highest refresh rate supported by the panel.

To test this, Idleness DRRS IGT will probe the DRRS state at below
instances and compare with the expected state.

InstanceExpected State
1. Immediately after rendering the still image  DRRS_HIGH_RR
2. After a delay of 1.2Sec  DRRS_LOW_RR
3. After changing the frame buffer  DRRS_HIGH_RR
4. After a delay of 1.2Sec  DRRS_LOW_RR
5. After changing the frame buffer  DRRS_HIGH_RR
6. After a delay of 1.2Sec  DRRS_LOW_RR

The test checks the driver DRRS state from the debugfs entry. To check the
actual refresh-rate, the number of vblanks received per sec.
The refresh-rate calculated is checked against the expected refresh-rate
with a tolerance value of 2.

This patch is a continuation of the earlier work
https://patchwork.freedesktop.org/patch/45472/ towards igt for idleness

DRRS. The code is tested on Broxton BXT_T platform.

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/";

Signed-off-by: Lohith BS 
Signed-off-by: Ramalingam C 
Signed-off-by: Vandana Kannan 
Signed-off-by: aknautiy 
---
  tests/kms_frontbuffer_tracking.c | 161 ---
  1 file changed, 152 insertions(+), 9 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index a068c8a..4f44109 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 DRRS and PSR");
  
  /*

   * 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 = 6,
+   FEATURE_DEFAULT = 6,
} feature;
  
  	/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and

@@ -180,6 +181,9 @@ struct {
bool can_test;
  } psr = {
.can_test = false,
+},
+drrs  = {
+   .can_test = false,
  };
  
  
@@ -822,6 +826,52 @@ static void psr_print_status(void)

igt_info("PSR status:\n%s\n", buf);
  }
  
+static bool is_drrs_high(void)

+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_HIGH_RR");
+}
+
+static bool is_drrs_low(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_LOW_RR");
+}
+
+static bool is_drrs_enabled(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS Supported: Yes");
+}
+
+static bool is_drrs_inactive(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "No active crtc found");
+}
+
+static void drrs_print_status(void)
+{
+   char buf[256];
+
+   if (is_drrs_high())
+   igt_info("DRRS STATUS : DRRS HIGH\n

Re: [Intel-gfx] [PATCH] Idleness DRRS:

2017-09-19 Thread Ramalingam C



On Monday 18 September 2017 02:22 PM, Lohith BS wrote:

From: Lohith BS 

By default the DRRS state will be at DRRS_HIGH_RR. When a Display
content is Idle for more than 1Sec Idleness will be declared and
DRRS_LOW_RR will be invoked, changing the refresh rate to the
lower most refresh rate supported by the panel. As soon as there
is a display content change there will be a DRRS state transition
as DRRS_LOW_RR--> DRRS_HIGH_RR, changing the refresh rate to the
highest refresh rate supported by the panel.

To test this, Idleness DRRS IGT will probe the DRRS state at below
instances and compare with the expected state.

InstanceExpected State
1. Immediately after rendering the still image  DRRS_HIGH_RR
2. After a delay of 1.2Sec  DRRS_LOW_RR
3. After changing the frame buffer  DRRS_HIGH_RR
4. After a delay of 1.2Sec  DRRS_LOW_RR
5. After changing the frame buffer  DRRS_HIGH_RR
6. After a delay of 1.2Sec  DRRS_LOW_RR

The test checks the driver DRRS state from the debugfs entry. To check the
actual refresh-rate, the number of vblanks received per sec.
The refresh-rate calculated is checked against the expected refresh-rate
with a tolerance value of 2.

This patch is a continuation of the earlier work
https://patchwork.freedesktop.org/patch/45472/ towards igt for idleness

DRRS. The code is tested on Broxton BXT_T platform.

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/";

Signed-off-by: Lohith BS 
Signed-off-by: Ramalingam C 
Signed-off-by: Vandana Kannan 
Signed-off-by: aknautiy 
---
  tests/kms_frontbuffer_tracking.c | 161 ---
  1 file changed, 152 insertions(+), 9 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index a068c8a..4f44109 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 DRRS and PSR");
As DRRS and PSR cant be tested together it will be more meaningful to 
write as
"its related features: FBC and 
PSR/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 = 6,
+   FEATURE_DEFAULT = 6,
} feature;
  
  	/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and

@@ -180,6 +181,9 @@ struct {
bool can_test;
  } psr = {
.can_test = false,
+},
+drrs  = {
+   .can_test = false,
  };
  
  
@@ -822,6 +826,52 @@ static void psr_print_status(void)

igt_info("PSR status:\n%s\n", buf);
  }
  
+static bool is_drrs_high(void)

+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_HIGH_RR");
+}
+
+static bool is_drrs_low(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_LOW_RR");
+}
+
+static bool is_drrs_enabled(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS Supported: Yes");
+}
+
+static bool is_drrs_inactive(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "No active crtc found");
+}
+
+static void drrs_print_status(void)
+{

[Intel-gfx] [PATCH] Idleness DRRS:

2017-09-18 Thread Lohith BS
By default the DRRS state will be at DRRS_HIGH_RR. When a Display
content is Idle for more than 1Sec Idleness will be declared and
DRRS_LOW_RR will be invoked, changing the refresh rate to the
lower most refresh rate supported by the panel. As soon as there
is a display content change there will be a DRRS state transition
as DRRS_LOW_RR--> DRRS_HIGH_RR, changing the refresh rate to the
highest refresh rate supported by the panel.

To test this, Idleness DRRS IGT will probe the DRRS state at below
instances and compare with the expected state.

InstanceExpected State
1. Immediately after rendering the still image  DRRS_HIGH_RR
2. After a delay of 1.2Sec  DRRS_LOW_RR
3. After changing the frame buffer  DRRS_HIGH_RR
4. After a delay of 1.2Sec  DRRS_LOW_RR
5. After changing the frame buffer  DRRS_HIGH_RR
6. After a delay of 1.2Sec  DRRS_LOW_RR

The test checks the driver DRRS state from the debugfs entry. To check the
actual refresh-rate, the number of vblanks received per sec.
The refresh-rate calculated is checked against the expected refresh-rate
with a tolerance value of 2.

This patch is a continuation of the earlier work
https://patchwork.freedesktop.org/patch/45472/ towards igt for idleness

DRRS. The code is tested on Broxton BXT_T platform.

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/";

Signed-off-by: Lohith BS 
Signed-off-by: Ramalingam C 
Signed-off-by: Vandana Kannan 
Signed-off-by: aknautiy 
---
 tests/kms_frontbuffer_tracking.c | 161 ---
 1 file changed, 152 insertions(+), 9 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index a068c8a..4f44109 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 DRRS and PSR");
 
 /*
  * 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 = 6,
+   FEATURE_DEFAULT = 6,
} feature;
 
/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and
@@ -180,6 +181,9 @@ struct {
bool can_test;
 } psr = {
.can_test = false,
+},
+drrs  = {
+   .can_test = false,
 };
 
 
@@ -822,6 +826,52 @@ static void psr_print_status(void)
igt_info("PSR status:\n%s\n", buf);
 }
 
+static bool is_drrs_high(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_HIGH_RR");
+}
+
+static bool is_drrs_low(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_LOW_RR");
+}
+
+static bool is_drrs_enabled(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS Supported: Yes");
+}
+
+static bool is_drrs_inactive(void)
+{
+   char buf[256];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "No active crtc found");
+}
+
+static void drrs_print_status(void)
+{
+   char buf[256];
+
+   if (is_drrs_high())
+   igt_info("DRRS STATUS : DRRS HIGH\n");
+
+   if (is_drrs_low())
+   igt_info("DRRS_STATUS : DRRS LOW\n");
+
+   if (is_drrs_inactive())
+   igt_info("DR

Re: [Intel-gfx] [PATCH] Idleness DRRS:

2017-09-18 Thread Rodrigo Vivi
On Mon, Sep 18, 2017 at 08:52:12AM +,  wrote:
> From: Lohith BS 
> 
>   By default the DRRS state will be at DRRS_HIGH_RR. When a Display
>   content is Idle for more than 1Sec Idleness will be declared and
>   DRRS_LOW_RR will be invoked, changing the refresh rate to the
>   lower most refresh rate supported by the panel. As soon as there
>   is a display content change there will be a DRRS state transition
>   as DRRS_LOW_RR--> DRRS_HIGH_RR, changing the refresh rate to the
>   highest refresh rate supported by the panel.
> 
> To test this, Idleness DRRS IGT will probe the DRRS state at below
> instances and compare with the expected state.
> 
>   InstanceExpected State
> 1. Immediately after rendering the still imageDRRS_HIGH_RR
> 2. After a delay of 1.2SecDRRS_LOW_RR
> 3. After changing the frame bufferDRRS_HIGH_RR
> 4. After a delay of 1.2SecDRRS_LOW_RR
> 5. After changing the frame bufferDRRS_HIGH_RR
> 6. After a delay of 1.2SecDRRS_LOW_RR
> 
> The test checks the driver DRRS state from the debugfs entry. To check the
> actual refresh-rate, the number of vblanks received per sec.
> The refresh-rate calculated is checked against the expected refresh-rate
> with a tolerance value of 2.
> 
> This patch is a continuation of the earlier work
> https://patchwork.freedesktop.org/patch/45472/ towards igt for idleness
> 
> DRRS. The code is tested on Broxton BXT_T platform.
> 
> 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/";
> 
> Signed-off-by: Lohith BS 
> Signed-off-by: Ramalingam C 
> Signed-off-by: Vandana Kannan 
> Signed-off-by: aknautiy 
> ---
>  tests/kms_frontbuffer_tracking.c | 161 
> ---
>  1 file changed, 152 insertions(+), 9 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c 
> b/tests/kms_frontbuffer_tracking.c
> index a068c8a..4f44109 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 DRRS and PSR");
>  
>  /*
>   * 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 = 6,
> + FEATURE_DEFAULT = 6,
>   } feature;
>  
>   /* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and
> @@ -180,6 +181,9 @@ struct {
>   bool can_test;
>  } psr = {
>   .can_test = false,
> +},
> +drrs  = {
> + .can_test = false,
>  };
>  
>  
> @@ -822,6 +826,52 @@ static void psr_print_status(void)
>   igt_info("PSR status:\n%s\n", buf);
>  }
>  
> +static bool is_drrs_high(void)
> +{
> + char buf[256];
> +
> + debugfs_read("i915_drrs_status", buf);
> + return strstr(buf, "DRRS_HIGH_RR");
> +}
> +
> +static bool is_drrs_low(void)
> +{
> + char buf[256];
> +
> + debugfs_read("i915_drrs_status", buf);
> + return strstr(buf, "DRRS_LOW_RR");
> +}
> +
> +static bool is_drrs_enabled(void)
> +{
> + char buf[256];
> +
> + debugfs_read("i915_drrs_status", buf);
> + return strstr(buf, "DRRS Supported: Yes");
> +}
> +
> +static bool is_drrs_inactive(void)
> +{
> + char buf[256];
> +
> + debugfs_read("i915_drrs_status", buf);
> + return strstr(buf, "No active crtc found");
> +}
> +
> +static void drrs_print_status(void)
> +{