Re: [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo"
On Wed, Apr 24, 2013 at 11:17:52AM +0200, Laurent Pinchart wrote: > Hi Adam, > > Thanks for the patch. > > On Wednesday 24 April 2013 15:57:19 adam@canonical.com wrote: > > From: Adam Lee > > > > This reverts commit 3dae8b41dc5651f8eb22cf310e8b116480ba25b7. > > > > 1, I do have a Chicony webcam, implements autosuspend in a broken way, > > make `poweroff` performs rebooting when its autosuspend enabled. > > > > 2, There are other webcams which don't support autosuspend too, like > > https://patchwork.kernel.org/patch/2356141/ > > > > 3, kernel removed USB_QUIRK_NO_AUTOSUSPEND in > > a691efa9888e71232dfb4088fb8a8304ffc7b0f9, because autosuspend is > > disabled by default. > > > > So, we need to disable autosuspend in uvcvideo, maintaining a quirk list > > only for uvcvideo is not a good idea. > > I've received very few bug reports about broken auto-suspend support in UVC > devices. Most of them could be solved by setting the RESET_RESUME quirk in > USB > core, only the Creative Live! Cam Optia AF required a quirk in the uvcvideo > driver. I would thus rather use the available quirks (USB_QUIRK_RESET_RESUME > if possible, UVC_QUIRK_DISABLE_AUTOSUSPEND otherwise) than killing power > management for the vast majority of webcams that behave correctly. Here comes another one, integrated Chicony webcam 04f2:b39f, its autosuspend makes `poweroff` performs rebooting at the laptop I'm working on. I tried USB_QUIRK_RESET_RESUME, not helping. The quirks list will go longer and longer absolutely, do uvcvideo wanna maintain that? And why only uvcvideo do this in kernel space which against general USB module? I still suggest we disable it by default, people can enable it in udev just like almost all distroes do for udisks. Please consider about it. -- Regards, Adam Lee Hardware Enablement -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
uvcvideo: Trying to lower the URB buffers on eMPIA minicam
Hello guys, My nickname is Nunux, I'm a geek, and need some help ... I just buy ten minicam to do a poker TV table. The minicam are eMPIA: eb1a:299f I've a PC with 1 internal USB BUS 2.0 and 3 PCI extension cards USB BUS 2.0 Currently, I can have only one cam eMPIA working per USB BUS but no more even if I set the lower resolution of 160x120. [ 2768.783291] uvcvideo: Device requested 1024 B/frame bandwidth. [ 2768.783295] uvcvideo: Selecting alternate setting 4 (2736 B/frame bandwidth). [ 2768.783641] uvcvideo: Allocated 5 URB buffers of 15x2736 bytes each. [ 2768.783664] uvcvideo: Failed to submit URB 0 (-28). So I can have 4 minicam at a time, but need 10. I'm running Linux 3.5.0 on Ubuntu. pierre@SuperTable:/usr/src/linux-source-3.5.0/linux-source-3.5.0/drivers/media/video/uvc$ uvcdynctrl -f -d /dev/video0 Listing available frame formats for device /dev/video0: Pixel format: YUYV (YUV 4:2:2 (YUYV); MIME type: video/x-raw-yuv) Frame size: 640x480 Frame rates: 30 Frame size: 160x120 Frame rates: 30 Frame size: 176x144 Frame rates: 30 Frame size: 320x240 Frame rates: 30 Frame size: 352x288 Frame rates: 30 Frame size: 640x480 Frame rates: 30 I try to patch uvc_video.c like this: /* Isochronous endpoint, select the alternate setting. */ //bandwidth = stream->ctrl.dwMaxPayloadTransferSize; bandwidth = 1024; That help me to reduce the USB bandwidth down to 1024 on a Microsoft LifeCam Cinema: [ 944.410066] USB Video Class driver (1.1.1) [ 948.636665] uvcvideo: Device requested 1024 B/frame bandwidth. [ 948.636670] uvcvideo: Selecting alternate setting 4 (1024 B/frame bandwidth). [ 948.912793] uvcvideo: Allocated 5 URB buffers of 32x1024 bytes each. And allow me to run up to 3 Microsoft LifeCam Cinema on the same PCI USB Card. But it's not working on eMPIA minicam: [ 982.488896] uvcvideo: Device requested 1024 B/frame bandwidth. [ 982.488901] uvcvideo: Selecting alternate setting 4 (2736 B/frame bandwidth). [ 982.489355] uvcvideo: Allocated 5 URB buffers of 32x2736 bytes each. Because even if the request bandwdith is fixed to 1024, there is no endpoint with such lower bandwidth. -- So my question is, is it possible to lower the bandwidth of the endpoint, or use a different bandwidth, or the do anything to run 3 cams per usb ports ? I host a mini poker mtt for my wife birthday this saturday, and hope get some thing to work before... So any help or comments would be really appreciated, Many regards, Nunux Bus 004 Device 002: ID eb1a:299f eMPIA Technology, Inc. Couldn't open device, some information will be missing Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize064 idVendor 0xeb1a eMPIA Technology, Inc. idProduct 0x299f bcdDevice0.05 iManufacturer 1 iProduct2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 441 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 0 VideoControl Interface Descriptor: bLength13 bDescriptorType36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 77 dwClockFrequency 30.00MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength18 bDescriptorType36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength0 bControlSize 3 bmControls 0x0004
Re: [PATCH] soc_camera: Add V4L2_MBUS_FMT_YUYV10_2X10 format
Hi Phil Thanks for the patch. On Wed, 17 Apr 2013, Phil Edworthy wrote: > The V4L2_MBUS_FMT_YUYV10_2X10 format has already been added to mediabus, so > this patch just adds SoC camera support. > > Signed-off-by: Phil Edworthy > --- > drivers/media/platform/soc_camera/soc_mediabus.c | 15 +++ > include/media/soc_mediabus.h |3 +++ > 2 files changed, 18 insertions(+), 0 deletions(-) > > diff --git a/drivers/media/platform/soc_camera/soc_mediabus.c > b/drivers/media/platform/soc_camera/soc_mediabus.c > index 7569e77..be47d41 100644 > --- a/drivers/media/platform/soc_camera/soc_mediabus.c > +++ b/drivers/media/platform/soc_camera/soc_mediabus.c > @@ -57,6 +57,15 @@ static const struct soc_mbus_lookup mbus_fmt[] = { > .layout = SOC_MBUS_LAYOUT_PACKED, > }, > }, { > + .code = V4L2_MBUS_FMT_YUYV10_2X10, > + .fmt = { > + .fourcc = V4L2_PIX_FMT_YUYV, > + .name = "YUYV", > + .bits_per_sample= 10, > + .packing= SOC_MBUS_PACKING_2X10_PADHI, Wow, what kind of host can pack two 10-bit samples into 3 bytes and write 3-byte pixels to memory? > + .order = SOC_MBUS_ORDER_LE, > + }, > +}, { > .code = V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, > .fmt = { > .fourcc = V4L2_PIX_FMT_RGB555, > @@ -403,6 +412,10 @@ int soc_mbus_samples_per_pixel(const struct > soc_mbus_pixelfmt *mf, > *numerator = 2; > *denominator = 1; > return 0; > + case SOC_MBUS_PACKING_2X10_PADHI: > + *numerator = 3; > + *denominator = 1; Why 3? it's 2 samples per pixel, right? Should be *numerator = 2 above? > + return 0; > case SOC_MBUS_PACKING_1_5X8: > *numerator = 3; > *denominator = 2; > @@ -428,6 +441,8 @@ s32 soc_mbus_bytes_per_line(u32 width, const struct > soc_mbus_pixelfmt *mf) > case SOC_MBUS_PACKING_2X8_PADLO: > case SOC_MBUS_PACKING_EXTEND16: > return width * 2; > + case SOC_MBUS_PACKING_2X10_PADHI: > + return width * 3; > case SOC_MBUS_PACKING_1_5X8: > return width * 3 / 2; > case SOC_MBUS_PACKING_VARIABLE: > diff --git a/include/media/soc_mediabus.h b/include/media/soc_mediabus.h > index d33f6d0..b131a47 100644 > --- a/include/media/soc_mediabus.h > +++ b/include/media/soc_mediabus.h > @@ -21,6 +21,8 @@ > * @SOC_MBUS_PACKING_2X8_PADHI: 16 bits transferred in 2 8-bit samples, > in the > * possibly incomplete byte high bits are padding > * @SOC_MBUS_PACKING_2X8_PADLO: as above, but low bits are padding > + * @SOC_MBUS_PACKING_2X10_PADHI:20 bits transferred in 2 10-bit samples. The A TAB is missing after ":"? > + * high bits are padding > * @SOC_MBUS_PACKING_EXTEND16: sample width (e.g., 10 bits) has to be > extended > * to 16 bits > * @SOC_MBUS_PACKING_VARIABLE: compressed formats with variable packing > @@ -33,6 +35,7 @@ enum soc_mbus_packing { > SOC_MBUS_PACKING_NONE, > SOC_MBUS_PACKING_2X8_PADHI, > SOC_MBUS_PACKING_2X8_PADLO, > + SOC_MBUS_PACKING_2X10_PADHI, > SOC_MBUS_PACKING_EXTEND16, > SOC_MBUS_PACKING_VARIABLE, > SOC_MBUS_PACKING_1_5X8, > -- > 1.7.5.4 > Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/6] Davinci fbdev driver and enable it for DMx platform
Hi Prabhakar, Thank you for the patch. On Wednesday 24 April 2013 17:30:02 Prabhakar Lad wrote: > From: Lad, Prabhakar > > This patch series adds an fbdev driver for Texas > Instruments Davinci SoC.The display subsystem consists > of OSD and VENC, with OSD supporting 2 RGb planes and > 2 video planes. > http://focus.ti.com/general/docs/lit/ > getliterature.tsp?literatureNumber=sprue37d&fileType=pdf > > A good amount of the OSD and VENC enabling code is > present in the kernel, and this patch series adds the > fbdev interface. > > The fbdev driver exports 4 nodes representing each > plane to the user - from fb0 to fb3. The obvious question is: why not a KMS driver instead ? :-) > Lad, Prabhakar (6): > media: davinci: vpbe: fix checkpatch warning for CamelCase > media: davinci: vpbe: enable vpbe for fbdev addition > davinci: vpbe: add fbdev driver > ARM: davinci: dm355: enable fbdev driver > ARM: davinci: dm365: enable fbdev driver > ARM: davinci: dm644x: enable fbdev driver > > arch/arm/mach-davinci/dm355.c | 24 +- > arch/arm/mach-davinci/dm365.c | 10 + > arch/arm/mach-davinci/dm644x.c| 10 + > drivers/media/platform/davinci/vpbe_display.c |8 +- > drivers/media/platform/davinci/vpbe_osd.c | 820 - > drivers/media/platform/davinci/vpbe_venc.c| 43 + > drivers/video/Kconfig | 12 + > drivers/video/Makefile|1 + > drivers/video/davincifb.c | 2523 ++ > drivers/video/davincifb.h | 194 ++ > include/media/davinci/vpbe_osd.h | 66 +- > include/media/davinci/vpbe_venc.h | 21 + > 12 files changed, 3702 insertions(+), 30 deletions(-) > create mode 100644 drivers/video/davincifb.c > create mode 100644 drivers/video/davincifb.h -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
cron job: media_tree daily build: WARNINGS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Wed Apr 24 19:00:25 CEST 2013 git branch: test git hash: 5f3f254f7c138a22a544b80ce2c14a3fc4ed711e gcc version:i686-linux-gcc (GCC) 4.7.2 host hardware: x86_64 host os:3.8-3.slh.2-amd64 linux-git-arm-davinci: OK linux-git-arm-exynos: WARNINGS linux-git-arm-omap: WARNINGS linux-git-blackfin: WARNINGS linux-git-i686: WARNINGS linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: WARNINGS linux-2.6.31.14-i686: WARNINGS linux-2.6.32.27-i686: WARNINGS linux-2.6.33.7-i686: WARNINGS linux-2.6.34.7-i686: WARNINGS linux-2.6.35.9-i686: WARNINGS linux-2.6.36.4-i686: WARNINGS linux-2.6.37.6-i686: WARNINGS linux-2.6.38.8-i686: WARNINGS linux-2.6.39.4-i686: WARNINGS linux-3.0.60-i686: WARNINGS linux-3.1.10-i686: WARNINGS linux-3.2.37-i686: WARNINGS linux-3.3.8-i686: WARNINGS linux-3.4.27-i686: WARNINGS linux-3.5.7-i686: WARNINGS linux-3.6.11-i686: WARNINGS linux-3.7.4-i686: WARNINGS linux-3.8-i686: WARNINGS linux-3.9-rc1-i686: WARNINGS linux-2.6.31.14-x86_64: WARNINGS linux-2.6.32.27-x86_64: WARNINGS linux-2.6.33.7-x86_64: WARNINGS linux-2.6.34.7-x86_64: WARNINGS linux-2.6.35.9-x86_64: WARNINGS linux-2.6.36.4-x86_64: WARNINGS linux-2.6.37.6-x86_64: WARNINGS linux-2.6.38.8-x86_64: WARNINGS linux-2.6.39.4-x86_64: WARNINGS linux-3.0.60-x86_64: WARNINGS linux-3.1.10-x86_64: WARNINGS linux-3.2.37-x86_64: WARNINGS linux-3.3.8-x86_64: WARNINGS linux-3.4.27-x86_64: WARNINGS linux-3.5.7-x86_64: WARNINGS linux-3.6.11-x86_64: WARNINGS linux-3.7.4-x86_64: WARNINGS linux-3.8-x86_64: WARNINGS linux-3.9-rc1-x86_64: WARNINGS apps: WARNINGS spec-git: OK sparse: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Wednesday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2 The Media Infrastructure API from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR 3.10] Samsung SoC media driver fixes
Mauro, The following series includes mostly fixes for the Exynos4x12 ISP driver and some bug fixes for issues that surfaced while testing all exynos4-is drivers built as modules. Currently there is one more bug fix patch queued in -next through arm-soc tree that is needed to build the MIPI-CSIS subdev as module (30da66eafc015cd7e952829e) and I overlooked it got delayed in mainline for some reasons. The following changes since commit 5f3f254f7c138a22a544b80ce2c14a3fc4ed711e: [media] media/rc/imon.c: kill urb when send_packet() is interrupted (2013-04-23 17:50:34 -0300) are available in the git repository at: git://linuxtv.org/snawrocki/samsung.git for_v3.10_rc2 for you to fetch changes up to ee0c617b0448306bd8787894f68d9b50b88dc734: exynos4-is: Copy timestamps from M2M OUTPUT to CAPTURE buffer queue (2013-04-24 18:07:49 +0200) Sachin Kamat (2): exynos4-is: Fix potential null pointer dereferencing exynos4-is: Convert index variable to signed Sylwester Nawrocki (15): s5c73m3: Fix remove() callback to free requested resources s5c73m3: Add missing subdev .unregistered callback exynos4-is: Remove redundant MODULE_DEVICE_TABLE entries exynos4-is: Fix initialization of subdev 'flags' field exynos4-is: Fix regulator/gpio resource releasing on the driver removal exynos4-is: Don't overwrite subdevdata in the fimc-is sensor driver exynos4-is: Unregister fimc-is subdevs from the media device properly exynos4-is: Set fimc-lite subdev owner module exynos4-is: Remove redundant module_put() for MIPI-CSIS module exynos4-is: Remove debugfs entries properly exynos4-is: Change function call order in fimc_is_module_exit() exynos4-is: Fix runtime PM handling on fimc-is probe error path exynos4-is: Fix driver name reported in vidioc_querycap exynos4-is: Fix TRY format propagation at MIPI-CSIS subdev exynos4-is: Copy timestamps from M2M OUTPUT to CAPTURE buffer queue Wei Yongjun (1): s5p-mfc: fix error return code in s5p_mfc_probe() drivers/media/i2c/s5c73m3/s5c73m3-core.c | 21 +--- drivers/media/platform/exynos4-is/fimc-capture.c | 13 +++- drivers/media/platform/exynos4-is/fimc-core.c | 17 -- drivers/media/platform/exynos4-is/fimc-core.h |6 ++-- drivers/media/platform/exynos4-is/fimc-is-i2c.c|3 -- drivers/media/platform/exynos4-is/fimc-is-sensor.c | 35 +--- drivers/media/platform/exynos4-is/fimc-is-sensor.h |6 drivers/media/platform/exynos4-is/fimc-is.c| 15 - drivers/media/platform/exynos4-is/fimc-isp.c |2 +- drivers/media/platform/exynos4-is/fimc-lite.c |3 +- drivers/media/platform/exynos4-is/fimc-lite.h |2 +- drivers/media/platform/exynos4-is/fimc-m2m.c | 26 --- drivers/media/platform/exynos4-is/media-dev.c |5 ++- drivers/media/platform/exynos4-is/mipi-csis.c | 14 +++- drivers/media/platform/s5p-mfc/s5p_mfc.c |3 +- 15 files changed, 89 insertions(+), 82 deletions(-) Thanks, Sylwester -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] V4L2: soc_camera: Renesas R-Car VIN driver
Hi Sergei, On Fri, Apr 19, 2013 at 11:31 PM, Sergei Shtylyov wrote: > From: Vladimir Barinov > > Add Renesas R-Car VIN (Video In) V4L2 driver. > > Based on the patch by Phil Edworthy . > > Signed-off-by: Vladimir Barinov > [Sergei: removed deprecated IRQF_DISABLED flag.] > Signed-off-by: Sergei Shtylyov > > --- > Changes since the original posting: > - added IRQF_SHARED flag in devm_request_irq() call (since on R8A7778 VIN0/1 > share the same IRQ) and removed deprecated IRQF_DISABLED flag. > > drivers/media/platform/soc_camera/Kconfig|7 > drivers/media/platform/soc_camera/Makefile |1 > drivers/media/platform/soc_camera/rcar_vin.c | 1784 > +++ > include/linux/platform_data/camera-rcar.h| 25 > 4 files changed, 1817 insertions(+) > > Index: renesas/drivers/media/platform/soc_camera/Kconfig > === > --- renesas.orig/drivers/media/platform/soc_camera/Kconfig > +++ renesas/drivers/media/platform/soc_camera/Kconfig > @@ -45,6 +45,13 @@ config VIDEO_PXA27x > ---help--- > This is a v4l2 driver for the PXA27x Quick Capture Interface > > +config VIDEO_RCAR_VIN > + tristate "R-Car Video Input (VIN) support" > + depends on VIDEO_DEV && SOC_CAMERA && (ARCH_R8A7778 || ARCH_R8A7779) > + select VIDEOBUF2_DMA_CONTIG > + ---help--- > + This is a v4l2 driver for the R-Car VIN Interface Thanks for your work on this. I believe there are multiple SoCs containing VIN hardware, so limiting to r8a7778 and r8a7779 doesn't make sense to me. Actually, our other drivers do not have this kind of detailed dependency control. So based on that, would it be possible for you to change the above dependency to: depends on VIDEO_DEV && SOC_CAMERA Thanks, / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [media] s5p-mfc: Update v6 encoder buffer alloc
MFC v6 needs minimum number of output buffers to be queued for encoder depending on the stream type and profile. The patch modifies the driver so that encoding cannot be started with lesser number of OUTPUT buffers than required. This also fixes the crash happeninig during multi instance encoder-decoder simultaneous run due to memory allocation happening from interrupt context. Signed-off-by: Arun Kumar K --- Changes from v2: - Addressed review comments from Kamil Debski https://patchwork.kernel.org/patch/2335091/ Changes from v1: - Corrected the commit message as pointed out by John Sheu. http://www.spinics.net/lists/linux-media/msg61477.html --- drivers/media/platform/s5p-mfc/s5p_mfc.c|4 +- drivers/media/platform/s5p-mfc/s5p_mfc_common.h |3 +- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c| 20 +++ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c| 64 +-- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 29 +++--- 5 files changed, 67 insertions(+), 53 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index e810b1a..2cbd442 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -399,7 +399,7 @@ static void s5p_mfc_handle_frame(struct s5p_mfc_ctx *ctx, leave_handle_frame: spin_unlock_irqrestore(&dev->irqlock, flags); if ((ctx->src_queue_cnt == 0 && ctx->state != MFCINST_FINISHING) - || ctx->dst_queue_cnt < ctx->dpb_count) + || ctx->dst_queue_cnt < ctx->pb_count) clear_work_bit(ctx); s5p_mfc_hw_call(dev->mfc_ops, clear_int_flags, dev); wake_up_ctx(ctx, reason, err); @@ -475,7 +475,7 @@ static void s5p_mfc_handle_seq_done(struct s5p_mfc_ctx *ctx, s5p_mfc_hw_call(dev->mfc_ops, dec_calc_dpb_size, ctx); - ctx->dpb_count = s5p_mfc_hw_call(dev->mfc_ops, get_dpb_count, + ctx->pb_count = s5p_mfc_hw_call(dev->mfc_ops, get_dpb_count, dev); ctx->mv_count = s5p_mfc_hw_call(dev->mfc_ops, get_mv_count, dev); diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index 202d1d7..975d1b2 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -138,6 +138,7 @@ enum s5p_mfc_inst_state { MFCINST_INIT = 100, MFCINST_GOT_INST, MFCINST_HEAD_PARSED, + MFCINST_HEAD_PRODUCED, MFCINST_BUFS_SET, MFCINST_RUNNING, MFCINST_FINISHING, @@ -602,7 +603,7 @@ struct s5p_mfc_ctx { int after_packed_pb; int sei_fp_parse; - int dpb_count; + int pb_count; int total_dpb_count; int mv_count; /* Buffers */ diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 4af53bd..00b0703 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -210,11 +210,11 @@ static int s5p_mfc_ctx_ready(struct s5p_mfc_ctx *ctx) /* Context is to decode a frame */ if (ctx->src_queue_cnt >= 1 && ctx->state == MFCINST_RUNNING && - ctx->dst_queue_cnt >= ctx->dpb_count) + ctx->dst_queue_cnt >= ctx->pb_count) return 1; /* Context is to return last frame */ if (ctx->state == MFCINST_FINISHING && - ctx->dst_queue_cnt >= ctx->dpb_count) + ctx->dst_queue_cnt >= ctx->pb_count) return 1; /* Context is to set buffers */ if (ctx->src_queue_cnt >= 1 && @@ -224,7 +224,7 @@ static int s5p_mfc_ctx_ready(struct s5p_mfc_ctx *ctx) /* Resolution change */ if ((ctx->state == MFCINST_RES_CHANGE_INIT || ctx->state == MFCINST_RES_CHANGE_FLUSH) && - ctx->dst_queue_cnt >= ctx->dpb_count) + ctx->dst_queue_cnt >= ctx->pb_count) return 1; if (ctx->state == MFCINST_RES_CHANGE_END && ctx->src_queue_cnt >= 1) @@ -537,7 +537,7 @@ static int vidioc_reqbufs(struct file *file, void *priv, mfc_err("vb2_reqbufs on capture failed\n"); return ret; } - if (reqbufs->count < ctx->dpb_count) { + if (reqbufs->count < ctx->pb_count) { mfc_err("Not enough buffers allocated\n"); reqbufs->count = 0; s5p_mfc_clock_on(); @@ -751,7 +751,7 @@ static int s5p_mfc_dec_g_v_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: if (ctx->state >= MFCINST_HEAD_PARSED && ctx->state < MFCINST_ABORT) { - ctrl->val = ctx->dpb_co
[PATCH 5/6] ARM: davinci: dm365: enable fbdev driver
From: Lad, Prabhakar This patch enables fbdev driver by creating fbdev device and register it. Signed-off-by: Lad, Prabhakar --- arch/arm/mach-davinci/dm365.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index ff771ce..b06623c 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c @@ -1349,6 +1349,15 @@ static struct platform_device dm365_vpbe_display = { }, }; +static struct platform_device dm365_davincifb = { + .name = "davinci-vpbe-fb", + .id = -1, + .dev= { + .dma_mask = &dm365_video_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, +}; + struct venc_platform_data dm365_venc_pdata = { .setup_pinmux = dm365_vpbe_setup_pinmux, .setup_clock= dm365_venc_setup_clock, @@ -1392,6 +1401,7 @@ int __init dm365_init_video(struct vpfe_config *vpfe_cfg, platform_device_register(&dm365_venc_dev); platform_device_register(&dm365_vpbe_dev); platform_device_register(&dm365_vpbe_display); + platform_device_register(&dm365_davincifb); } return 0; -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/6] ARM: davinci: dm355: enable fbdev driver
From: Lad, Prabhakar This patch enables fbdev driver by creating fbdev device and register it. Alongside renames 'vpfe_capture_dma_mask' to 'dm355_video_dma_mask' for better clarity since it was reused by capture and diplay aswell. Signed-off-by: Lad, Prabhakar --- arch/arm/mach-davinci/dm355.c | 24 +--- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index bf9a9d4..fe50814 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -714,7 +714,7 @@ static struct resource vpfe_resources[] = { }, }; -static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32); +static u64 dm355_video_dma_mask = DMA_BIT_MASK(32); static struct resource dm355_ccdc_resource[] = { /* CCDC Base address */ { @@ -729,7 +729,7 @@ static struct platform_device dm355_ccdc_dev = { .num_resources = ARRAY_SIZE(dm355_ccdc_resource), .resource = dm355_ccdc_resource, .dev = { - .dma_mask = &vpfe_capture_dma_mask, + .dma_mask = &dm355_video_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = dm355_ccdc_setup_pinmux, }, @@ -741,7 +741,7 @@ static struct platform_device vpfe_capture_dev = { .num_resources = ARRAY_SIZE(vpfe_resources), .resource = vpfe_resources, .dev = { - .dma_mask = &vpfe_capture_dma_mask, + .dma_mask = &dm355_video_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -760,7 +760,7 @@ static struct platform_device dm355_osd_dev = { .num_resources = ARRAY_SIZE(dm355_osd_resources), .resource = dm355_osd_resources, .dev= { - .dma_mask = &vpfe_capture_dma_mask, + .dma_mask = &dm355_video_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -855,7 +855,16 @@ static struct platform_device dm355_vpbe_display = { .num_resources = ARRAY_SIZE(dm355_v4l2_disp_resources), .resource = dm355_v4l2_disp_resources, .dev= { - .dma_mask = &vpfe_capture_dma_mask, + .dma_mask = &dm355_video_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, +}; + +static struct platform_device dm355_davincifb = { + .name = "davinci-vpbe-fb", + .id = -1, + .dev= { + .dma_mask = &dm355_video_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -871,7 +880,7 @@ static struct platform_device dm355_venc_dev = { .num_resources = ARRAY_SIZE(dm355_venc_resources), .resource = dm355_venc_resources, .dev= { - .dma_mask = &vpfe_capture_dma_mask, + .dma_mask = &dm355_video_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = (void *)&dm355_venc_pdata, }, @@ -881,7 +890,7 @@ static struct platform_device dm355_vpbe_dev = { .name = "vpbe_controller", .id = -1, .dev= { - .dma_mask = &vpfe_capture_dma_mask, + .dma_mask = &dm355_video_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -1023,6 +1032,7 @@ int __init dm355_init_video(struct vpfe_config *vpfe_cfg, platform_device_register(&dm355_venc_dev); platform_device_register(&dm355_vpbe_dev); platform_device_register(&dm355_vpbe_display); + platform_device_register(&dm355_davincifb); } return 0; -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/6] ARM: davinci: dm644x: enable fbdev driver
From: Lad, Prabhakar This patch enables fbdev driver by creating fbdev device and register it. Signed-off-by: Lad, Prabhakar --- arch/arm/mach-davinci/dm644x.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index c2a9273..a4fee07 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c @@ -745,6 +745,15 @@ static struct platform_device dm644x_vpbe_display = { }, }; +static struct platform_device dm644x_davincifb = { + .name = "davinci-vpbe-fb", + .id = -1, + .dev= { + .dma_mask = &dm644x_video_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, +}; + static struct venc_platform_data dm644x_venc_pdata = { .setup_clock= dm644x_venc_setup_clock, }; @@ -909,6 +918,7 @@ int __init dm644x_init_video(struct vpfe_config *vpfe_cfg, platform_device_register(&dm644x_venc_dev); platform_device_register(&dm644x_vpbe_dev); platform_device_register(&dm644x_vpbe_display); + platform_device_register(&dm644x_davincifb); } return 0; -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/6] media: davinci: vpbe: enable vpbe for fbdev addition
From: Lad, Prabhakar enable the venc, osd and vpbe display driver for addition of fbdev driver. Mainly includes fbdev ops structure inclusion, palette and osd layer related functionality for OSD block. Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpbe_display.c |6 + drivers/media/platform/davinci/vpbe_osd.c | 796 - drivers/media/platform/davinci/vpbe_venc.c| 43 ++ include/media/davinci/vpbe_osd.h | 62 ++ include/media/davinci/vpbe_venc.h | 21 + 5 files changed, 920 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 1c4ba89..0341dcc 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -121,10 +121,12 @@ static void vpbe_isr_odd_field(struct vpbe_display *disp_obj, static irqreturn_t venc_isr(int irq, void *arg) { struct vpbe_display *disp_dev = (struct vpbe_display *)arg; + struct vpbe_device *vpbe_dev = disp_dev->vpbe_dev; struct vpbe_layer *layer; static unsigned last_event; unsigned event = 0; int fid; + int ret; int i; if ((NULL == arg) || (NULL == disp_dev->dev[0])) @@ -195,6 +197,10 @@ static irqreturn_t venc_isr(int irq, void *arg) vpbe_isr_odd_field(disp_dev, layer); } } + ret = v4l2_subdev_call(vpbe_dev->venc, core, ioctl, VENC_INTERRUPT, + &event); + if (ret < 0) + v4l2_err(&vpbe_dev->v4l2_dev, "Error in getting Field ID 0\n"); return IRQ_HANDLED; } diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index 6ed82e8..455b0ca 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -175,6 +175,13 @@ static int _osd_dm6446_vid0_pingpong(struct osd_state *sd, return 0; } +static int osd_get_field_inversion(struct osd_state *sd) +{ + struct osd_state *osd = sd; + + return osd->field_inversion; +} + static void _osd_set_field_inversion(struct osd_state *sd, int enable) { unsigned fsinv = 0; @@ -185,6 +192,365 @@ static void _osd_set_field_inversion(struct osd_state *sd, int enable) osd_modify(sd, OSD_MODE_FSINV, fsinv, OSD_MODE); } +static void osd_set_field_inversion(struct osd_state *sd, int enable) +{ + struct osd_state *osd = sd; + unsigned long flags; + + spin_lock_irqsave(&osd->lock, flags); + + osd->field_inversion = (enable != 0); + _osd_set_field_inversion(sd, enable); + + osd->pingpong = _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, + osd->win[WIN_VID0].fb_base_phys, + &osd->win[WIN_VID0].lconfig); + + spin_unlock_irqrestore(&osd->lock, flags); +} + +static void osd_get_background(struct osd_state *sd, enum osd_clut *clut, +unsigned char *clut_index) +{ + struct osd_state *osd = sd; + unsigned long flags; + + spin_lock_irqsave(&osd->lock, flags); + + *clut = osd->backg_clut; + *clut_index = osd->backg_clut_index; + + spin_unlock_irqrestore(&osd->lock, flags); +} + +static void _osd_set_background(struct osd_state *sd, enum osd_clut clut, + unsigned char clut_index) +{ + u32 mode = 0; + + if (clut == RAM_CLUT) + mode |= OSD_MODE_BCLUT; + mode |= clut_index; + osd_modify(sd, OSD_MODE_BCLUT | OSD_MODE_CABG, mode, OSD_MODE); +} + +static void osd_set_background(struct osd_state *sd, enum osd_clut clut, + unsigned char clut_index) +{ + struct osd_state *osd = sd; + unsigned long flags; + spin_lock_irqsave(&osd->lock, flags); + + osd->backg_clut = clut; + osd->backg_clut_index = clut_index; + _osd_set_background(sd, clut, clut_index); + + spin_unlock_irqrestore(&osd->lock, flags); +} + +static int osd_get_interpolation_filter(struct osd_state *sd) +{ + struct osd_state *osd = sd; + + return osd->interpolation_filter; +} + +static void _osd_set_interpolation_filter(struct osd_state *sd, int filter) +{ + struct osd_state *osd = sd; + + if (osd->vpbe_type == VPBE_VERSION_3 || + osd->vpbe_type == VPBE_VERSION_2) + osd_clear(sd, OSD_EXTMODE_EXPMDSEL, OSD_EXTMODE); + + osd_modify(sd, OSD_MODE_EF, filter ? OSD_MODE_EF : 0, OSD_MODE); +} + +static void osd_set_interpolation_filter(struct osd_state *sd, int filter) +{ + struct osd_state *osd = sd; + unsigned long flags; + + spin_lock_irqsave(&osd->lock, flags); + + osd->interpolation_filter = (filter != 0); + _osd_set_interpolation_filter(sd, filter); + + s
[PATCH 1/6] media: davinci: vpbe: fix checkpatch warning for CamelCase
From: Lad, Prabhakar This patch fixes checkpatch warning to avoid CamelCase. Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpbe_display.c |2 +- drivers/media/platform/davinci/vpbe_osd.c | 24 include/media/davinci/vpbe_osd.h |4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 1802f11..1c4ba89 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -929,7 +929,7 @@ static int vpbe_display_s_fmt(struct file *file, void *priv, cfg->interlaced = vpbe_dev->current_timings.interlaced; if (V4L2_PIX_FMT_UYVY == pixfmt->pixelformat) - cfg->pixfmt = PIXFMT_YCbCrI; + cfg->pixfmt = PIXFMT_YCBCRI; /* Change of the default pixel format for both video windows */ if (V4L2_PIX_FMT_NV12 == pixfmt->pixelformat) { diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index 396a51c..6ed82e8 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -119,7 +119,7 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, #define is_rgb_pixfmt(pixfmt) \ (((pixfmt) == PIXFMT_RGB565) || ((pixfmt) == PIXFMT_RGB888)) #define is_yc_pixfmt(pixfmt) \ - (((pixfmt) == PIXFMT_YCbCrI) || ((pixfmt) == PIXFMT_YCrCbI) || \ + (((pixfmt) == PIXFMT_YCBCRI) || ((pixfmt) == PIXFMT_YCRCBI) || \ ((pixfmt) == PIXFMT_NV12)) #define MAX_WIN_SIZE OSD_VIDWIN0XP_V0X #define MAX_LINE_LENGTH (OSD_VIDWIN0OFST_V0LO << 5) @@ -360,8 +360,8 @@ static void _osd_enable_color_key(struct osd_state *sd, osd_write(sd, colorkey & OSD_TRANSPVALL_RGBL, OSD_TRANSPVALL); break; - case PIXFMT_YCbCrI: - case PIXFMT_YCrCbI: + case PIXFMT_YCBCRI: + case PIXFMT_YCRCBI: if (sd->vpbe_type == VPBE_VERSION_3) osd_modify(sd, OSD_TRANSPVALU_Y, colorkey, OSD_TRANSPVALU); @@ -813,8 +813,8 @@ static int try_layer_config(struct osd_state *sd, enum osd_layer layer, if (osd->vpbe_type == VPBE_VERSION_1) bad_config = !is_vid_win(layer); break; - case PIXFMT_YCbCrI: - case PIXFMT_YCrCbI: + case PIXFMT_YCBCRI: + case PIXFMT_YCRCBI: bad_config = !is_vid_win(layer); break; case PIXFMT_RGB888: @@ -950,9 +950,9 @@ static void _osd_set_cbcr_order(struct osd_state *sd, * The caller must ensure that all windows using YC pixfmt use the same * Cb/Cr order. */ - if (pixfmt == PIXFMT_YCbCrI) + if (pixfmt == PIXFMT_YCBCRI) osd_clear(sd, OSD_MODE_CS, OSD_MODE); - else if (pixfmt == PIXFMT_YCrCbI) + else if (pixfmt == PIXFMT_YCRCBI) osd_set(sd, OSD_MODE_CS, OSD_MODE); } @@ -981,8 +981,8 @@ static void _osd_set_layer_config(struct osd_state *sd, enum osd_layer layer, winmd |= (2 << OSD_OSDWIN0MD_BMP0MD_SHIFT); _osd_enable_rgb888_pixblend(sd, OSDWIN_OSD0); break; - case PIXFMT_YCbCrI: - case PIXFMT_YCrCbI: + case PIXFMT_YCBCRI: + case PIXFMT_YCRCBI: winmd |= (3 << OSD_OSDWIN0MD_BMP0MD_SHIFT); break; default: @@ -1128,8 +1128,8 @@ static void _osd_set_layer_config(struct osd_state *sd, enum osd_layer layer, _osd_enable_rgb888_pixblend(sd, OSDWIN_OSD1); break; - case PIXFMT_YCbCrI: - case PIXFMT_YCrCbI: + case PIXFMT_YCBCRI: + case PIXFMT_YCRCBI: winmd |= (3 << OSD_OSDWIN1MD_BMP1MD_SHIFT); break; @@ -1508,7 +1508,7 @@ static int osd_initialize(struct osd_state *osd) _osd_init(osd); /* set default Cb/Cr order */ - osd->yc_pixfmt = PIXFMT_YCbCrI; + osd->yc_pixfmt = PIXFMT_YCBCRI; if (osd->vpbe_type == VPBE_VERSION_3) { /* diff --git a/include/media/davinci/vpbe_osd.h b/include/media/davinci/vpbe_osd.h index 42628fc..de59364 100644 --- a/include/media/davinci/vpbe_osd.h +++ b/include/media/davinci/vpbe_osd.h @@ -82,9 +82,9 @@ enum osd_pix_format { PIXFMT_4BPP, PIXFMT_8BPP,
[PATCH 0/6] Davinci fbdev driver and enable it for DMx platform
From: Lad, Prabhakar This patch series adds an fbdev driver for Texas Instruments Davinci SoC.The display subsystem consists of OSD and VENC, with OSD supporting 2 RGb planes and 2 video planes. http://focus.ti.com/general/docs/lit/ getliterature.tsp?literatureNumber=sprue37d&fileType=pdf A good amount of the OSD and VENC enabling code is present in the kernel, and this patch series adds the fbdev interface. The fbdev driver exports 4 nodes representing each plane to the user - from fb0 to fb3. Lad, Prabhakar (6): media: davinci: vpbe: fix checkpatch warning for CamelCase media: davinci: vpbe: enable vpbe for fbdev addition davinci: vpbe: add fbdev driver ARM: davinci: dm355: enable fbdev driver ARM: davinci: dm365: enable fbdev driver ARM: davinci: dm644x: enable fbdev driver arch/arm/mach-davinci/dm355.c | 24 +- arch/arm/mach-davinci/dm365.c | 10 + arch/arm/mach-davinci/dm644x.c| 10 + drivers/media/platform/davinci/vpbe_display.c |8 +- drivers/media/platform/davinci/vpbe_osd.c | 820 - drivers/media/platform/davinci/vpbe_venc.c| 43 + drivers/video/Kconfig | 12 + drivers/video/Makefile|1 + drivers/video/davincifb.c | 2523 + drivers/video/davincifb.h | 194 ++ include/media/davinci/vpbe_osd.h | 66 +- include/media/davinci/vpbe_venc.h | 21 + 12 files changed, 3702 insertions(+), 30 deletions(-) create mode 100644 drivers/video/davincifb.c create mode 100644 drivers/video/davincifb.h -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] [media] anysee: Grammar s/report the/report to/
Signed-off-by: Geert Uytterhoeven --- drivers/media/usb/dvb-usb-v2/anysee.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c index 3a1f976..1760fee 100644 --- a/drivers/media/usb/dvb-usb-v2/anysee.c +++ b/drivers/media/usb/dvb-usb-v2/anysee.c @@ -885,7 +885,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) /* we have no frontend :-( */ ret = -ENODEV; dev_err(&d->udev->dev, "%s: Unsupported Anysee version. " \ - "Please report the " \ + "Please report to " \ ".\n", KBUILD_MODNAME); } -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] [media] anysee: Initialize ret = 0 in anysee_frontend_attach()
drivers/media/usb/dvb-usb-v2/anysee.c: In function ‘anysee_frontend_attach’: drivers/media/usb/dvb-usb-v2/anysee.c:641: warning: ‘ret’ may be used uninitialized in this function And gcc is right (see the ANYSEE_HW_507T case), so initialize ret to zero to fix this. Signed-off-by: Geert Uytterhoeven --- drivers/media/usb/dvb-usb-v2/anysee.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c index a20d691..3a1f976 100644 --- a/drivers/media/usb/dvb-usb-v2/anysee.c +++ b/drivers/media/usb/dvb-usb-v2/anysee.c @@ -638,7 +638,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) { struct anysee_state *state = adap_to_priv(adap); struct dvb_usb_device *d = adap_to_d(adap); - int ret; + int ret = 0; u8 tmp; struct i2c_msg msg[2] = { { -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: em28xx: Kernel panic after installing latest linuxtv.org modules
Hi Marcel, Em Tue, 23 Apr 2013 22:56:45 +0200 Marcel Kulicke escreveu: > Hi Linux Media, > > I was quite keen to try out the new modules for em28xx on my raspberry. > Unfortunately, when the module is about to be used by a frontend (TVHEADEND > in this case) a reproducable kernel panic occurs. Here is the console > output. Did it used to work with a previous version? If so, could you please bisect to see what patch broke it? > pi@raspbmc:~$ tvheadend > Apr 23 00:16:06.977 [ INFO] charset: 71 entries loaded > kernel:Internal error: Oops: 17 [#1] PREEMPT ARM > kernel:Process tvheadend (pid: 1409, stack limit = 0xd79ea268) > kernel:Stack: (0xd79ebc48 to 0xd79ec000) > kernel:bc40: d7951260 d563f000 c046be40 d8da1140 d79ebc68 > kernel:bc60: d8d84288 0048 0048 d7992684 d79ebcc7 d79ffa00 > d5207360 > kernel:bc80: bf099be0 d79ebcbc d79ebc98 bf04eca4 bf04eb00 0001 > bf0ec0e0 > kernel:bca0: d7991000 fff7 d7992684 d79ebcd4 d79ebcc0 bf04ee78 > bf04ec80 > kernel:bcc0: d78700b0 0001 d79ebcfc d79ebcd8 bf04ef28 bf04ee60 d7992684 > d7991000 > kernel:bce0: d7a49418 d56546e0 d79ffa00 d5207360 d79ebd0c d79ebd00 bf04efa8 > bf04ee8c > kernel:bd00: d79ebd1c d79ebd10 bf09d4b0 bf04ef5c d79ebd64 d79ebd20 bf091038 > bf09d490 > kernel:bd20: c009a098 c01c7b0c 0d40 d5703798 d79ebd4c d79ebd40 c009a04c > d5207360 > kernel:bd40: bf09685c d5703798 d56546e0 bf099be0 d79ebd84 > d79ebd68 > kernel:bd60: bf08916c bf090fa4 d79ea000 d5703798 d5207360 bf099be0 d79ebdbc > d79ebd88 > kernel:bd80: c009a8bc bf0890dc d79ebdbc d79ebdbc d5207360 d5703798 > d5207368 > kernel:bda0: c009a7fc d79ebe90 0024 d79ebde4 d79ebdc0 c0094cd8 > c009a808 > kernel:bdc0: d79ebea4 d79ebf60 0002 d79ebe90 d79ebdfc > d79ebde8 > kernel:bde0: c0094d94 c0094b20 d79ebea4 d79ebee0 d79ebe74 d79ebe00 c00a4ad4 > c0094d78 > kernel:be00: c00a1c58 c00a1b98 d79ebe74 d79ebe18 c00a1f38 c00a1c48 0028 > d7b6a820 > kernel:be20: d79ebee8 d753ecc8 d5207360 > > kernel:be40: d5703798 d57038e8 0004 d79ebee0 d5207360 d79ebf60 d79ebe90 > > kernel:be60: 0041 d79ea000 d79ebed4 d79ebe78 c00a5174 c00a4514 d79ebea4 > c0080018 > kernel:be80: d547edb0 0028 0678 d79ea000 d78101d0 d753b1a0 d79ebeb4 > d79ebea8 > kernel:bea0: d79ebefc d79ebf60 0001 ff9c d5546000 > ff9c > kernel:bec0: d79ea000 d79ebf54 d79ebed8 c00a57fc c00a50d0 0041 > b6c98350 > kernel:bee0: d78101d0 d753b1a0 7924c38a 0009 d5546012 c04365b8 > d74082b0 > kernel:bf00: d5703798 0101 0004 0004 d79ebf54 > d79ebf28 > kernel:bf20: c00b2508 c00b1f2c 0002 d5546000 0002 d5546000 > 0002 > kernel:bf40: 0004 0001 d79ebf94 d79ebf58 c0095af0 c00a57d4 d79ebf84 > d79ebf68 > kernel:bf60: 0002 c037 0024 0100 be8eee30 > 0005 > kernel:bf80: c000e444 d79ebfa4 d79ebf98 c0095bb4 c0095a0c > d79ebfa8 > kernel:bfa0: c000e2c0 c0095b98 be8eee30 be8eee30 0002 > > kernel:bfc0: be8eee30 0005 be8ef130 be8eee30 > > kernel:bfe0: b6702220 be8ee9d8 b6c97044 b6c983d8 8010 be8eee30 > > kernel:Code: e356 e1a04000 e50b2030 e1a08003 (e5919000) I'm not familiar enough with ARM to understand what the above actually means. I would be expecting, instead, an error with the trace function stack. Perhaps you need to enable some things at .config to enable it, or to run ./scripts/ksymoops manually to translate the above into something useful. Btw, most of media devices require a lot of power to work. In order to use them with Raspberry Pi, you may find troubles, depending on the power source you have. I got a Rpi a few weeks ago, and I was able to run there only one USB device with has an external power, as the 1A power adapter I have was not enough to energize the usual usb sticks I tried, when the demod and tuner are powered on by the driver. That causes device reconnect or even hangs there. I heard that using a 2A power adapter would work, but I don't have it currently (I'm currently trying to get one). I tested also with an USB hub with its own power supply. I found there two issues: - the hub was sending power also to the Rpi, causing problems there due to the other power adapter; - the hub I used seemed to interfere at the USB isoc traffic. What I'm trying to say is that perhaps this is not a driver issue at all, but, instead, a problem with em28xx+demod high power consumption and Rpi. The best way is to test the device first on a x86, to be sure that the driver is OK there. Then, you need to properly address the power supply needs for RPi. Only after that, check if are there at em28xx anything that could be incompatible with arm. > In addition, I tried to use an older version in the GIT (from Apri
Re: [PATCH RFC] [media] blackfin: add video display driver
Hi Sylwester, > >> + struct v4l2_device v4l2_dev; >> + /* v4l2 control handler */ >> + struct v4l2_ctrl_handler ctrl_handler; > > > This handler seems to be unused, I couldn't find any code adding controls > to it. Any initialization of this handler is a dead code now. You probably > want to move that bits to a patch actually adding any controls. > This host driver doesn't support any control but without it subdev controls can't be accessed. v4l2_ctrl_add_handler should just return 0 if v4l2_dev->ctrl_handler is NULL. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo"
Hi Adam, Thanks for the patch. On Wednesday 24 April 2013 15:57:19 adam@canonical.com wrote: > From: Adam Lee > > This reverts commit 3dae8b41dc5651f8eb22cf310e8b116480ba25b7. > > 1, I do have a Chicony webcam, implements autosuspend in a broken way, > make `poweroff` performs rebooting when its autosuspend enabled. > > 2, There are other webcams which don't support autosuspend too, like > https://patchwork.kernel.org/patch/2356141/ > > 3, kernel removed USB_QUIRK_NO_AUTOSUSPEND in > a691efa9888e71232dfb4088fb8a8304ffc7b0f9, because autosuspend is > disabled by default. > > So, we need to disable autosuspend in uvcvideo, maintaining a quirk list > only for uvcvideo is not a good idea. > > Signed-off-by: Adam Lee I've received very few bug reports about broken auto-suspend support in UVC devices. Most of them could be solved by setting the RESET_RESUME quirk in USB core, only the Creative Live! Cam Optia AF required a quirk in the uvcvideo driver. I would thus rather use the available quirks (USB_QUIRK_RESET_RESUME if possible, UVC_QUIRK_DISABLE_AUTOSUSPEND otherwise) than killing power management for the vast majority of webcams that behave correctly. > --- > drivers/media/usb/uvc/uvc_driver.c |1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/media/usb/uvc/uvc_driver.c > b/drivers/media/usb/uvc/uvc_driver.c index 5dbefa6..8556f7c 100644 > --- a/drivers/media/usb/uvc/uvc_driver.c > +++ b/drivers/media/usb/uvc/uvc_driver.c > @@ -1914,7 +1914,6 @@ static int uvc_probe(struct usb_interface *intf, > } > > uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n"); > - usb_enable_autosuspend(udev); > return 0; > > error: -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo"
From: Adam Lee This reverts commit 3dae8b41dc5651f8eb22cf310e8b116480ba25b7. 1, I do have a Chicony webcam, implements autosuspend in a broken way, make `poweroff` performs rebooting when its autosuspend enabled. 2, There are other webcams which don't support autosuspend too, like https://patchwork.kernel.org/patch/2356141/ 3, kernel removed USB_QUIRK_NO_AUTOSUSPEND in a691efa9888e71232dfb4088fb8a8304ffc7b0f9, because autosuspend is disabled by default. So, we need to disable autosuspend in uvcvideo, maintaining a quirk list only for uvcvideo is not a good idea. Signed-off-by: Adam Lee --- drivers/media/usb/uvc/uvc_driver.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 5dbefa6..8556f7c 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1914,7 +1914,6 @@ static int uvc_probe(struct usb_interface *intf, } uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n"); - usb_enable_autosuspend(udev); return 0; error: -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
mt9p031 camera driver issue
Hi, Guennadi! I have found interesting issue with mt9p031 camera driver. As far as I got the value of hblank in the kernel driver is not calculated correctly. According to the datasheet, the minimum horizontal blanking value should be calculated using the following formula: 346 x (Row_Bin + 1) + 64 + (Wdc / 2) If I'm right, it should look like in the code attached. Also I wonder why it is decided to use the default value for vblank, when it's said that is also should be calculated like this: vblank = max(8, SW - H) + 1, where SW - shutter width, H - output image height. Also, there might be an issue with the calculation of xskip/yskip within the same function (mt9p031_set_params). xskip = DIV_ROUND_CLOSEST(crop->width, format->width); yskip = DIV_ROUND_CLOSEST(crop->height, format->height); As far as I got, these values are calculated using the predefined macros, that rounds the calculated value to the nearest integer number. I faced with the problem, that these values rounded correctly when the result is > 1 (e.g. 1,5 will be rounded to 1). But what concerns the value 0,8 it will be rounded to 0 by this function (DIV_ROUND_CLOSEST). Could you please confirm this issue? With best regards, Andrei Andreyanau Signed-off-by: Andrei Andreyanau diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index e328332..838b300 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -368,7 +368,7 @@ static int mt9p031_set_params(struct mt9p031 *mt9p031) /* Blanking - use minimum value for horizontal blanking and default * value for vertical blanking. */ - hblank = 346 * ybin + 64 + (80 >> min_t(unsigned int, xbin, 3)); + hblank = 346 * (xbin + 1) + 64 + ((80 >> clamp_t(unsigned int, xbin, 0, 3)) / 2); vblank = MT9P031_VERTICAL_BLANK_DEF; ret = mt9p031_write(client, MT9P031_HORIZONTAL_BLANK, hblank - 1); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC v2 6/6] media: exynos5-is: Adding media device driver for exynos5
This patch adds support for media device for EXYNOS5 SoCs. The current media device supports the following ips to connect through the media controller framework. * MIPI-CSIS Support interconnection(subdev interface) between devices * FIMC-LITE Support capture interface from device(Sensor, MIPI-CSIS) to memory Support interconnection(subdev interface) between devices G-Scaler will be added later to the current media device. * Gscaler: general scaler Support memory to memory interface Support output interface from memory to display device(LCD, TV) Support capture interface from device(FIMC-LITE, FIMD) to memory --> media 0 Camera Capture path consists of MIPI-CSIS, FIMC-LITE and G-Scaler ++ +---+ +-+ | Sensor | --> | FIMC-LITE | --> | G-Scaler-capture | ++ +---+ +-+ ++ +---+ +---+ +-+ | Sensor | --> | MIPI-CSIS | --> | FIMC-LITE | --> | G-Scaler-capture | ++ +---+ +---+ +-+ Signed-off-by: Shaik Ameer Basha --- .../devicetree/bindings/media/exynos5-mdev.txt | 153 +++ drivers/media/platform/Kconfig |1 + drivers/media/platform/Makefile|1 + drivers/media/platform/exynos5-is/Kconfig |7 + drivers/media/platform/exynos5-is/Makefile |4 + drivers/media/platform/exynos5-is/exynos5-mdev.c | 1131 drivers/media/platform/exynos5-is/exynos5-mdev.h | 120 +++ 7 files changed, 1417 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/exynos5-mdev.txt create mode 100644 drivers/media/platform/exynos5-is/Kconfig create mode 100644 drivers/media/platform/exynos5-is/Makefile create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.c create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.h diff --git a/Documentation/devicetree/bindings/media/exynos5-mdev.txt b/Documentation/devicetree/bindings/media/exynos5-mdev.txt new file mode 100644 index 000..d7d419b --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-mdev.txt @@ -0,0 +1,153 @@ +Samsung EXYNOS5 SoC Camera Subsystem (FIMC) +-- + +The Exynos5 SoC Camera subsystem comprises of multiple sub-devices +represented by separate device tree nodes. Currently this includes: FIMC-LITE, +MIPI CSIS and FIMC-IS. + +The sub-subdevices are defined as child nodes of the common 'camera' node which +also includes common properties of the whole subsystem not really specific to +any single sub-device, like common camera port pins or the CAMCLK clock outputs +for external image sensors attached to an SoC. + +Common 'camera' node + + +Required properties: + +- compatible : must be "samsung,exynos5-fimc", "simple-bus" +- clocks : list of clock specifiers, corresponding to entries in + the clock-names property; +- clock-names : must contain "sclk_cam0", "sclk_cam1" entries, + matching entries in the clocks property. + +The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used +to define a required pinctrl state named "default" and optional pinctrl states: +"idle", "active-a", active-b". These optional states can be used to switch the +camera port pinmux at runtime. The "idle" state should configure both the camera +ports A and B into high impedance state, especially the CAMCLK clock output +should be inactive. For the "active-a" state the camera port A must be activated +and the port B deactivated and for the state "active-b" it should be the other +way around. + +The 'camera' node must include at least one 'fimc-lite' child node. + +'parallel-ports' node +- + +This node should contain child 'port' nodes specifying active parallel video +input ports. It includes camera A and camera B inputs. 'reg' property in the +port nodes specifies data input - 0, 1 indicates input A, B respectively. + +Optional properties + +- samsung,camclk-out : specifies clock output for remote sensor, + 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT; + +Image sensor nodes +-- + +The sensor device nodes should be added to their control bus controller (e.g. +I2C0) nodes and linked to a port node in the csis or the parallel-ports node, +using the common video interfaces bindings, defined in video-interfaces.txt. +The implementation of this bindings requires clock-frequency property to be +present in the sensor device nodes. + +Example: + + aliases { + fimc-lite0 = &fimc_lite_0 + }; + + /* Parallel bus IF sensor */ + i2c_0: i2c@1386 { + s5k6aa: sensor@3c { + compatible = "samsung,s5k6aafx"; + reg = <0x3c>; + vddio-supply = <...>; + +
[RFC v2 5/6] media: s5p-csis: Adding Exynos5250 compatibility
FIMC-IS firmware needs all the MIPI-CSIS interrupts to be enabled. This patch enables all those MIPI interrupts and adds the Exynos5 compatible string. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/exynos4-is/mipi-csis.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index 8636bcd..51ad9b2 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/exynos4-is/mipi-csis.c @@ -66,7 +66,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-2)"); /* Interrupt mask */ #define S5PCSIS_INTMSK 0x10 -#define S5PCSIS_INTMSK_EN_ALL 0xf000103f +#define S5PCSIS_INTMSK_EN_ALL 0xfc00103f #define S5PCSIS_INTMSK_EVEN_BEFORE (1 << 31) #define S5PCSIS_INTMSK_EVEN_AFTER (1 << 30) #define S5PCSIS_INTMSK_ODD_BEFORE (1 << 29) @@ -1003,6 +1003,7 @@ static const struct dev_pm_ops s5pcsis_pm_ops = { static const struct of_device_id s5pcsis_of_match[] = { { .compatible = "samsung,s5pv210-csis" }, { .compatible = "samsung,exynos4210-csis" }, + { .compatible = "samsung,exynos5250-csis" }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, s5pcsis_of_match); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC v2 3/6] media: fimc-lite: Adding support for Exynos5
FIMC-LITE supports multiple DMA shadow registers from Exynos5 onwards. This patch adds the functionality of using shadow registers by checking the driver data. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/exynos4-is/fimc-lite-reg.c | 13 +++ drivers/media/platform/exynos4-is/fimc-lite-reg.h | 41 - drivers/media/platform/exynos4-is/fimc-lite.c | 12 -- 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-lite-reg.c b/drivers/media/platform/exynos4-is/fimc-lite-reg.c index 8cc0d39..a1d566a 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite-reg.c +++ b/drivers/media/platform/exynos4-is/fimc-lite-reg.c @@ -215,6 +215,18 @@ void flite_hw_set_camera_bus(struct fimc_lite *dev, flite_hw_set_camera_port(dev, si->mux_id); } +static void flite_hw_set_pack12(struct fimc_lite *dev, int on) +{ + u32 cfg = readl(dev->regs + FLITE_REG_CIODMAFMT); + + cfg &= ~FLITE_REG_CIODMAFMT_PACK12; + + if (on) + cfg |= FLITE_REG_CIODMAFMT_PACK12; + + writel(cfg, dev->regs + FLITE_REG_CIODMAFMT); +} + static void flite_hw_set_out_order(struct fimc_lite *dev, struct flite_frame *f) { static const u32 pixcode[4][2] = { @@ -267,6 +279,7 @@ void flite_hw_set_output_dma(struct fimc_lite *dev, struct flite_frame *f, flite_hw_set_out_order(dev, f); flite_hw_set_dma_window(dev, f); + flite_hw_set_pack12(dev, 0); } void flite_hw_dump_regs(struct fimc_lite *dev, const char *label) diff --git a/drivers/media/platform/exynos4-is/fimc-lite-reg.h b/drivers/media/platform/exynos4-is/fimc-lite-reg.h index 3903839..8e57e7a 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite-reg.h +++ b/drivers/media/platform/exynos4-is/fimc-lite-reg.h @@ -120,6 +120,10 @@ /* b0: 1 - camera B, 0 - camera A */ #define FLITE_REG_CIGENERAL_CAM_B (1 << 0) + +#define FLITE_REG_CIFCNTSEQ0x100 +#define FLITE_REG_CIOSAN(x)(0x200 + (4 * (x))) + /* * Function declarations */ @@ -143,8 +147,41 @@ void flite_hw_set_dma_window(struct fimc_lite *dev, struct flite_frame *f); void flite_hw_set_test_pattern(struct fimc_lite *dev, bool on); void flite_hw_dump_regs(struct fimc_lite *dev, const char *label); -static inline void flite_hw_set_output_addr(struct fimc_lite *dev, u32 paddr) +static inline void flite_hw_set_output_addr(struct fimc_lite *dev, + u32 paddr, u32 index) +{ + u32 config; + + /* FLITE in EXYNOS4 has only one DMA register */ + if (!dev->dd->support_multi_dma_buf) + index = 0; + + config = readl(dev->regs + FLITE_REG_CIFCNTSEQ); + config |= 1 << index; + writel(config, dev->regs + FLITE_REG_CIFCNTSEQ); + + if (index == 0) + writel(paddr, dev->regs + FLITE_REG_CIOSA); + else + writel(paddr, dev->regs + FLITE_REG_CIOSAN(index-1)); +} + +static inline void flite_hw_clear_output_addr(struct fimc_lite *dev, u32 index) { - writel(paddr, dev->regs + FLITE_REG_CIOSA); + u32 config; + + /* FLITE in EXYNOS4 has only one DMA register */ + if (!dev->dd->support_multi_dma_buf) + index = 0; + + config = readl(dev->regs + FLITE_REG_CIFCNTSEQ); + config &= ~(1 << index); + writel(config, dev->regs + FLITE_REG_CIFCNTSEQ); } + +static inline void flite_hw_clear_output_index(struct fimc_lite *dev) +{ + writel(0, dev->regs + FLITE_REG_CIFCNTSEQ); +} + #endif /* FIMC_LITE_REG_H */ diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index cb173ec..1b12ea8 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -166,6 +166,8 @@ static int fimc_lite_hw_init(struct fimc_lite *fimc, bool isp_output) if (fimc->inp_frame.fmt == NULL || fimc->out_frame.fmt == NULL) return -EINVAL; + flite_hw_clear_output_index(fimc); + /* Get sensor configuration data from the sensor subdev */ si = v4l2_get_subdev_hostdata(fimc->sensor); if (!si) @@ -307,11 +309,12 @@ static irqreturn_t flite_irq_handler(int irq, void *priv) tv->tv_sec = ts.tv_sec; tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC; vbuf->vb.v4l2_buf.sequence = fimc->frame_count++; + flite_hw_clear_output_addr(fimc, vbuf->vb.v4l2_buf.index); vb2_buffer_done(&vbuf->vb, VB2_BUF_STATE_DONE); vbuf = fimc_lite_pending_queue_pop(fimc); - flite_hw_set_output_addr(fimc, vbuf->paddr); - fimc_lite_active_queue_add(fimc, vbuf); + flite_hw_set_output_addr(fimc, vbuf->paddr, + vbuf->vb.v4l2_buf.index); } if (t
[RFC v2 4/6] media: fimc-lite: Fix for DMA output corruption
Fixes Buffer corruption on DMA output from fimc-lite Signed-off-by: Arun Kumar K Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/exynos4-is/fimc-lite-reg.c |3 ++- drivers/media/platform/exynos4-is/fimc-lite.c | 14 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-lite-reg.c b/drivers/media/platform/exynos4-is/fimc-lite-reg.c index a1d566a..46eda5b 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite-reg.c +++ b/drivers/media/platform/exynos4-is/fimc-lite-reg.c @@ -68,7 +68,8 @@ void flite_hw_set_interrupt_mask(struct fimc_lite *dev) if (atomic_read(&dev->out_path) == FIMC_IO_DMA) { intsrc = FLITE_REG_CIGCTRL_IRQ_OVFEN | FLITE_REG_CIGCTRL_IRQ_LASTEN | -FLITE_REG_CIGCTRL_IRQ_STARTEN; +FLITE_REG_CIGCTRL_IRQ_STARTEN | +FLITE_REG_CIGCTRL_IRQ_ENDEN; } else { /* An output to the FIMC-IS */ intsrc = FLITE_REG_CIGCTRL_IRQ_OVFEN | diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 1b12ea8..5de2dd4 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -301,8 +301,16 @@ static irqreturn_t flite_irq_handler(int irq, void *priv) if ((intsrc & FLITE_REG_CISTATUS_IRQ_SRC_FRMSTART) && test_bit(ST_FLITE_RUN, &fimc->state) && - !list_empty(&fimc->active_buf_q) && !list_empty(&fimc->pending_buf_q)) { + vbuf = fimc_lite_pending_queue_pop(fimc); + flite_hw_set_output_addr(fimc, vbuf->paddr, + vbuf->vb.v4l2_buf.index); + fimc_lite_active_queue_add(fimc, vbuf); + } + + if ((intsrc & FLITE_REG_CISTATUS_IRQ_SRC_FRMEND) && + test_bit(ST_FLITE_RUN, &fimc->state) && + !list_empty(&fimc->active_buf_q)) { vbuf = fimc_lite_active_queue_pop(fimc); ktime_get_ts(&ts); tv = &vbuf->vb.v4l2_buf.timestamp; @@ -311,10 +319,6 @@ static irqreturn_t flite_irq_handler(int irq, void *priv) vbuf->vb.v4l2_buf.sequence = fimc->frame_count++; flite_hw_clear_output_addr(fimc, vbuf->vb.v4l2_buf.index); vb2_buffer_done(&vbuf->vb, VB2_BUF_STATE_DONE); - - vbuf = fimc_lite_pending_queue_pop(fimc); - flite_hw_set_output_addr(fimc, vbuf->paddr, - vbuf->vb.v4l2_buf.index); } if (test_bit(ST_FLITE_CONFIG, &fimc->state)) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC v2 2/6] fimc-lite: Adding Exynos5 compatibility to fimc-lite driver
This patch adds, 1] Exynos5 soc compatibility to the fimc-lite driver 2] Multiple dma output buffer support as from Exynos5 onwards, fimc-lite h/w ip supports multiple dma buffers. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/exynos4-is/fimc-lite.c | 19 ++- drivers/media/platform/exynos4-is/fimc-lite.h |4 +++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 4878089..cb173ec 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1467,7 +1467,7 @@ static int fimc_lite_probe(struct platform_device *pdev) fimc->index = pdev->id; } - if (!drv_data || fimc->index < 0 || fimc->index >= FIMC_LITE_MAX_DEVS) + if (!drv_data || fimc->index < 0 || fimc->index >= drv_data->num_devs) return -EINVAL; fimc->dd = drv_data; @@ -1625,6 +1625,19 @@ static struct flite_drvdata fimc_lite_drvdata_exynos4 = { .out_width_align= 8, .win_hor_offs_align = 2, .out_hor_offs_align = 8, + .support_multi_dma_buf = false, + .num_devs = 2, +}; + +/* EXYNOS5250 */ +static struct flite_drvdata fimc_lite_drvdata_exynos5 = { + .max_width = 8192, + .max_height = 8192, + .out_width_align= 8, + .win_hor_offs_align = 2, + .out_hor_offs_align = 8, + .support_multi_dma_buf = true, + .num_devs = 3, }; static struct platform_device_id fimc_lite_driver_ids[] = { @@ -1641,6 +1654,10 @@ static const struct of_device_id flite_of_match[] = { .compatible = "samsung,exynos4212-fimc-lite", .data = &fimc_lite_drvdata_exynos4, }, + { + .compatible = "samsung,exynos5250-fimc-lite", + .data = &fimc_lite_drvdata_exynos5, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, flite_of_match); diff --git a/drivers/media/platform/exynos4-is/fimc-lite.h b/drivers/media/platform/exynos4-is/fimc-lite.h index 71fed51..a35f29e 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.h +++ b/drivers/media/platform/exynos4-is/fimc-lite.h @@ -27,7 +27,7 @@ #define FIMC_LITE_DRV_NAME "exynos-fimc-lite" #define FLITE_CLK_NAME "flite" -#define FIMC_LITE_MAX_DEVS 2 +#define FIMC_LITE_MAX_DEVS 3 #define FLITE_REQ_BUFS_MIN 2 /* Bit index definitions for struct fimc_lite::state */ @@ -54,6 +54,8 @@ struct flite_drvdata { unsigned short out_width_align; unsigned short win_hor_offs_align; unsigned short out_hor_offs_align; + unsigned short support_multi_dma_buf; + unsigned short num_devs; }; #define fimc_lite_get_drvdata(_pdev) \ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC v2 1/6] media: exynos4-is: modify existing mdev to use common pipeline
Current fimc_pipeline is tightly coupled with exynos4-is media device driver. And this will not allow to use the same pipeline across different exynos series media device drivers. This patch adds, 1] Changing of the existing pipeline as a common pipeline to be used across multiple exynos series media device drivers. 2] Modifies the existing exynos4-is media device driver to use the updated common pipeline implementation. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/exynos4-is/fimc-capture.c | 47 -- drivers/media/platform/exynos4-is/fimc-lite.c|4 +- drivers/media/platform/exynos4-is/media-dev.c| 179 +++--- drivers/media/platform/exynos4-is/media-dev.h| 16 ++ include/media/s5p_fimc.h | 46 -- 5 files changed, 248 insertions(+), 44 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index 72c516a..904d725 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -178,13 +178,16 @@ static int fimc_capture_config_update(struct fimc_ctx *ctx) void fimc_capture_irq_handler(struct fimc_dev *fimc, int deq_buf) { - struct v4l2_subdev *csis = fimc->pipeline.subdevs[IDX_CSIS]; + struct v4l2_subdev *csis; struct fimc_vid_cap *cap = &fimc->vid_cap; struct fimc_frame *f = &cap->ctx->d_frame; struct fimc_vid_buffer *v_buf; struct timeval *tv; struct timespec ts; + csis = fimc_pipeline_get_subdev(fimc->pipeline_ops, + &fimc->pipeline, EXYNOS_SD_CSIS); + if (test_and_clear_bit(ST_CAPT_SHUT, &fimc->state)) { wake_up(&fimc->irq_queue); goto done; @@ -480,9 +483,12 @@ static struct vb2_ops fimc_capture_qops = { int fimc_capture_ctrls_create(struct fimc_dev *fimc) { struct fimc_vid_cap *vid_cap = &fimc->vid_cap; - struct v4l2_subdev *sensor = fimc->pipeline.subdevs[IDX_SENSOR]; + struct v4l2_subdev *sensor; int ret; + sensor = fimc_pipeline_get_subdev(fimc->pipeline_ops, + &fimc->pipeline, EXYNOS_SD_SENSOR); + if (WARN_ON(vid_cap->ctx == NULL)) return -ENXIO; if (vid_cap->ctx->ctrls.ready) @@ -800,7 +806,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx, bool set) { struct fimc_dev *fimc = ctx->fimc_dev; - struct v4l2_subdev *sd = fimc->pipeline.subdevs[IDX_SENSOR]; + struct v4l2_subdev *sd; struct v4l2_subdev_format sfmt; struct v4l2_mbus_framefmt *mf = &sfmt.format; struct media_entity *me; @@ -809,6 +815,8 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx, int ret, i = 1; u32 fcc; + sd = fimc_pipeline_get_subdev(fimc->pipeline_ops, + &fimc->pipeline, EXYNOS_SD_SENSOR); if (WARN_ON(!sd || !tfmt)) return -EINVAL; @@ -974,8 +982,10 @@ static int fimc_cap_try_fmt_mplane(struct file *file, void *fh, fimc_adjust_mplane_format(ffmt, pix->width, pix->height, pix); if (ffmt->flags & FMT_FLAGS_COMPRESSED) - fimc_get_sensor_frame_desc(fimc->pipeline.subdevs[IDX_SENSOR], - pix->plane_fmt, ffmt->memplanes, true); + fimc_get_sensor_frame_desc( + fimc_pipeline_get_subdev(fimc->pipeline_ops, + &fimc->pipeline, EXYNOS_SD_SENSOR), + pix->plane_fmt, ffmt->memplanes, true); unlock: mutex_unlock(&fimc->lock); fimc_md_graph_unlock(fimc); @@ -1044,9 +1054,10 @@ static int __fimc_capture_set_format(struct fimc_dev *fimc, fimc_adjust_mplane_format(ff->fmt, pix->width, pix->height, pix); if (ff->fmt->flags & FMT_FLAGS_COMPRESSED) { - ret = fimc_get_sensor_frame_desc(fimc->pipeline.subdevs[IDX_SENSOR], - pix->plane_fmt, ff->fmt->memplanes, - true); + ret = fimc_get_sensor_frame_desc( + fimc_pipeline_get_subdev(fimc->pipeline_ops, + &fimc->pipeline, EXYNOS_SD_SENSOR), + pix->plane_fmt, ff->fmt->memplanes, true); if (ret < 0) return ret; } @@ -1100,7 +,10 @@ static int fimc_cap_enum_input(struct file *file, void *priv, struct v4l2_input *i) { struct fimc_dev *fimc = video_drvdata(file); - struct v4l2_subdev *sd = fimc->pipeline.subdevs[IDX_SENSOR]; + struct v4l2_subdev *sd; + + sd = fimc_pipeline_get_subdev(fimc->pipeline_ops, + &fimc->pipeline, EXYNOS_SD_SENSOR); if (i->index != 0)
[RFC v2 0/6] Adding media device driver for Exynos5 imaging subsystem
The following patchset features: 1] Creating a common pipeline framework which can be used by all Exynos series SoCs for developing media device drivers. 2] Modified the existing fimc-mdevice for exynos4 to use the common pipeline framework. 3] Adding of media device driver for Exynos5 Imaging subsystem. 4] Upgrading mipi-csis and fimc-lite drivers for Exynos5 SoCs. Current changes are not tested on exynos4 series SoCs. Current media device driver only support one pipeline (pipeline0) which consists of Sensor --> MIPI-CSIS --> FIMC-LITE Sensor --> FIMC-LITE G-Scaler support to pipeline0 will be added later. Once the fimc-is device driver is posted, one more pipeline (pipeline1) will be added for exynos5 media device driver for fimc-is sub-devices. This patchset is rebased on: git://linuxtv.org/snawrocki/samsung.git:for_v3.10_2 Shaik Ameer Basha (6): media: exynos4-is: modify existing mdev to use common pipeline fimc-lite: Adding Exynos5 compatibility to fimc-lite driver media: fimc-lite: Adding support for Exynos5 media: fimc-lite: Fix for DMA output corruption media: s5p-csis: Adding Exynos5250 compatibility media: exynos5-is: Adding media device driver for exynos5 .../devicetree/bindings/media/exynos5-mdev.txt | 153 +++ drivers/media/platform/Kconfig |1 + drivers/media/platform/Makefile|1 + drivers/media/platform/exynos4-is/fimc-capture.c | 47 +- drivers/media/platform/exynos4-is/fimc-lite-reg.c | 16 +- drivers/media/platform/exynos4-is/fimc-lite-reg.h | 41 +- drivers/media/platform/exynos4-is/fimc-lite.c | 45 +- drivers/media/platform/exynos4-is/fimc-lite.h |4 +- drivers/media/platform/exynos4-is/media-dev.c | 179 +++- drivers/media/platform/exynos4-is/media-dev.h | 16 + drivers/media/platform/exynos4-is/mipi-csis.c |3 +- drivers/media/platform/exynos5-is/Kconfig |7 + drivers/media/platform/exynos5-is/Makefile |4 + drivers/media/platform/exynos5-is/exynos5-mdev.c | 1131 drivers/media/platform/exynos5-is/exynos5-mdev.h | 120 +++ include/media/s5p_fimc.h | 46 +- 16 files changed, 1757 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/exynos5-mdev.txt create mode 100644 drivers/media/platform/exynos5-is/Kconfig create mode 100644 drivers/media/platform/exynos5-is/Makefile create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.c create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.h -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html