drm: Branch 'master'

[email protected] (Ilia Mirkin)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 tests/modetest/modetest.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 691a21579962d2db2d5cb1de5286fa86ef22214f
Author: Ilia Mirkin <[email protected]>
Date:   Tue Apr 18 08:54:11 2017 -0400

    modetest: fix printing of fourcc on BE machines
    
    fourcc is not a string, it's a packed integer. This happens to work out
    on LE, but gets reversed on BE.
    
    Signed-off-by: Ilia Mirkin <[email protected]>
    Reviewed-by: Michel Dänzer <[email protected]>

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index c390d875..b8891ff5 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -174,6 +174,15 @@ static const char *mode_flag_names[] = {
 
 static bit_name_fn(mode_flag)
 
+static void dump_fourcc(uint32_t fourcc)
+{
+	printf(" %c%c%c%c",
+		fourcc,
+		fourcc >> 8,
+		fourcc >> 16,
+		fourcc >> 24);
+}
+
 static void dump_encoders(struct device *dev)
 {
 	drmModeEncoder *encoder;
@@ -443,7 +452,7 @@ static void dump_planes(struct device *dev)
 
 		printf("  formats:");
 		for (j = 0; j < ovr->count_formats; j++)
-			printf(" %4.4s", (char *)&ovr->formats[j]);
+			dump_fourcc(ovr->formats[j]);
 		printf("\n");
 
 		if (plane->props) {

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

--
_______________________________________________
Dri-patches mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.