From patchwork Wed Sep 23 05:08:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junghak Sung X-Patchwork-Id: 7247671 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66062BEEC1 for ; Wed, 23 Sep 2015 05:08:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B2CC20713 for ; Wed, 23 Sep 2015 05:08:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 229752071C for ; Wed, 23 Sep 2015 05:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760083AbbIWFI3 (ORCPT ); Wed, 23 Sep 2015 01:08:29 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:33027 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760077AbbIWFI1 (ORCPT ); Wed, 23 Sep 2015 01:08:27 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NV4006W56A0B160@mailout2.samsung.com> for linux-media@vger.kernel.org; Wed, 23 Sep 2015 14:08:24 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.115]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 8E.D0.05272.8C332065; Wed, 23 Sep 2015 14:08:24 +0900 (KST) X-AuditID: cbfee68e-f791c6d000001498-5a-560233c8c449 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 23.80.18629.8C332065; Wed, 23 Sep 2015 14:08:24 +0900 (KST) Received: from [10.252.83.96] by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NV400AA26A0AU10@mmp1.samsung.com>; Wed, 23 Sep 2015 14:08:24 +0900 (KST) Message-id: <560233C8.6080806@samsung.com> Date: Wed, 23 Sep 2015 14:08:24 +0900 From: Junghak Sung User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-version: 1.0 To: Hans Verkuil , linux-media@vger.kernel.org, mchehab@osg.samsung.com, laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi, pawel@osciak.com Cc: inki.dae@samsung.com, sw0312.kim@samsung.com, nenggun.kim@samsung.com, sangbae90.lee@samsung.com, rany.kwon@samsung.com Subject: Re: [RFC PATCH v5 0/8] Refactoring Videobuf2 for common use References: <1442928636-3589-1-git-send-email-jh1009.sung@samsung.com> <56016F17.2070007@xs4all.nl> In-reply-to: <56016F17.2070007@xs4all.nl> Content-type: multipart/mixed; boundary=------------040506060507040904000906 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMIsWRmVeSWpSXmKPExsWyRsSkWPeEMVOYwe+5ehanJj9jsph0fwKL RefEJewWPRu2slqsflZhcaBvF5PFlLc/2S3+TXvKbHFm/0o2i+OfDrJYzJj8ks2B22N2x0xW j8NfF7J4PP71ks1jS/9ddo++LasYPT5vkvM49fUzewB7FJdNSmpOZllqkb5dAlfG18/fGQt2 3mWs2H58I1sD45/VjF2MnBwSAiYSH1Yfh7LFJC7cW88GYgsJrGCU+Hkjp4uRA6zm4yv7LkYu oPBSRonHdyaxQDj3GSW2HFkN1sAroCXR+ruBGcRmEVCVmHJoAxtIM5uAjsTkzYYgYVGBBInj Z38wQZQLSvyYfA9sjojASkaJNfN2s4AkmAVqJRau3ww2U1jAReL+gsVMEAelSvxa1Q5mcwpo Spy6vJ4JZD6zgI/Ex6sJIHMkBLZwSDQd+wd1g4DEt8mHWCAekJXYdIAZ4kdJiYMrbrBMYBSd heSMWQiTZoEdYStxZ+5uZghbXmL72zlQdoDE2wnnWDDFIyW+3DzKtoCRfRWjaGpBckFxUnqR kV5xYm5xaV66XnJ+7iZGYNyf/vesbwfjzQPWhxgFOBiVeHgffGEME2JNLCuuzD3EaAp09ERm KdHkfGByySuJNzQ2M7IwNTE1NjK3NFMS502Q+hksJJCeWJKanZpakFoUX1Sak1p8iJGJg1Oq gbHm9hT3fy0+zI4GyUobX7w+uk3C9s5veY4iO4+A3+W/pr3oe1QXqbVEtLTdL4cvd9YJu7Xb KtVMT0psyDt5S1Zud1jB8W8pmT7KiT+UJd6/c5t6Wu+NzcwF75lZw/OEEgRfln+0lCjvfR/1 6OTS2Wd3LcxUuhe0zt2a0/JZ+1mtG4zhE18vfqbEUpyRaKjFXFScCAAuYMKG9gIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLKsWRmVeSWpSXmKPExsVy+t9jAd0TxkxhBhfvKlmcmvyMyWLS/Qks Fp0Tl7Bb9GzYymqx+lmFxYG+XUwWU97+ZLf4N+0ps8WZ/SvZLI5/OshiMWPySzYHbo/ZHTNZ PQ5/Xcji8fjXSzaPLf132T36tqxi9Pi8Sc7j1NfP7AHsUQ2MNhmpiSmpRQqpecn5KZl56bZK 3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlARyoplCXmlAKFAhKLi5X07TBNCA1x07WA aYzQ9Q0JgusxMkADCWsYM75+/s5YsPMuY8X24xvZGhj/rGbsYuTgkBAwkfj4yr6LkRPIFJO4 cG89WxcjF4eQwFJGicd3JrFAOPcZJbYcWc0GUsUroCXR+ruBGcRmEVCVmHJoAxvIIDYBHYnJ mw1BwqICCRLHz/5ggigXlPgx+R7YHBGBlYwSa+btZgFJMAvUSixcvxlsprCAi8T9BYvBGoQE UiV+rWoHszkFNCVOXV7PBDKfWcBH4uPVhAmM/LOQjJ2FkJkFNtRW4s7c3cwQtrzE9rdzoOwA ibcTzrFgikdKfLl5lG0BI/sqRonUguSC4qT0XKO81HK94sTc4tK8dL3k/NxNjODk8kx6B+Ph Xe6HGAU4GJV4eC2+M4YJsSaWFVfmHmJUARr1aMPqC4xSLHn5ealKIrx3/gCleVMSK6tSi/Lj i0pzUosPMZoCg2wis5Rocj4wIeaVxBsam5gZWRqZG1oYGZsrifPeOMQQJiSQnliSmp2aWpBa BNPHxMEp1cC4W2IT14HfgosCHm7InfliQsQTaT/rVEY/mZp9DR7/T+b+fzTj/KW5nNMN/rcc bGyODjqZ++fVV2d3/SeX953p6L16NaF2QpvUzxkT/T3d5RVfHaqdaLT219T3R6osFBYtn/7n n+m05vT3i4tcDN3/aTBN1GiNsuzKmFAYfVfBZa3folxz5aNySizFGYmGWsxFxYkAinYN91AD AAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Dear Hans, I tried to make a patch to fix the compile errors below. If you can not wait for next round, you can resolve the compile errors below with attached patch file. But, I'm not sure that this patch can resolve really ALL compile problems. So, if you don't mind and if you can, please, send me your .config file that I can test compile by using same config file with yours. Regards, Junghak On 09/23/2015 12:09 AM, Hans Verkuil wrote: > Mauro asked if I could make a pull request for patches 1-4, but while compiling > it I got these errors and warnings: > > In file included from /home/hans/work/build/media-git/include/linux/interrupt.h:5:0, > from /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:18: > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'to_vpif_buffer': > /home/hans/work/build/media-git/include/linux/kernel.h:811:48: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] > const typeof( ((type *)0)->member ) *__mptr = (ptr); \ > ^ > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:58:9: note: in expansion of macro 'container_of' > return container_of(vb, struct vpif_disp_buffer, vb); > ^ > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'vpif_buffer_prepare': > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:80:4: error: 'struct vb2_buffer' has no member named 'field' > vb->field = common->fmt.fmt.pix.field; > ^ > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'vpif_start_streaming': > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:200:39: warning: passing argument 1 of 'vb2_dma_contig_plane_dma_addr' from incompatible pointer type [-Wincompatible-pointer-types] > addr = vb2_dma_contig_plane_dma_addr(&common->cur_frm->vb, 0); > ^ > In file included from /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.h:20:0, > from /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:26: > /home/hans/work/build/media-git/include/media/videobuf2-dma-contig.h:20:1: note: expected 'struct vb2_buffer *' but argument is of type 'struct vb2_v4l2_buffer *' > vb2_dma_contig_plane_dma_addr(struct vb2_buffer *vb, unsigned int plane_no) > ^ > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'process_progressive_mode': > /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:311:39: warning: passing argument 1 of 'vb2_dma_contig_plane_dma_addr' from incompatible pointer type [-Wincompatible-pointer-types] > addr = vb2_dma_contig_plane_dma_addr(&common->next_frm->vb, 0); > ^ > In file included from /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.h:20:0, > from /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:26: > /home/hans/work/build/media-git/include/media/videobuf2-dma-contig.h:20:1: note: expected 'struct vb2_buffer *' but argument is of type 'struct vb2_v4l2_buffer *' > vb2_dma_contig_plane_dma_addr(struct vb2_buffer *vb, unsigned int plane_no) > ^ > /home/hans/work/build/media-git/scripts/Makefile.build:264: recipe for target 'drivers/media/platform/davinci/vpif_display.o' failed > > In file included from /home/hans/work/build/media-git/drivers/media/pci/sta2x11/sta2x11_vip.c:29:0: > /home/hans/work/build/media-git/drivers/media/pci/sta2x11/sta2x11_vip.c: In function 'to_vip_buffer': > /home/hans/work/build/media-git/include/linux/kernel.h:811:48: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] > const typeof( ((type *)0)->member ) *__mptr = (ptr); \ > ^ > /home/hans/work/build/media-git/drivers/media/pci/sta2x11/sta2x11_vip.c:97:9: note: in expansion of macro 'container_of' > return container_of(vb2, struct vip_buffer, vb); > ^ > > Please fix! > > Thanks, > > Hans > > On 22-09-15 15:30, Junghak Sung wrote: >> Hello everybody, >> >> This is the 5th round for refactoring Videobuf2(a.k.a VB2). >> The purpose of this patch series is to separate existing VB2 framework >> into core part and V4L2 specific part. So that not only V4L2 but also other >> frameworks can use them to manage buffer and utilize queue. >> >> Why do we try to make the VB2 framework to be common? >> >> As you may know, current DVB framework uses ringbuffer mechanism to demux >> MPEG-2 TS data and pass it to userspace. However, this mechanism requires >> extra memory copy because DVB framework provides only read() system call for >> application - read() system call copies the kernel data to user-space buffer. >> So if we can use VB2 framework which supports streaming I/O and buffer >> sharing mechanism, then we could enhance existing DVB framework by removing >> the extra memory copy - with VB2 framework, application can access the kernel >> data directly through mmap system call. >> >> We have a plan for this work as follows: >> 1. Separate existing VB2 framework into three parts - VB2 common, VB2-v4l2. >> Of course, this change will not affect other v4l2-based >> device drivers. This patch series corresponds to this step. >> >> 2. Add and implement new APIs for DVB streaming I/O. >> We can remove unnecessary memory copy between kernel-space and user-space >> by using these new APIs. However, we leaves legacy interfaces as-is >> for backward compatibility. >> >> This patch series is the first step for it. >> The previous version of this patch series can be found at belows. >> >> [1] RFC PATCH v1 - http://www.spinics.net/lists/linux-media/msg90688.html >> [2] RFC PATCH v2 - http://www.spinics.net/lists/linux-media/msg92130.html >> [3] RFC PATCH v3 - http://www.spinics.net/lists/linux-media/msg92953.html >> [4] RFC PATCH v4 - http://www.spinics.net/lists/linux-media/msg93421.html >> >> Changes since v4 >> 1. Rebase on 4.3-rc1 >> Kernel 4.3-rc1 was released. So, this patch set is made based on >> that version. >> >> 2. Modify queue_setup() argument >> In previous patch set, struct v4l2_format, which is a parameter of >> queue_setup(), is abstracted by using void pointer. But, it is better way to >> pass the parameter with presise meaning than abstracting it. >> So, replace void * with struct vb2_format which is newly defined to contain >> the format information for common use. >> >> 3. Add a code to check if VB2_MAX_* match with VIDEO_MAX_* >> Add a check code to videobuf2-v4l2.c where the compiler compares VIDEO_MAX_FRAME >> and VB2_MAX_FRAME (and ditto for MAX_PLANES) and throws an #error if they >> do not match. >> >> 4. Change the commit order >> For easier review, the patch that just move things around without doing any >> functional change is moved to the last. >> >> All ideas above are from Hans and it seems to be better and right way. >> >> >> Changes since v3 >> >> 1. Resolve build errors >> In previous patch set, the build errors prevented reviewers from applying >> the patch. So, in this patch, I tryed to fix the build errors but I hadn't >> the build test on all architectures except for x86 and ARM. >> >> 2. Modify descriptions for DocBook >> Descriptions not complying with the DocBook rule are modified, >> which was pointed out by Mauro. >> >> 3. Initialize reserved fields explicitly >> The reserved fields of v4l2_buffer are initialized by 0 explicitly >> when the vb2_buffer information is returned to userspace, >> which was pointed out by Hans. >> >> 4. Remove unnecessary type-cast >> According to Mauro's advice, the unnecessary type-cast are removed >> because it's better for the compiler - rather than human - to check those >> things. >> >> 5. Sperate the patch - not easy to review - into two patches >> In previous patch set, patch 5 was too difficult to review. So accoring to >> Hans' opinion, it separated the patch without any functional changes. >> >> >> Changes since v2 >> >> 1. Remove v4l2 stuffs completely from vb2_buffer >> The v4l2 stuffs - v4l2_buf and v4l2_planes - are removed completely from >> struct vb2_buffer. New member variables - index, type, memory - are added >> to struct vb2_buffer, all of which can be used commonly. And bytesused, >> length, offset, userptr, fd, data_offset are added to struct vb2_plane >> for the same reason. So, we can manage video buffer by only using >> struct vb2_buffer. >> And, v4l2 stuffs - flags, field, timestamp, timecode, sequence - are defined >> as member variables of struct vb2_v4l2_buffer. >> >> 2. Create new header file for VB2 internal use >> videobuf2-internal.h is created, which is referred by videobuf2-core >> and videobuf2-v4l2. The header file contains dprintk() for debug, >> macro functions to invoke various callbacks, and vb2_core_* function prototypes >> referred by inside of videobuf2. >> >> 3. Remove buffer-specific callbacks as much as possible >> There were many callback functions to handle video buffer information >> in previous patch series. In this patch series, I try to remove these callbacks >> as much as possible without breaking the existing function flow. >> As a result, only four callbacks are remained - fill_user_buffer(), >> fill_vb2_buffer(), fill_vb2_timestamp() and is_last(). >> >> All ideas above are from Hans and it seems to be better and right way. >> >> >> Changes since v1 >> >> 1. Divide patch set into more pieces >> v1 was not reviewed normally because the 2/3 patch is failed to send to mailing >> list with size problem - over 300kb. So I have divided the patch set into five >> pieces and refined them neatly, which was pointed by Hans. >> >> 2. Add shell scripts for renaming patch >> In case of renaming patch, shell scripts are included inside the body of the >> patches by Mauro's advice. 1/5 and 5/5 patches include these scripts, which can >> be used by reviewers or maintainers to regenerate big patch file if something >> goes wrong during patch apply. >> >> 3. Remove dependency on v4l2 from videobuf2 >> In previous patch set, videobuf2-core uses v4l2-specific stuff as it is. >> e.g. enum v4l2_buf_type and enum v4l2_memory. That prevented other frameworks >> from using videobuf2 independently and made them forced to include >> v4l2-specific stuff. >> In this version, these dependent stuffs are replaced with VB2 own stuffs. >> e.g. enum vb2_buf_type and enum vb2_memory. So, v4l2-specific header file isn't >> required to use videobuf2 in other modules. Please, note that videobuf2 stuffs >> will be translated to v4l2-specific stuffs in videobuf2-v4l2.c file for >> backward compatibility. >> >> 4. Unify duplicated definitions >> VB2_DEBUG() is newly defined in videobuf2-core header file in order to unify >> duplicated macro functions that invoke callback functions implemented in vb2 >> backends - i.e., videobuf2-vmalloc and videobuf2-dma-sg - and queue relevant >> callbacks of device drivers. >> In previous patch set, these macro functions were defined >> in both videobuf2-core.c and videobuf2-v4l2.c. >> >> >> This patch series is based on media_tree.git [5]. I have applied this patches >> to my own git [6] for review, and tested this patch series on ubuntu >> PC(Intel i7-3770) for x86 system and odroid-xu3(exynos5422) for ARM. >> >> [5] media_tree.git - http://git.linuxtv.org/cgit.cgi/media_tree.git/ >> [6] jsung/dvb-vb2.git - http://git.linuxtv.org/cgit.cgi/jsung/dvb-vb2.git/ >> (branch: vb2-refactoring) >> >> Any suggestions and comments are welcome. >> >> Regards, >> Junghak >> >> Junghak Sung (8): >> media: videobuf2: Replace videobuf2-core with videobuf2-v4l2 >> media: videobuf2: Restructure vb2_buffer (1/3) >> media: videobuf2: Restructure vb2_buffer (2/3) >> media: videobuf2: Restructure vb2_buffer (3/3) >> media: videobuf2: Change queue_setup argument >> media: videobuf2: Replace v4l2-specific data with vb2 data. >> media: videobuf2: Prepare to divide videobuf2 >> media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2 >> >> drivers/input/touchscreen/sur40.c | 28 +- >> drivers/media/dvb-frontends/rtl2832_sdr.c | 23 +- >> drivers/media/pci/cobalt/cobalt-driver.h | 6 +- >> drivers/media/pci/cobalt/cobalt-irq.c | 7 +- >> drivers/media/pci/cobalt/cobalt-v4l2.c | 26 +- >> drivers/media/pci/cx23885/cx23885-417.c | 13 +- >> drivers/media/pci/cx23885/cx23885-core.c | 24 +- >> drivers/media/pci/cx23885/cx23885-dvb.c | 11 +- >> drivers/media/pci/cx23885/cx23885-vbi.c | 18 +- >> drivers/media/pci/cx23885/cx23885-video.c | 29 +- >> drivers/media/pci/cx23885/cx23885.h | 2 +- >> drivers/media/pci/cx25821/cx25821-video.c | 32 +- >> drivers/media/pci/cx25821/cx25821.h | 3 +- >> drivers/media/pci/cx88/cx88-blackbird.c | 15 +- >> drivers/media/pci/cx88/cx88-core.c | 8 +- >> drivers/media/pci/cx88/cx88-dvb.c | 13 +- >> drivers/media/pci/cx88/cx88-mpeg.c | 14 +- >> drivers/media/pci/cx88/cx88-vbi.c | 19 +- >> drivers/media/pci/cx88/cx88-video.c | 21 +- >> drivers/media/pci/cx88/cx88.h | 2 +- >> drivers/media/pci/dt3155/dt3155.c | 23 +- >> drivers/media/pci/dt3155/dt3155.h | 3 +- >> drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 21 +- >> drivers/media/pci/saa7134/saa7134-core.c | 14 +- >> drivers/media/pci/saa7134/saa7134-ts.c | 16 +- >> drivers/media/pci/saa7134/saa7134-vbi.c | 12 +- >> drivers/media/pci/saa7134/saa7134-video.c | 23 +- >> drivers/media/pci/saa7134/saa7134.h | 4 +- >> drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 48 +- >> drivers/media/pci/solo6x10/solo6x10-v4l2.c | 26 +- >> drivers/media/pci/solo6x10/solo6x10.h | 4 +- >> drivers/media/pci/sta2x11/sta2x11_vip.c | 14 +- >> drivers/media/pci/tw68/tw68-video.c | 28 +- >> drivers/media/pci/tw68/tw68.h | 3 +- >> drivers/media/platform/am437x/am437x-vpfe.c | 41 +- >> drivers/media/platform/am437x/am437x-vpfe.h | 3 +- >> drivers/media/platform/blackfin/bfin_capture.c | 34 +- >> drivers/media/platform/coda/coda-bit.c | 135 +- >> drivers/media/platform/coda/coda-common.c | 25 +- >> drivers/media/platform/coda/coda-jpeg.c | 6 +- >> drivers/media/platform/coda/coda.h | 8 +- >> drivers/media/platform/coda/trace.h | 18 +- >> drivers/media/platform/davinci/vpbe_display.c | 37 +- >> drivers/media/platform/davinci/vpif_capture.c | 36 +- >> drivers/media/platform/davinci/vpif_capture.h | 2 +- >> drivers/media/platform/davinci/vpif_display.c | 28 +- >> drivers/media/platform/davinci/vpif_display.h | 2 +- >> drivers/media/platform/exynos-gsc/gsc-core.h | 4 +- >> drivers/media/platform/exynos-gsc/gsc-m2m.c | 25 +- >> drivers/media/platform/exynos4-is/fimc-capture.c | 36 +- >> drivers/media/platform/exynos4-is/fimc-core.c | 2 +- >> drivers/media/platform/exynos4-is/fimc-core.h | 4 +- >> drivers/media/platform/exynos4-is/fimc-is.h | 2 +- >> drivers/media/platform/exynos4-is/fimc-isp-video.c | 27 +- >> drivers/media/platform/exynos4-is/fimc-isp-video.h | 2 +- >> drivers/media/platform/exynos4-is/fimc-isp.h | 4 +- >> drivers/media/platform/exynos4-is/fimc-lite.c | 29 +- >> drivers/media/platform/exynos4-is/fimc-lite.h | 4 +- >> drivers/media/platform/exynos4-is/fimc-m2m.c | 23 +- >> drivers/media/platform/m2m-deinterlace.c | 25 +- >> drivers/media/platform/marvell-ccic/mcam-core.c | 49 +- >> drivers/media/platform/marvell-ccic/mcam-core.h | 2 +- >> drivers/media/platform/mx2_emmaprp.c | 17 +- >> drivers/media/platform/omap3isp/ispvideo.c | 27 +- >> drivers/media/platform/omap3isp/ispvideo.h | 4 +- >> drivers/media/platform/rcar_jpu.c | 66 +- >> drivers/media/platform/s3c-camif/camif-capture.c | 29 +- >> drivers/media/platform/s3c-camif/camif-core.c | 2 +- >> drivers/media/platform/s3c-camif/camif-core.h | 4 +- >> drivers/media/platform/s5p-g2d/g2d.c | 24 +- >> drivers/media/platform/s5p-jpeg/jpeg-core.c | 34 +- >> drivers/media/platform/s5p-mfc/s5p_mfc.c | 80 +- >> drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 4 +- >> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 19 +- >> drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 62 +- >> drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 46 +- >> drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 33 +- >> drivers/media/platform/s5p-tv/mixer.h | 4 +- >> drivers/media/platform/s5p-tv/mixer_grp_layer.c | 2 +- >> drivers/media/platform/s5p-tv/mixer_reg.c | 2 +- >> drivers/media/platform/s5p-tv/mixer_video.c | 13 +- >> drivers/media/platform/s5p-tv/mixer_vp_layer.c | 5 +- >> drivers/media/platform/sh_veu.c | 70 +- >> drivers/media/platform/sh_vou.c | 37 +- >> drivers/media/platform/soc_camera/atmel-isi.c | 28 +- >> drivers/media/platform/soc_camera/mx2_camera.c | 23 +- >> drivers/media/platform/soc_camera/mx3_camera.c | 41 +- >> drivers/media/platform/soc_camera/rcar_vin.c | 59 +- >> .../platform/soc_camera/sh_mobile_ceu_camera.c | 71 +- >> drivers/media/platform/soc_camera/soc_camera.c | 2 +- >> drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 29 +- >> drivers/media/platform/ti-vpe/vpe.c | 44 +- >> drivers/media/platform/vim2m.c | 58 +- >> drivers/media/platform/vivid/vivid-core.h | 4 +- >> drivers/media/platform/vivid/vivid-kthread-cap.c | 73 +- >> drivers/media/platform/vivid/vivid-kthread-out.c | 34 +- >> drivers/media/platform/vivid/vivid-sdr-cap.c | 51 +- >> drivers/media/platform/vivid/vivid-vbi-cap.c | 45 +- >> drivers/media/platform/vivid/vivid-vbi-out.c | 25 +- >> drivers/media/platform/vivid/vivid-vid-cap.c | 35 +- >> drivers/media/platform/vivid/vivid-vid-out.c | 36 +- >> drivers/media/platform/vsp1/vsp1_rpf.c | 4 +- >> drivers/media/platform/vsp1/vsp1_video.c | 135 +- >> drivers/media/platform/vsp1/vsp1_video.h | 8 +- >> drivers/media/platform/vsp1/vsp1_wpf.c | 4 +- >> drivers/media/platform/xilinx/xilinx-dma.c | 32 +- >> drivers/media/platform/xilinx/xilinx-dma.h | 2 +- >> drivers/media/usb/airspy/airspy.c | 26 +- >> drivers/media/usb/au0828/au0828-vbi.c | 17 +- >> drivers/media/usb/au0828/au0828-video.c | 49 +- >> drivers/media/usb/au0828/au0828.h | 3 +- >> drivers/media/usb/em28xx/em28xx-vbi.c | 16 +- >> drivers/media/usb/em28xx/em28xx-video.c | 38 +- >> drivers/media/usb/em28xx/em28xx.h | 3 +- >> drivers/media/usb/go7007/go7007-driver.c | 29 +- >> drivers/media/usb/go7007/go7007-priv.h | 4 +- >> drivers/media/usb/go7007/go7007-v4l2.c | 22 +- >> drivers/media/usb/hackrf/hackrf.c | 24 +- >> drivers/media/usb/msi2500/msi2500.c | 19 +- >> drivers/media/usb/pwc/pwc-if.c | 35 +- >> drivers/media/usb/pwc/pwc-uncompress.c | 6 +- >> drivers/media/usb/pwc/pwc.h | 4 +- >> drivers/media/usb/s2255/s2255drv.c | 29 +- >> drivers/media/usb/stk1160/stk1160-v4l.c | 17 +- >> drivers/media/usb/stk1160/stk1160-video.c | 12 +- >> drivers/media/usb/stk1160/stk1160.h | 4 +- >> drivers/media/usb/usbtv/usbtv-video.c | 27 +- >> drivers/media/usb/usbtv/usbtv.h | 3 +- >> drivers/media/usb/uvc/uvc_queue.c | 32 +- >> drivers/media/usb/uvc/uvc_video.c | 20 +- >> drivers/media/usb/uvc/uvcvideo.h | 6 +- >> drivers/media/v4l2-core/Makefile | 4 +- >> drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- >> drivers/media/v4l2-core/v4l2-mem2mem.c | 10 +- >> drivers/media/v4l2-core/v4l2-trace.c | 10 +- >> drivers/media/v4l2-core/vb2-trace.c | 9 + >> drivers/media/v4l2-core/videobuf2-core.c | 2040 +++----------------- >> drivers/media/v4l2-core/videobuf2-dma-contig.c | 2 +- >> drivers/media/v4l2-core/videobuf2-dma-sg.c | 2 +- >> drivers/media/v4l2-core/videobuf2-internal.h | 161 ++ >> drivers/media/v4l2-core/videobuf2-memops.c | 2 +- >> drivers/media/v4l2-core/videobuf2-v4l2.c | 1709 ++++++++++++++++ >> drivers/media/v4l2-core/videobuf2-vmalloc.c | 2 +- >> drivers/staging/media/davinci_vpfe/vpfe_video.c | 46 +- >> drivers/staging/media/davinci_vpfe/vpfe_video.h | 3 +- >> drivers/staging/media/omap4iss/iss_video.c | 25 +- >> drivers/staging/media/omap4iss/iss_video.h | 6 +- >> drivers/usb/gadget/function/uvc_queue.c | 28 +- >> drivers/usb/gadget/function/uvc_queue.h | 4 +- >> include/media/davinci/vpbe_display.h | 3 +- >> include/media/soc_camera.h | 2 +- >> include/media/v4l2-mem2mem.h | 11 +- >> include/media/videobuf2-core.h | 247 ++- >> include/media/videobuf2-dma-contig.h | 2 +- >> include/media/videobuf2-dma-sg.h | 2 +- >> include/media/videobuf2-dvb.h | 8 +- >> include/media/videobuf2-memops.h | 2 +- >> include/media/videobuf2-v4l2.h | 149 ++ >> include/media/videobuf2-vmalloc.h | 2 +- >> include/trace/events/v4l2.h | 62 +- >> include/trace/events/vb2.h | 65 + >> 161 files changed, 4310 insertions(+), 3348 deletions(-) >> create mode 100644 drivers/media/v4l2-core/vb2-trace.c >> create mode 100644 drivers/media/v4l2-core/videobuf2-internal.h >> create mode 100644 drivers/media/v4l2-core/videobuf2-v4l2.c >> create mode 100644 include/media/videobuf2-v4l2.h >> create mode 100644 include/trace/events/vb2.h >> > From 3afc926a7b5af8e4ada9b9e2933c7035093880c0 Mon Sep 17 00:00:00 2001 From: Junghak Sung Date: Wed, 23 Sep 2015 11:27:01 +0900 Subject: [PATCH] media: videobuf2: fix build errors temporarily patch to fix build errors Signed-off-by: Junghak Sung --- drivers/media/pci/sta2x11/sta2x11_vip.c | 5 +++-- drivers/media/platform/davinci/vpif_display.c | 13 ++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index cca487b..83f102e 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -92,7 +92,7 @@ struct vip_buffer { struct list_head list; dma_addr_t dma; }; -static inline struct vip_buffer *to_vip_buffer(struct vb2_buffer *vb2) +static inline struct vip_buffer *to_vip_buffer(struct vb2_v4l2_buffer *vb2) { return container_of(vb2, struct vip_buffer, vb); } @@ -287,7 +287,8 @@ static int queue_setup(struct vb2_queue *vq, const struct vb2_format *fmt, }; static int buffer_init(struct vb2_buffer *vb) { - struct vip_buffer *vip_buf = to_vip_buffer(vb); + struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); + struct vip_buffer *vip_buf = to_vip_buffer(vbuf); vip_buf->dma = vb2_dma_contig_plane_dma_addr(vb, 0); INIT_LIST_HEAD(&vip_buf->list); diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 85a3641..f51518c 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -53,7 +53,8 @@ static struct device *vpif_dev; static void vpif_calculate_offsets(struct channel_obj *ch); static void vpif_config_addr(struct channel_obj *ch, int muxmode); -static inline struct vpif_disp_buffer *to_vpif_buffer(struct vb2_buffer *vb) +static inline +struct vpif_disp_buffer *to_vpif_buffer(struct vb2_v4l2_buffer *vb) { return container_of(vb, struct vpif_disp_buffer, vb); } @@ -68,6 +69,7 @@ static inline struct vpif_disp_buffer *to_vpif_buffer(struct vb2_buffer *vb) */ static int vpif_buffer_prepare(struct vb2_buffer *vb) { + struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct channel_obj *ch = vb2_get_drv_priv(vb->vb2_queue); struct common_obj *common; @@ -77,7 +79,7 @@ static int vpif_buffer_prepare(struct vb2_buffer *vb) if (vb2_get_plane_payload(vb, 0) > vb2_plane_size(vb, 0)) return -EINVAL; - vb->field = common->fmt.fmt.pix.field; + vbuf->field = common->fmt.fmt.pix.field; if (vb->vb2_queue->type != V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) { unsigned long addr = vb2_dma_contig_plane_dma_addr(vb, 0); @@ -138,7 +140,8 @@ static int vpif_buffer_queue_setup(struct vb2_queue *vq, */ static void vpif_buffer_queue(struct vb2_buffer *vb) { - struct vpif_disp_buffer *buf = to_vpif_buffer(vb); + struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); + struct vpif_disp_buffer *buf = to_vpif_buffer(vbuf); struct channel_obj *ch = vb2_get_drv_priv(vb->vb2_queue); struct common_obj *common; unsigned long flags; @@ -197,7 +200,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) list_del(&common->cur_frm->list); spin_unlock_irqrestore(&common->irqlock, flags); - addr = vb2_dma_contig_plane_dma_addr(&common->cur_frm->vb, 0); + addr = vb2_dma_contig_plane_dma_addr(&common->cur_frm->vb.vb2_buf, 0); common->set_addr((addr + common->ytop_off), (addr + common->ybtm_off), (addr + common->ctop_off), @@ -308,7 +311,7 @@ static void process_progressive_mode(struct common_obj *common) spin_unlock(&common->irqlock); /* Set top and bottom field addrs in VPIF registers */ - addr = vb2_dma_contig_plane_dma_addr(&common->next_frm->vb, 0); + addr = vb2_dma_contig_plane_dma_addr(&common->next_frm->vb.vb2_buf, 0); common->set_addr(addr + common->ytop_off, addr + common->ybtm_off, addr + common->ctop_off, -- 1.7.9.5