From: Robert Schwebel <r.schwebel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: [ptxdist] [PATCH 03/28] mplayer: clean up patches
Date: Sun, 30 Oct 2011 23:00:34 +0100 [thread overview]
Message-ID: <1320012059-24971-3-git-send-email-r.schwebel@pengutronix.de> (raw)
In-Reply-To: <1320012059-24971-1-git-send-email-r.schwebel@pengutronix.de>
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
...ayer-Suport-RGB-frambuffers-in-vo_fbdev.c.patch | 98 ++++++++++++++++++++
patches/MPlayer-1.0rc4/series | 1 -
.../MPlayer-1.0rc4/support_RGB_framebuffer.patch | 89 ------------------
3 files changed, 98 insertions(+), 90 deletions(-)
create mode 100644 patches/MPlayer-1.0rc4/0001-MPlayer-Suport-RGB-frambuffers-in-vo_fbdev.c.patch
delete mode 100644 patches/MPlayer-1.0rc4/series
delete mode 100644 patches/MPlayer-1.0rc4/support_RGB_framebuffer.patch
diff --git a/patches/MPlayer-1.0rc4/0001-MPlayer-Suport-RGB-frambuffers-in-vo_fbdev.c.patch b/patches/MPlayer-1.0rc4/0001-MPlayer-Suport-RGB-frambuffers-in-vo_fbdev.c.patch
new file mode 100644
index 0000000..c796e3d
--- /dev/null
+++ b/patches/MPlayer-1.0rc4/0001-MPlayer-Suport-RGB-frambuffers-in-vo_fbdev.c.patch
@@ -0,0 +1,98 @@
+From d168b399924f2cf753536d64753290988354eba0 Mon Sep 17 00:00:00 2001
+From: unknown author <unknown.author@example.com>
+Date: Sat, 29 Oct 2011 18:44:33 +0200
+Subject: [PATCH] MPlayer: Suport RGB frambuffers in vo_fbdev.c
+
+Using this upstream patch (r33289) mplayer supports a RGB framebuffer.
+Before only BGR framebuffers were supported.
+
+Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
+---
+ libvo/vo_fbdev.c | 20 +++++++++++++-------
+ 1 files changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
+index 7ddf2ad..92bad49 100644
+--- a/libvo/vo_fbdev.c
++++ b/libvo/vo_fbdev.c
+@@ -491,7 +491,7 @@ static fb_mode_t *find_best_mode(int xres, int yres, range_t *hfreq,
+ return best;
+ }
+
+-static void set_bpp(struct fb_var_screeninfo *p, int bpp)
++static void set_bpp(struct fb_var_screeninfo *p, int bpp, int rgb)
+ {
+ p->bits_per_pixel = FFALIGN(bpp, 2);
+ p->red.msb_right = p->green.msb_right = p->blue.msb_right = p->transp.msb_right = 0;
+@@ -530,15 +530,19 @@ static void set_bpp(struct fb_var_screeninfo *p, int bpp)
+ p->blue.length = 4;
+ break;
+ }
++ if (rgb) {
++ p->blue.offset = p->red.offset;
++ p->red.offset = 0;
++ }
+ }
+
+-static void fb_mode2fb_vinfo(fb_mode_t *m, struct fb_var_screeninfo *v)
++static void fb_mode2fb_vinfo(fb_mode_t *m, struct fb_var_screeninfo *v, int rgb)
+ {
+ v->xres = m->xres;
+ v->yres = m->yres;
+ v->xres_virtual = m->vxres;
+ v->yres_virtual = m->vyres;
+- set_bpp(v, m->depth);
++ set_bpp(v, m->depth, rgb);
+ v->pixclock = m->pixclock;
+ v->left_margin = m->left;
+ v->right_margin = m->right;
+@@ -574,6 +578,7 @@ static struct fb_var_screeninfo fb_vinfo;
+ static unsigned short fb_ored[256], fb_ogreen[256], fb_oblue[256];
+ static struct fb_cmap fb_oldcmap = { 0, 256, fb_ored, fb_ogreen, fb_oblue };
+ static int fb_cmap_changed = 0;
++static int fb_rgb;
+ static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2
+ static int fb_bpp; // 32: 32 24: 24 16: 16 15: 15
+ static int fb_bpp_we_want; // 32: 32 24: 24 16: 16 15: 15
+@@ -698,6 +703,7 @@ static int fb_preinit(int reset)
+ mp_msg(MSGT_VO, MSGL_ERR, "notice: Can't open /dev/tty: %s\n", strerror(errno));
+ }
+
++ fb_rgb = !fb_vinfo.red.offset;
+ fb_bpp = fb_vinfo.bits_per_pixel;
+ if (fb_bpp == 16)
+ fb_bpp = fb_vinfo.red.length + fb_vinfo.green.length + fb_vinfo.blue.length;
+@@ -791,7 +797,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
+ mp_msg(MSGT_VO, MSGL_ERR, "can't find requested video mode\n");
+ return 1;
+ }
+- fb_mode2fb_vinfo(fb_mode, &fb_vinfo);
++ fb_mode2fb_vinfo(fb_mode, &fb_vinfo, fb_rgb);
+ } else if (vm) {
+ monitor_hfreq = str2range(monitor_hfreq_str);
+ monitor_vfreq = str2range(monitor_vfreq_str);
+@@ -808,10 +814,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
+ }
+ mp_msg(MSGT_VO, MSGL_V, "using mode %dx%d @ %.1fHz\n", fb_mode->xres,
+ fb_mode->yres, vsf(fb_mode));
+- fb_mode2fb_vinfo(fb_mode, &fb_vinfo);
++ fb_mode2fb_vinfo(fb_mode, &fb_vinfo, fb_rgb);
+ }
+ fb_bpp_we_want = fb_bpp;
+- set_bpp(&fb_vinfo, fb_bpp);
++ set_bpp(&fb_vinfo, fb_bpp, fb_rgb);
+ fb_vinfo.xres_virtual = fb_vinfo.xres;
+ fb_vinfo.yres_virtual = fb_vinfo.yres;
+ fb_page = 0;
+@@ -1016,7 +1022,7 @@ static int query_format(uint32_t format)
+ if (vidix_name)
+ return vidix_query_fourcc(format);
+ #endif
+- if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) {
++ if ((format & IMGFMT_BGR_MASK) == (fb_rgb ? IMGFMT_RGB : IMGFMT_BGR)) {
+ int bpp = format & 0xff;
+
+ if (bpp == fb_bpp)
+--
+1.7.7
+
diff --git a/patches/MPlayer-1.0rc4/series b/patches/MPlayer-1.0rc4/series
deleted file mode 100644
index 9f5ef95..0000000
--- a/patches/MPlayer-1.0rc4/series
+++ /dev/null
@@ -1 +0,0 @@
-support_RGB_framebuffer.patch -p0
diff --git a/patches/MPlayer-1.0rc4/support_RGB_framebuffer.patch b/patches/MPlayer-1.0rc4/support_RGB_framebuffer.patch
deleted file mode 100644
index 0e4b6e2..0000000
--- a/patches/MPlayer-1.0rc4/support_RGB_framebuffer.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Subject: MPlayer: Suport RGB frambuffers in vo_fbdev.c
-
-Using this upstream patch (r33289) mplayer supports a RGB framebuffer.
-Before only BGR framebuffers were supported.
-
-Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
-
-Index: libvo/vo_fbdev.c
-===================================================================
---- libvo/vo_fbdev.c (Revision 33288)
-+++ libvo/vo_fbdev.c (Revision 33289)
-@@ -487,7 +487,7 @@
- return best;
- }
-
--static void set_bpp(struct fb_var_screeninfo *p, int bpp)
-+static void set_bpp(struct fb_var_screeninfo *p, int bpp, int rgb)
- {
- p->bits_per_pixel = FFALIGN(bpp, 2);
- p->red.msb_right = p->green.msb_right = p->blue.msb_right = p->transp.msb_right = 0;
-@@ -526,15 +526,19 @@
- p->blue.length = 4;
- break;
- }
-+ if (rgb) {
-+ p->blue.offset = p->red.offset;
-+ p->red.offset = 0;
-+ }
- }
-
--static void fb_mode2fb_vinfo(fb_mode_t *m, struct fb_var_screeninfo *v)
-+static void fb_mode2fb_vinfo(fb_mode_t *m, struct fb_var_screeninfo *v, int rgb)
- {
- v->xres = m->xres;
- v->yres = m->yres;
- v->xres_virtual = m->vxres;
- v->yres_virtual = m->vyres;
-- set_bpp(v, m->depth);
-+ set_bpp(v, m->depth, rgb);
- v->pixclock = m->pixclock;
- v->left_margin = m->left;
- v->right_margin = m->right;
-@@ -570,6 +574,7 @@
- static unsigned short fb_ored[256], fb_ogreen[256], fb_oblue[256];
- static struct fb_cmap fb_oldcmap = { 0, 256, fb_ored, fb_ogreen, fb_oblue };
- static int fb_cmap_changed = 0;
-+static int fb_rgb;
- static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2
- static int fb_bpp; // 32: 32 24: 24 16: 16 15: 15
- static int fb_bpp_we_want; // 32: 32 24: 24 16: 16 15: 15
-@@ -694,6 +699,7 @@
- mp_msg(MSGT_VO, MSGL_ERR, "notice: Can't open /dev/tty: %s\n", strerror(errno));
- }
-
-+ fb_rgb = !fb_vinfo.red.offset;
- fb_bpp = fb_vinfo.bits_per_pixel;
- if (fb_bpp == 16)
- fb_bpp = fb_vinfo.red.length + fb_vinfo.green.length + fb_vinfo.blue.length;
-@@ -787,7 +793,7 @@
- mp_msg(MSGT_VO, MSGL_ERR, "can't find requested video mode\n");
- return 1;
- }
-- fb_mode2fb_vinfo(fb_mode, &fb_vinfo);
-+ fb_mode2fb_vinfo(fb_mode, &fb_vinfo, fb_rgb);
- } else if (vm) {
- monitor_hfreq = str2range(monitor_hfreq_str);
- monitor_vfreq = str2range(monitor_vfreq_str);
-@@ -804,10 +810,10 @@
- }
- mp_msg(MSGT_VO, MSGL_V, "using mode %dx%d @ %.1fHz\n", fb_mode->xres,
- fb_mode->yres, vsf(fb_mode));
-- fb_mode2fb_vinfo(fb_mode, &fb_vinfo);
-+ fb_mode2fb_vinfo(fb_mode, &fb_vinfo, fb_rgb);
- }
- fb_bpp_we_want = fb_bpp;
-- set_bpp(&fb_vinfo, fb_bpp);
-+ set_bpp(&fb_vinfo, fb_bpp, fb_rgb);
- fb_vinfo.xres_virtual = fb_vinfo.xres;
- fb_vinfo.yres_virtual = fb_vinfo.yres;
- fb_page = 0;
-@@ -1012,7 +1018,7 @@
- if (vidix_name)
- return vidix_query_fourcc(format);
- #endif
-- if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) {
-+ if ((format & IMGFMT_BGR_MASK) == (fb_rgb ? IMGFMT_RGB : IMGFMT_BGR)) {
- int bpp = format & 0xff;
-
- if (bpp == fb_bpp)
--
1.7.7
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2011-10-30 22:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-30 22:00 [ptxdist] Patch cleanup Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 01/28] canfestival: clean up patches Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 02/28] devicekit-disks: " Robert Schwebel
2011-10-30 22:00 ` Robert Schwebel [this message]
2011-10-30 22:00 ` [ptxdist] [PATCH 04/28] policykit: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 05/28] sdl: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 06/28] sdl-mixer: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 07/28] atop: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 08/28] bing: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 09/28] bridge-utils: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 10/28] bzip2: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 11/28] cbmbasic: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 12/28] cpufrequtils: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 13/28] cvs: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 14/28] daemonize: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 15/28] dibbler: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 16/28] e2fsprogs: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 17/28] efax: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 18/28] eggdbus: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 19/28] elektra: remove orphaned package Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 20/28] etherwake: clean up patches Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 21/28] fakeroot: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 22/28] fbtest: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 23/28] font-alias: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 24/28] freetype: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 25/28] glademm: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 26/28] gpsd: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 27/28] gst-plugins-gl: " Robert Schwebel
2011-10-30 22:00 ` [ptxdist] [PATCH 28/28] gtk: " Robert Schwebel
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=1320012059-24971-3-git-send-email-r.schwebel@pengutronix.de \
--to=r.schwebel@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox