summaryrefslogtreecommitdiff
path: root/tests/kms_psr.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2018-10-23 13:57:02 -0700
committerJosé Roberto de Souza <jose.souza@intel.com>2019-01-14 14:33:15 -0800
commit465001c775a516ac1c7c24302593b02c0f73f486 (patch)
treec5f160d85a706fd5d4cddd41d5685a45dd19e3be /tests/kms_psr.c
parent7d3fdd0fdddb0993ad25d1416e77ed812f284e32 (diff)
lib/psr: Add a macro with the maximum lenght of i915_edp_psr_status and use it
So every function reading i915_edp_psr_status can allocate a buffer long enough. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'tests/kms_psr.c')
-rw-r--r--tests/kms_psr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index d00e552f..20b69892 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -191,7 +191,7 @@ static void fill_render(data_t *data, uint32_t handle, unsigned char color)
static bool sink_support(data_t *data)
{
- char buf[512];
+ char buf[PSR_STATUS_MAX_LEN];
igt_debugfs_simple_read(data->debugfs_fd, "i915_edp_psr_status",
buf, sizeof(buf));