meta-digi/meta-digi-del/recipes-multimedia/gst-fsl-plugin/gst-fsl-plugin-2.0.3/0012-gst-fsl-plugin-Only-ca...

53 lines
1.6 KiB
Diff

From: Alex Gonzalez <alex.gonzalez@digi.com>
Date: Thu, 17 May 2012 10:46:39 +0200
Subject: [PATCH] gst-fsl-plugin: Only call MXCFB_SET_OVERLAY_POS with overlay
framebuffer.
This is just to avoid the ioctl to return an error.
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
---
libs/vss/vss_common.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/libs/vss/vss_common.c b/libs/vss/vss_common.c
index ee74046..7452274 100755
--- a/libs/vss/vss_common.c
+++ b/libs/vss/vss_common.c
@@ -686,10 +686,14 @@ _setDeviceConfig(VideoDevice * vd)
int fd = _getDevicefd(vd);
- /* Workaround for ipu hardware, it need set to 0,0 before change another offset */
- pos.x = 0;
- pos.y = 0;
- VS_IOCTL(fd, MXCFB_SET_OVERLAY_POS, here1, &pos);
+
+ VS_IOCTL(fd, FBIOGET_FSCREENINFO, done, &fb_fix);
+ if( !strcmp(fb_fix.id,"DISP3 FG") ){
+ /* Workaround for ipu hardware, it need set to 0,0 before change another offset */
+ pos.x = 0;
+ pos.y = 0;
+ VS_IOCTL(fd, MXCFB_SET_OVERLAY_POS, here1, &pos);
+ }
here1:
VS_IOCTL(fd, FBIOBLANK, done, FB_BLANK_POWERDOWN);
@@ -711,10 +715,12 @@ here1:
VS_IOCTL(fd, FBIOGET_VSCREENINFO, done, &fb_var);
VS_IOCTL(fd, FBIOGET_FSCREENINFO, done, &fb_fix);
-
- pos.x = vd->disp.left;
- pos.y = vd->disp.top;
- VS_IOCTL(fd, MXCFB_SET_OVERLAY_POS, here2, &pos);
+
+ if( !strcmp(fb_fix.id,"DISP3 FG") ){
+ pos.x = vd->disp.left;
+ pos.y = vd->disp.top;
+ VS_IOCTL(fd, MXCFB_SET_OVERLAY_POS, here2, &pos);
+ }
here2:
VS_IOCTL(fd, FBIOBLANK, done, FB_BLANK_UNBLANK);