Skip to contentSkip to conversation

omap24xx vout and dispc library

PATCH New Komal Shah 1 participant 1 message Dec 15, 2005

Subsystems (4)
lore
Share & tools
lore

Komal Shah

author
#0 lore raw

PATCH 1/1 omap24xx vout and dispc library

Imre/Tony,

I have attached the patch which includes (done by Jian and the team...)

o display functions library [display.[ch]].
- Location: arch/arm/mach-omap2/display.c
- common omap2 dispc exported functions can then be used by fb, vout
and camera preview code.

o V4L2 based Video out patch. [omap24xxvout.[ch]]
o This framework implements
o Dynamic use of video planes
e.g As per the 2.6.9-TI code,
in camera driver V1 was fixed for preview.

Now for camera preview _or_ video out on (LCD/TV) can dynamically take the plane which is free.
o video plane linking
o and rotation/mirroring/colorkey...etc.

o omap24xxlib.[ch]
- It includes functions common between camera preview and vout. (cropping/scaling)

Attached patch works with 2.6.9-TI omap24xxfb (considering that it uses the display.[ch] library) driver.

I am *not* able to successfully test this driver along with git-omap2-fb driver. See I have disabled request_irq, dispc reset/initialisation in the omap2_disp_init(dispc.c) patch.

But as git-omap2-fb driver is checking FIFO_UNDERFLOW/SYNC_LOST interrupts, which I am getting more than five times, which ultimately disables the display irq (irq_status 0x4000, 0x40a2, 0x4002....), and my test-application(e.g streaming yuv on v1) hangs the system after that...

So, could you please have look at the patch, so that we can find better way to integrate vout and display controller library functions into the git tree. Thanx.

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

arch/arm/mach-omap2/Makefile +1 -1
index 4cc80f7..354819b 100644
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o serial.o
+obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o serial.o display.o
 
 obj-$(CONFIG_OMAP_MPU_TIMER)		+= timer-gp.o
 
arch/arm/mach-omap2/display.c new file +1777 -0

1,777 lines not on this page · raw message

drivers/media/video/Makefile +1 -1
index febce33..ec2e012 100644
@@ -55,7 +55,7 @@ obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
 obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
 
 obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o
-obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omap/
+obj-$(CONFIG_VIDEO_OMAP) += omap/
 
 obj-$(CONFIG_VIDEO_DECODER)     += saa7115.o cx25840/ saa7127.o
 
drivers/media/video/omap/Kconfig +12 -2
index 809193b..ecb7f53 100644
@@ -1,7 +1,11 @@
+config VIDEO_OMAP
+	tristate "Video devices for OMAP1/2"
+	select VIDEO_BUF
+	depends on VIDEO_DEV
+	
 config VIDEO_OMAP_CAMERA
 	tristate "OMAP Camera support (EXPERIMENTAL)"
-	select VIDEO_BUF
-	depends on VIDEO_DEV && (ARCH_OMAP16XX || ARCH_OMAP24XX)
+	depends on VIDEO_OMAP && (ARCH_OMAP16XX || ARCH_OMAP24XX)
 	help
 	  V4L2 camera driver support for OMAP1/2 based boards.
 	
@@ -10,3 +14,9 @@ config VIDEO_CAMERA_SENSOR_OV9640
 	depends on VIDEO_OMAP_CAMERA
 	help
 	  OmniVision 9640 camera sensor support
+
+config VIDEO_OMAP2_OUT
+	tristate "OMAP2 TV/LCD Video Out support"
+	depends on VIDEO_OMAP && ARCH_OMAP2
+	help
+	  OMAP2 TV/LCD Video Out support
drivers/media/video/omap/Makefile +4 -1
index c4c5a81..532b779 100644
@@ -2,12 +2,15 @@
 
 obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omapcamera.o
 obj-$(CONFIG_VIDEO_CAMERA_SENSOR_OV9640) += sensor_ov9640.o
+obj-$(CONFIG_VIDEO_OMAP2_OUT) += omapvout.o
 
-objs-yy := camera_core.o
+objs-y$(CONFIG_ARCH_OMAP16XX) += camera_core.o
 
 objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o
 objs-y$(CONFIG_MACH_OMAP_H3) += h3_sensor_power.o
+objs-$(CONFIG_ARCH_OMAP2)$(CONFIG_MACH_OMAP_H4) += omap24xxvout.o omap24xxlib.o
 
 omapcamera-objs := $(objs-yy)
+omapvout-objs := $(objs-yy)
 
 EXTRA_CFLAGS = -I$(src)/..
drivers/media/video/omap/omap24xxlib.c new file +269 -0

269 lines not on this page · raw message

drivers/media/video/omap/omap24xxlib.h new file +34 -0
new file mode 100644
index 0000000..6c1f906
@@ -0,0 +1,34 @@
+/*
+ * drivers/media/video/omap/omap24xxlib.h
+ *
+ * Copyright (C) 2005 Texas Instruments.
+ *
+ * This file is licensed under the terms of the GNU General Public License 
+ * version 2. This program is licensed "as is" without any warranty of any 
+ * kind, whether express or implied.
+ *
+ */
+
+#ifndef OMAP24XXLIB_VIDEO_H
+#define OMAP24XXLIB_VIDEO_H
+
+extern void
+ omap24xxvout_default_crop(struct v4l2_pix_format *pix,	struct v4l2_framebuffer *fbuf,
+				struct v4l2_rect *crop);
+
+extern int
+ omap24xxvout_new_crop(struct v4l2_pix_format *pix, struct v4l2_rect *crop,
+			struct v4l2_window *win, struct v4l2_framebuffer *fbuf,
+			const struct v4l2_rect *new_crop);
+
+extern int
+ omap24xxvout_try_window(struct v4l2_framebuffer *fbuf, struct v4l2_window *new_win);
+
+extern int
+ omap24xxvout_new_window(struct v4l2_rect *crop,struct v4l2_window *win,
+			struct v4l2_framebuffer *fbuf, struct v4l2_window *new_win);
+
+extern void
+ omap24xxvout_new_format(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf,
+			 struct v4l2_rect *crop, struct v4l2_window *win);
+#endif
drivers/media/video/omap/omap24xxvout.c new file +1568 -0

866 lines not on this page · raw message

drivers/media/video/omap/omap24xxvout.h new file +107 -0

107 lines not on this page · raw message

include/asm-arm/arch-omap/display.h new file +619 -0

619 lines not on this page · raw message

include/asm-arm/arch-omap/venc.h new file +573 -0

573 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.