drm: Branch 'master'

[email protected] (GitLab Mirror) Wed, 3 Jul 2019 04:23:38 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 tests/util/pattern.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dcc586c66c65b9b36cf62c91e060778ccf6072ed
Author: Ilia Mirkin <[email protected]>
Date:   Tue Jul 2 23:18:56 2019 -0400

    tests/util: fix incorrect memset argument order
    
    Make it actually clear the LUT.
    
    Reported-by: Dave Airlie <[email protected]>
    Signed-off-by: Ilia Mirkin <[email protected]>
    Reviewed-by: Dave Airlie <[email protected]>

diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index 42a0e5c7..bf1797d4 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -643,7 +643,7 @@ void util_smpte_c8_gamma(unsigned size, struct drm_color_lut *lut)
 		printf("Error: gamma too small: %d < %d\n", size, 7 + 7 + 8);
 		return;
 	}
-	memset(lut, size * sizeof(struct drm_color_lut), 0);
+	memset(lut, 0, size * sizeof(struct drm_color_lut));
 
 #define FILL_COLOR(idx, r, g, b) \
 	lut[idx].red = (r) << 8; \


--