[i-g-t,1/8] lib/psr: Increase the buffer lenght that stores the output of i915_edp_psr_status

Submitted by Souza, Jose on Dec. 4, 2018, 11:09 p.m.

Details

Message ID 20181204230944.7753-1-jose.souza@intel.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Souza, Jose Dec. 4, 2018, 11:09 p.m.
Sometimes 512 bytes is not enoght to store the whole
i915_edp_psr_status potentially causing fail in tests that depends
in the content that is out of this 512 bytes.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 lib/igt_psr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 0ddfb64f..c7bc523c 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -25,10 +25,12 @@ 
 #include "igt_sysfs.h"
 #include <errno.h>
 
+#define PSR_STATUS_MAX_LEN 1024
+
 static bool psr_active(int debugfs_fd, bool check_active)
 {
 	bool active;
-	char buf[512];
+	char buf[PSR_STATUS_MAX_LEN];
 
 	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
 				sizeof(buf));

Comments

Dhinakaran Pandiyan Dec. 11, 2018, 10:53 p.m.
On Tue, 2018-12-04 at 15:09 -0800, José Roberto de Souza wrote:
> Sometimes 512 bytes is not enoght to store the whole
                             ^enough
Not enough because of SU block counts?

> i915_edp_psr_status potentially causing fail in tests that depends
> in the content that is out of this 512 bytes.
> 
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  lib/igt_psr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 0ddfb64f..c7bc523c 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -25,10 +25,12 @@
>  #include "igt_sysfs.h"
>  #include <errno.h>
>  
> +#define PSR_STATUS_MAX_LEN 1024
Move this to igt_psr.h so that we can use the same size in kms_psr.c.

> +
>  static bool psr_active(int debugfs_fd, bool check_active)
>  {
>  	bool active;
> -	char buf[512];
> +	char buf[PSR_STATUS_MAX_LEN];
>  
>  	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
>  				sizeof(buf));