diff mbox

[igt] igt/kms_psr_sink_crc: Add psr_drrs subtest

Message ID 20170916000008.27710-1-radhakrishna.sripada@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sripada, Radhakrishna Sept. 16, 2017, midnight UTC
Platforms do not support psr and drrs simultaneously.
Adding a subtest to make the check.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
---
 tests/kms_psr_sink_crc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Rodrigo Vivi Sept. 18, 2017, 7:36 p.m. UTC | #1
On Sat, Sep 16, 2017 at 12:00:08AM +0000, Radhakrishna Sripada wrote:
> Platforms do not support psr and drrs simultaneously.
> Adding a subtest to make the check.

I wasn't confident this was the right place for that, but
this is definitely the easisest and cleanest way.

> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>


> ---
>  tests/kms_psr_sink_crc.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
> index bd3fa5e94d85..1c25f2c81a34 100644
> --- a/tests/kms_psr_sink_crc.c
> +++ b/tests/kms_psr_sink_crc.c
> @@ -284,6 +284,15 @@ static void assert_or_manual(bool condition, const char *expected)
>  	igt_assert(igt_interactive_debug || condition);
>  }
>  
> +static bool drrs_disabled(data_t *data)
> +{
> +	char buf[512];
> +
> +	igt_debugfs_read(data->drm_fd, "i915_drrs_status", buf);
> +
> +	return strstr(buf, "DRRS Support: No\n");
> +}
> +
>  static void run_test(data_t *data)
>  {
>  	uint32_t handle = data->fb_white.gem_handle;
> @@ -524,6 +533,11 @@ int main(int argc, char *argv[])
>  		igt_assert(wait_psr_entry(&data));
>  	}
>  
> +	igt_subtest("psr_drrs") {
> +		setup_test_plane(&data);
> +		igt_assert(drrs_disabled(&data));
> +	}
> +
>  	for (op = PAGE_FLIP; op <= RENDER; op++) {
>  		igt_subtest_f("primary_%s", op_str(op)) {
>  			data.test_plane = DRM_PLANE_TYPE_PRIMARY;
> -- 
> 2.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi Sept. 18, 2017, 7:51 p.m. UTC | #2
On Mon, Sep 18, 2017 at 12:36 PM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Sat, Sep 16, 2017 at 12:00:08AM +0000, Radhakrishna Sripada wrote:
>> Platforms do not support psr and drrs simultaneously.
>> Adding a subtest to make the check.
>
> I wasn't confident this was the right place for that, but
> this is definitely the easisest and cleanest way.
>
>>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

merged to master. thanks for the patch,.

>
>
>> ---
>>  tests/kms_psr_sink_crc.c | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>
>> diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
>> index bd3fa5e94d85..1c25f2c81a34 100644
>> --- a/tests/kms_psr_sink_crc.c
>> +++ b/tests/kms_psr_sink_crc.c
>> @@ -284,6 +284,15 @@ static void assert_or_manual(bool condition, const char *expected)
>>       igt_assert(igt_interactive_debug || condition);
>>  }
>>
>> +static bool drrs_disabled(data_t *data)
>> +{
>> +     char buf[512];
>> +
>> +     igt_debugfs_read(data->drm_fd, "i915_drrs_status", buf);
>> +
>> +     return strstr(buf, "DRRS Support: No\n");
>> +}
>> +
>>  static void run_test(data_t *data)
>>  {
>>       uint32_t handle = data->fb_white.gem_handle;
>> @@ -524,6 +533,11 @@ int main(int argc, char *argv[])
>>               igt_assert(wait_psr_entry(&data));
>>       }
>>
>> +     igt_subtest("psr_drrs") {
>> +             setup_test_plane(&data);
>> +             igt_assert(drrs_disabled(&data));
>> +     }
>> +
>>       for (op = PAGE_FLIP; op <= RENDER; op++) {
>>               igt_subtest_f("primary_%s", op_str(op)) {
>>                       data.test_plane = DRM_PLANE_TYPE_PRIMARY;
>> --
>> 2.9.3
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Petri Latvala Sept. 19, 2017, 9:41 a.m. UTC | #3
On Mon, Sep 18, 2017 at 12:51:07PM -0700, Rodrigo Vivi wrote:
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> merged to master. thanks for the patch,.


Obligatory scolding: You forgot to add your R-b to the commit message.
Rodrigo Vivi Sept. 19, 2017, 11:22 p.m. UTC | #4
On Tue, Sep 19, 2017 at 09:41:36AM +0000, Petri Latvala wrote:
> On Mon, Sep 18, 2017 at 12:51:07PM -0700, Rodrigo Vivi wrote:
> > > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > 
> > merged to master. thanks for the patch,.
> 
> 
> Obligatory scolding: You forgot to add your R-b to the commit message.

Duh! o>

I get I got used to dim tool and patchwork adding that for me...
I assume that I also forgot to sign-off...

Sorry about that...

> 
> 
> -- 
> Petri Latvala
Dhinakaran Pandiyan Sept. 20, 2017, 1:26 a.m. UTC | #5
On Fri, 2017-09-15 at 17:00 -0700, Radhakrishna Sripada wrote:
> Platforms do not support psr and drrs simultaneously.

> Adding a subtest to make the check.

> 

> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>

> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>

> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>

> ---

>  tests/kms_psr_sink_crc.c | 14 ++++++++++++++

>  1 file changed, 14 insertions(+)

> 

> diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c

> index bd3fa5e94d85..1c25f2c81a34 100644

> --- a/tests/kms_psr_sink_crc.c

> +++ b/tests/kms_psr_sink_crc.c

> @@ -284,6 +284,15 @@ static void assert_or_manual(bool condition, const char *expected)

>  	igt_assert(igt_interactive_debug || condition);

>  }

>  

> +static bool drrs_disabled(data_t *data)

> +{

> +	char buf[512];

> +

> +	igt_debugfs_read(data->drm_fd, "i915_drrs_status", buf);

> +

> +	return strstr(buf, "DRRS Support: No\n");

                                        ^ 
This is causing the PSR sink crc test to fail. The string I see in the
kernel is. 

	seq_puts(m, "\tDRRS Supported : No");

Also, how does this work when there is more than one enabled crtc? For
e.g., my machine has 

 cat /sys/kernel/debug/dri/0/i915_drrs_status

CRTC 1:  eDP-1:
        VBT: DRRS_type: Static

        DRRS Supported : No

CRTC 2:  DP-4:
        VBT: DRRS_type: Static

        DRRS Supported : No

If the eDP supported DRRS( and PSR was enabled) and the external display
did not, won't this result in a false positive?


> +}

> +

>  static void run_test(data_t *data)

>  {

>  	uint32_t handle = data->fb_white.gem_handle;

> @@ -524,6 +533,11 @@ int main(int argc, char *argv[])

>  		igt_assert(wait_psr_entry(&data));

>  	}

>  

> +	igt_subtest("psr_drrs") {

> +		setup_test_plane(&data);

> +		igt_assert(drrs_disabled(&data));

> +	}

> +

>  	for (op = PAGE_FLIP; op <= RENDER; op++) {

>  		igt_subtest_f("primary_%s", op_str(op)) {

>  			data.test_plane = DRM_PLANE_TYPE_PRIMARY;
Rodrigo Vivi Sept. 20, 2017, 3:29 a.m. UTC | #6
> On Sep 19, 2017, at 6:26 PM, Pandiyan, Dhinakaran <dhinakaran.pandiyan@intel.com> wrote:
> 
> 
>> On Fri, 2017-09-15 at 17:00 -0700, Radhakrishna Sripada wrote:
>> Platforms do not support psr and drrs simultaneously.
>> Adding a subtest to make the check.
>> 
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
>> ---
>> tests/kms_psr_sink_crc.c | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>> 
>> diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
>> index bd3fa5e94d85..1c25f2c81a34 100644
>> --- a/tests/kms_psr_sink_crc.c
>> +++ b/tests/kms_psr_sink_crc.c
>> @@ -284,6 +284,15 @@ static void assert_or_manual(bool condition, const char *expected)
>>    igt_assert(igt_interactive_debug || condition);
>> }
>> 
>> +static bool drrs_disabled(data_t *data)
>> +{
>> +    char buf[512];
>> +
>> +    igt_debugfs_read(data->drm_fd, "i915_drrs_status", buf);
>> +
>> +    return strstr(buf, "DRRS Support: No\n");
>                                        ^ 
> This is causing the PSR sink crc test to fail. The string I see in the
> kernel is. 
> 
>    seq_puts(m, "\tDRRS Supported : No");
> 
> Also, how does this work when there is more than one enabled crtc? For
> e.g., my machine has 
> 
> cat /sys/kernel/debug/dri/0/i915_drrs_status
> 
> CRTC 1:  eDP-1:
>        VBT: DRRS_type: Static
> 
>        DRRS Supported : No
> 
> CRTC 2:  DP-4:
>        VBT: DRRS_type: Static
> 
>        DRRS Supported : No
> 
> If the eDP supported DRRS( and PSR was enabled) and the external display
> did not, won't this result in a false positive?

Yes... we need a quick fix on test case or to revert the test case while it cannot handle proper parse for edp's drrs...

> 
> 
>> +}
>> +
>> static void run_test(data_t *data)
>> {
>>    uint32_t handle = data->fb_white.gem_handle;
>> @@ -524,6 +533,11 @@ int main(int argc, char *argv[])
>>        igt_assert(wait_psr_entry(&data));
>>    }
>> 
>> +    igt_subtest("psr_drrs") {
>> +        setup_test_plane(&data);
>> +        igt_assert(drrs_disabled(&data));
>> +    }
>> +
>>    for (op = PAGE_FLIP; op <= RENDER; op++) {
>>        igt_subtest_f("primary_%s", op_str(op)) {
>>            data.test_plane = DRM_PLANE_TYPE_PRIMARY;
diff mbox

Patch

diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index bd3fa5e94d85..1c25f2c81a34 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -284,6 +284,15 @@  static void assert_or_manual(bool condition, const char *expected)
 	igt_assert(igt_interactive_debug || condition);
 }
 
+static bool drrs_disabled(data_t *data)
+{
+	char buf[512];
+
+	igt_debugfs_read(data->drm_fd, "i915_drrs_status", buf);
+
+	return strstr(buf, "DRRS Support: No\n");
+}
+
 static void run_test(data_t *data)
 {
 	uint32_t handle = data->fb_white.gem_handle;
@@ -524,6 +533,11 @@  int main(int argc, char *argv[])
 		igt_assert(wait_psr_entry(&data));
 	}
 
+	igt_subtest("psr_drrs") {
+		setup_test_plane(&data);
+		igt_assert(drrs_disabled(&data));
+	}
+
 	for (op = PAGE_FLIP; op <= RENDER; op++) {
 		igt_subtest_f("primary_%s", op_str(op)) {
 			data.test_plane = DRM_PLANE_TYPE_PRIMARY;