All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timo Ketola <timo.ketola@exertus.fi>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/1] fbgrab: add patch fixing pixel format report
Date: Thu,  8 Mar 2018 09:22:05 +0200	[thread overview]
Message-ID: <1520493725-1146-1-git-send-email-timo.ketola@exertus.fi> (raw)

When verbosive, fbgrab reports pixel format. Green and blue offset and
msb_right fields are accidentally swapped there. This commit adds a patch
which straightens them up.

Upstream-Status: Submitted [Gunnar Monell <gmo@linux.nu>]

Signed-off-by: Timo Ketola <timo.ketola@exertus.fi>
---
No changes in the payload. Only added Upstream-status (Adrian) and
adjusted subject line (Thomas).
---
 package/fbgrab/0100-fix-pixfmt-report.patch | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 package/fbgrab/0100-fix-pixfmt-report.patch

diff --git a/package/fbgrab/0100-fix-pixfmt-report.patch b/package/fbgrab/0100-fix-pixfmt-report.patch
new file mode 100644
index 0000000..18bcf96
--- /dev/null
+++ b/package/fbgrab/0100-fix-pixfmt-report.patch
@@ -0,0 +1,22 @@
+Fix pixel format report
+
+When fbgrab tells about the framebuffer pixel format, blue and green
+are accidentally swapped in 'length' and 'msb_right' columns. Let's
+order everything as RGB.
+
+Signed-off-by timo.ketola at exertus.fi
+
+diff -u a/fbgrab.c b/fbgrab.c
+--- a/fbgrab.c	2018-03-07 11:42:04.739250433 +0200
++++ b/fbgrab.c	2018-03-07 11:43:26.128043877 +0200
+@@ -169,8 +169,8 @@
+         fprintf(stderr, "bits_per_pixel: %i\n", fb_varinfo_p->bits_per_pixel);
+         fprintf(stderr, "grayscale: %s\n", fb_varinfo_p->grayscale ? "true" : "false");
+         fprintf(stderr, "red:   offset: %i, length: %i, msb_right: %i\n", fb_varinfo_p->red.offset, fb_varinfo_p->red.length, fb_varinfo_p->red.msb_right);
+-        fprintf(stderr, "blue:  offset: %i, length: %i, msb_right: %i\n", fb_varinfo_p->blue.offset, fb_varinfo_p->green.length, fb_varinfo_p->green.msb_right);
+-        fprintf(stderr, "green: offset: %i, length: %i, msb_right: %i\n", fb_varinfo_p->green.offset, fb_varinfo_p->blue.length, fb_varinfo_p->blue.msb_right);
++        fprintf(stderr, "green: offset: %i, length: %i, msb_right: %i\n", fb_varinfo_p->green.offset, fb_varinfo_p->green.length, fb_varinfo_p->green.msb_right);
++        fprintf(stderr, "blue:  offset: %i, length: %i, msb_right: %i\n", fb_varinfo_p->blue.offset, fb_varinfo_p->blue.length, fb_varinfo_p->blue.msb_right);
+         fprintf(stderr, "alpha: offset: %i, length: %i, msb_right: %i\n", fb_varinfo_p->transp.offset, fb_varinfo_p->transp.length, fb_varinfo_p->transp.msb_right);
+         fprintf(stderr, "pixel format: %s\n", fb_varinfo_p->nonstd == 0 ? "standard" : "non-standard");
+     }
-- 
2.7.4

             reply	other threads:[~2018-03-08  7:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08  7:22 Timo Ketola [this message]
2018-03-08  8:07 ` [Buildroot] [PATCH v2 1/1] fbgrab: add patch fixing pixel format report Peter Korsgaard
2018-03-08  8:30 ` Thomas Petazzoni
2018-03-08  9:15   ` Timo Ketola
2018-03-08  9:57     ` Peter Korsgaard
2018-03-30 21:22 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520493725-1146-1-git-send-email-timo.ketola@exertus.fi \
    --to=timo.ketola@exertus.fi \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.