aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-03-17Merge tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds12-113/+101
Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 4.6-rc1. Lots of little things here, over 1600 patches or so. Notable is all of the good Lustre work happening, those developers have finally woken up and are cleaning up their code greatly. The Outreachy intern application process is also happening, which brought in another 400 or so patches. Full details are in the very long shortlog. All of these have been in linux-next with no reported issues" * tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1673 commits) staging: lustre: fix aligments in lnet selftest staging: lustre: report minimum of two buffers for LNet selftest load test staging: lustre: test for proper errno code in lstcon_rpc_trans_abort staging: lustre: filter remaining extra spacing for lnet selftest staging: lustre: remove extra spacing when setting variable for lnet selftest staging: lustre: remove extra spacing of variable declartions for lnet selftest staging: lustre: fix spacing issues checkpatch reported in lnet selftest staging: lustre: remove returns in void function for lnet selftest staging: lustre: fix bogus lst errors for lnet selftest staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzalloc staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc staging: android: ion: fix up file mode staging: ion: debugfs invalid gfp mask staging: rts5208: Replace pci_enable_device with pcim_enable_device Staging: ieee80211: Place constant on right side of the test. staging: speakup: Replace del_timer with del_timer_sync staging: lowmemorykiller: fix 2 checks that checkpatch complained staging: mt29f_spinand: Drop void pointer cast staging: rdma: hfi1: file_ops: Replace ALIGN with PAGE_ALIGN staging: rdma: hfi1: driver: Replace IS_ALIGNED with PAGE_ALIGNED ...
2016-03-11staging: media: davinci_vpfe: Remove unnecessary else after returnBhaktipriya Shridhar1-1/+1
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: media: davinci_vpfe: dm365_ipipe_hw: Remove unnecessary else after returnBhaktipriya Shridhar1-1/+1
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: media: Remove unnecessary goto.Sandhya Bankar1-5/+2
Remove unnecessary goto. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: [media] mn88472: simplify NULL testsEva Rachel Retuya1-3/+3
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: media: omap4iss: Remove unnecessary platform_set_drvdata()Amitoj Kaur Chawla1-2/+0
Unnecessary platform_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: //<smpl> @@ struct platform_device *pdev; @@ - platform_set_drvdata(pdev, NULL); //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03[media] staging/media: add missing TODO filesHans Verkuil4-3/+34
Add TODO files for mx2/mx3/omap1 to explain the status of these drivers and what needs to be done in order to keep them from being removed soon. Also a small fix for the mx2/Kconfig that mistakingly mentioned a vb2 conversion. That's not needed for that driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-03[media] Staging: media/lirc: lirc_zilog.c : fixed a string split in multi-line issueRitwikGopi1-3/+1
Fixed a quoted string split in to multiple line issue(Actually fixed 2 warnings since it was split in to 3 lines.) Signed-off-by: Ritwik G <ritwikgopi@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-03[media] staging: v4l: omap4iss: Use V4L2 graph PM operationsSakari Ailus4-226/+7
Power on devices represented by entities in the graph through the pipeline state using V4L2 graph PM operations instead of what was in the omap3isp driver. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-03[media] mn88473: move out of stagingAntti Palosaari7-595/+0
Move driver to drivers. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-03[media] soc_camera/mx3_camera.c: move to staging in preparation, for removalHans Verkuil5-0/+1285
This driver is deprecated: it should become a stand-alone driver instead of using the soc-camera framework. Unless someone is willing to take this on (unlikely with such ancient hardware) it is going to be removed from the kernel soon. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-03[media] soc_camera/mx2_camera.c: move to staging in preparation, for removalHans Verkuil5-0/+1654
This driver is deprecated: it should become a stand-alone driver instead of using the soc-camera framework. Unless someone is willing to take this on (unlikely with such ancient hardware) it is going to be removed from the kernel soon. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-03[media] soc_camera/omap1: move to staging in preparation for removalHans Verkuil5-0/+1757
This driver is deprecated: it needs to be converted to vb2 and it should become a stand-alone driver instead of using the soc-camera framework. Unless someone is willing to take this on (unlikely with such ancient hardware) it is going to be removed from the kernel soon. Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-20staging: media: davinci_vpfe: remove ret variable in switch statementsThaissa Falbo2-16/+6
Remove ret variable in functions that used it to determine the return. Simplified the return logic for these functions. Found with Coccinelle script: @@ local idexpression ret; expression c,d; identifier label; @@ switch ( ... ) { case label : ... - ret = c; - break; + return c; ... default: ... - ret = d; + return d; ... } ... when != ret - return ret; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: media: davinci_vpfe: remove unnecessary ret variableThaissa Falbo1-34/+20
Simplified return of funcions by removing assignment of ret variable. Coccinelle script used: @@ local idexpression ret; expression e; @@ - ret = e; - if(ret) - return ret; + if(e) + return e; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ local idexpression ret; expression e; @@ - ret = e; - if(ret){ + if(e){ ... when != ret - return ret; + return e; } @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging:media:davinci_vpfe: Fix lines over 80 charactersThaissa Falbo3-9/+14
Fix "line over 80 characters" checkpatch warnings WARNING: line over 80 characters Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging:media:davinci_vpfe: Fixed code identation warning as detected by checkpatchThaissa Falbo1-1/+1
Fixed code indentation warning as detected by checkpatch. WARNING: suspect code indent for conditional statements (24, 40) #1672: FILE: drivers/staging/media/davinci_vpfe/dm365_resizer.c:1672: Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging:media:davinci_vpfe: Fixed comparisons with constants warningsThaissa Falbo1-12/+12
WARNING: Comparisons should place the constant on the right side of the test Fixed warnings by moving the constants to the right side of the comparisons. Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging:media:davinci_vpfe: Fixed block comments according to kernel coding styleThaissa Falbo5-20/+31
Fixed block comments by following the checkpatch warnings WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on separate line Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19[media] timblogiw: move to staging in preparation for removalHans Verkuil5-0/+885
The Timberdale FPGA video driver has not seen any real development since 2011 (and very little before that). One of the problems with the timblogiw driver is that it uses videobuf instead of the newer vb2 framework. The long term goal is to either convert or remove any driver still using videobuf. Since none of the core v4l developers has the hardware, we cannot convert it ourselves. As far as I can tell it was only used in an Intel demo board in 2009 using Meego: http://www.chinait.com/intelcontent/intelprc/admin/PDFFile/20106411545.pdf which has since been superseded. Moving this driver to staging is the first step towards removal. After 2 or 3 kernel cycles it will be removed altogether unless someone steps up to clean up this driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Richard Röjfors <richard@puffinpack.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-16Merge branch 'fixes' into patchworkMauro Carvalho Chehab1-1/+1
Some macros were changed/removed at the material for v4.5. We need to sync with those changes here, in order to avoid troubles. * v4l_for_linus: [media] media.h: get rid of MEDIA_ENT_F_CONN_TEST [media] [for,v4.5] media.h: increase the spacing between function ranges [media] media: i2c/adp1653: probe: fix erroneous return value [media] media: davinci_vpfe: fix missing unlock on error in vpfe_prepare_pipeline()
2016-02-14Staging: media: Remove multiple assignmentsBhumika Goyal1-1/+2
Remove multiple assignments by factorizing them. Made a coccinelle script to match cases: @@ identifier a,b; constant c; @@ -a=b=c; +a=c; +b=c; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: media: Remove unneeded parenthesesJanani Ravichandran4-11/+11
Remove unneeded parentheses in assignment statements. Semantic patch: @@ expression a, b, c; @@ ( a = (b == c) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-10[media] media: davinci_vpfe: fix missing unlock on error in vpfe_prepare_pipeline()Wei Yongjun1-1/+1
Add the missing unlock before return from function vpfe_prepare_pipeline() in the error handling case. video->lock is lock/unlock in function vpfe_open(), and no need to unlock it here, so remove unlock video->lock. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-01[media] staging: media: lirc: fix MODULE_PARM_DESC typoDan Carpenter1-1/+1
It "tx_mask" was intended instead of "tx_maxk". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] staging: media: lirc: space around operatorSudip Mukherjee1-7/+7
checkpatch complains about missing space around operators. [mchehab@osg.samsung.com: removed obsolete hunks] Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] staging: media: lirc: no space after castSudip Mukherjee1-4/+4
checkpatch complains about space after type cast. [mchehab@osg.samsung.com: removed an obsolete hunk] Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] staging: media: lirc: replace NULL comparisons with !varSudip Mukherjee1-2/+2
A NULL comparison can be written as if (var) or if (!var). Reported by checkpatch. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25[media] davinci_vpfe: make checkpatch happyJoseph Marrero1-1/+1
This WARNING was found using the checkpatch tool: Block comments use * on the subsequent lines Signed-off-by: Joseph Marrero <jmarrero@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-13Merge tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds18-199/+375
Pull second batch of media updates from Mauro Carvalho Chehab: "This is the second part of the media patches. It contains the media controller next generation patches, with is the result of one year of discussions and development. It also contains patches to enable media controller support at the DVB subsystem. The goal is to improve the media controller to allow proper support for other types of Video4Linux devices (radio and TV ones) and to extend the media controller functionality to allow it to be used by other subsystems like DVB, ALSA and IIO. In order to use the new functionality, a new ioctl is needed (MEDIA_IOC_G_TOPOLOGY). As we're still discussing how to pack the struct fields of this ioctl in order to avoid compat32 issues, I decided to add a patch at the end of this series commenting out the new ioctl, in order to postpone the addition of the new ioctl to the next Kernel version (4.6). With that, no userspace visible changes should happen at the media controller API, as the existing ioctls are untouched. Yet, it helps DVB, ALSA and IIO developers to develop and test the patches adding media controller support there, as the core will contain all required internal changes to allow adding support for devices that belong to those subsystems" * tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (177 commits) [media] Postpone the addition of MEDIA_IOC_G_TOPOLOGY [media] mxl111sf: Add a tuner entity [media] dvbdev: create links on devices with multiple frontends [media] media-entitiy: add a function to create multiple links [media] dvb-usb-v2: postpone removal of media_device [media] dvbdev: Add RF connector if needed [media] dvbdev: remove two dead functions if !CONFIG_MEDIA_CONTROLLER_DVB [media] call media_device_init() before registering the V4L2 device [media] uapi/media.h: Use u32 for the number of graph objects [media] media-entity: don't sleep at media_device_register_entity() [media] media-entity: increase max number of PADs [media] media-entity.h: document the remaining functions [media] media-device.h: use just one u32 counter for object ID [media] media-entity.h fix documentation for several parameters [media] DocBook: document media_entity_graph_walk_cleanup() [media] move documentation to the header files [media] media: Move MEDIA_ENTITY_MAX_PADS from media-entity.h to media-entity.c [media] media: Remove pre-allocated entity enumeration bitmap [media] staging: v4l: davinci_vpbe: Use the new media graph walk interface [media] staging: v4l: omap4iss: Use the new media graph walk interface ...
2016-01-13Merge tag 'staging-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-204/+189
Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 4.5-rc1. Lots of cleanups and fixes here, not as many as some releases, but 800+ isn't that bad. Full details in the shortlog. All of these have been in linux-next for a while" * tag 'staging-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (843 commits) Revert "arm64: dts: Add dts files to enable ION on Hi6220 SoC." staging: gdm724x: constify tty_port_operations structs staging: gdm72xx: add userspace data struct staging: gdm72xx: Replace timeval with ktime_t iio: adc: ina2xx: Fix incorrect report of data endianness to userspace. iio: light: us5182d: Refactor read_raw function iio: light: us5182d: Add interrupt support and events iio: light: us5182d: Fix enable status inconcistency iio: Make IIO value formating function globally available. staging: emxx_udc: use list_first_entry_or_null() staging/emxx_udc: fix 64-bit warnings STAGING: COMEDI: Using kernel types in plx9080.h STAGING: COMEDI: Added spaces around binary operators in plx9080.h STAGING: COMEDI: Fixed format of comments in plx9080.h staging: comedi: comedilib.h: Coding style warning fix for block comments staging: comedi: s526: add macros for counter control reg values staging: comedi: s526: replace counter mode bitfield struct staging: comedi: check for more errors for zero-length write staging: comedi: simplify returned errors for comedi_write() staging: comedi: return error on "write" if no command set up ...
2016-01-11[media] staging: v4l: davinci_vpbe: Use the new media graph walk interfaceSakari Ailus2-10/+28
The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Prabhakar Lad <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] staging: v4l: omap4iss: Use the new media graph walk interfaceSakari Ailus4-27/+70
The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] staging: v4l: omap4iss: Use media entity enumeration interfaceSakari Ailus4-15/+31
Instead of using a bitmap directly in a driver, use the new media entity enumeration interface to perform the same. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] staging: v4l: omap4iss: Fix sub-device power management codeSakari Ailus1-2/+2
The same bug was present in the omap4iss driver as was in the omap3isp driver. The code got copied to the omap4iss driver while broken. Fix the omap4iss driver as well. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] staging: omap4iss: remove pads prefix from *_create_pads_links()Javier Martinez Canillas7-15/+15
The functions that create ISS internal and external entities links are called *_create_pads_links() but the "pads" prefix is redundant since the driver doesn't handle any other kind of link so it can be removed. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media: use unsigned for pad indexMauro Carvalho Chehab6-6/+6
The pad index is unsigned. Replace the occurences of it where pertinent. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media framework: rename pads init function to media_entity_pads_init()Mauro Carvalho Chehab10-12/+12
With the MC next gen rework, what's left for media_entity_init() is to just initialize the PADs. However, certain devices, like a FLASH led/light doesn't have any input or output PAD. So, there's no reason why calling media_entity_init() would be mandatory. Also, despite its name, what this function actually does is to initialize the PADs data. So, rename it to media_entity_pads_init() in order to reflect that. The media entity actual init happens during entity register, at media_device_register_entity(). We should move init of num_links and num_backlinks to it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] omap4iss: change the logic that checks if an entity is a subdevMauro Carvalho Chehab1-3/+6
As we're getting rid of an specific number range for the V4L2 subdev, we need to replace the check for MEDIA_ENT_T_V4L2_SUBDEV by a macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] davinci_vbpe: stop MEDIA_ENT_T_V4L2_SUBDEV abuseMauro Carvalho Chehab2-6/+8
This driver is abusing MEDIA_ENT_T_V4L2_SUBDEV: - it uses a hack to check if the remote entity is a subdev; - it still uses the legacy entity subtype check macro, that will be removed soon. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] omap3/omap4/davinci: get rid of MEDIA_ENT_T_V4L2_SUBDEV abuseMauro Carvalho Chehab7-30/+60
On omap3/omap4/davinci drivers, MEDIA_ENT_T_V4L2_SUBDEV macro is abused in order to "simplify" the pad checks. Basically, it does a logical or of this macro, in order to check for a local index and if the entity is either a subdev or not. As we'll get rid of MEDIA_ENT_T_V4L2_SUBDEV macro, replace it by 2 << 16 where it occurs, and add a note saying that the code there is actually a hack. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media: use macros to check for V4L2 subdev entitiesMauro Carvalho Chehab3-14/+11
Instead of relying on media subtype, use the new macros to detect if an entity is a subdev or an A/V DMA entity. Please note that most drivers assume that there's just AV_DMA or V4L2 subdevs. This is not true anymore, as we've added MC support for DVB, and there are plans to add support for ALSA and FB/DRM too. Ok, on the current pipelines supported by those drivers, just V4L stuff are there, but, assuming that some day a pipeline that also works with other subsystems will ever added, it is better to add explicit checks for the AV_DMA stuff. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] staging: omap4iss: separate links creation from entities initJavier Martinez Canillas7-65/+132
The omap4iss driver initializes the entities and creates the pads links before the entities are registered with the media device. This does not work now that object IDs are used to create links so the media_device has to be set. Split out the pads links creation from the entity initialization so are made after the entities registration. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media: use entity.graph_obj.mdev instead of .parentJavier Martinez Canillas3-6/+6
The struct media_entity has a .parent field that stores a pointer to the parent struct media_device. But recently a media_gobj was embedded into the entities and since struct media_gojb already has a pointer to a struct media_device in the .mdev field, the .parent field becomes redundant and can be removed. This patch replaces all the usage of .parent by .graph_obj.mdev so that field will become unused and can be removed on a later patch. No functional changes. The transformation was made using the following coccinelle spatch: @@ struct media_entity *me; @@ - me->parent + me->graph_obj.mdev @@ struct media_entity *link; @@ - link->source->entity->parent + link->source->entity->graph_obj.mdev @@ struct exynos_video_entity *ve; @@ - ve->vdev.entity.parent + ve->vdev.entity.graph_obj.mdev Suggested-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media: rename the function that create pad linksMauro Carvalho Chehab8-20/+20
With the new API, a link can be either between two PADs or between an interface and an entity. So, we need to use a better name for the function that create links between two pads. So, rename the such function to media_create_pad_link(). No functional changes. This patch was created via this shell script: for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a && mv a $i; done Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] staging: omap4iss: get entity ID using media_entity_id()Javier Martinez Canillas2-2/+2
Accessing media_entity ID should now use media_entity_id() macro to obtain the entity ID, as a next patch will remove the .id field from struct media_entity . So, get rid of it, otherwise the omap4iss driver will fail to build. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11[media] media: get rid of unused "extra_links" param on media_entity_init()Mauro Carvalho Chehab10-12/+12
Currently, media_entity_init() creates an array with the links, allocated at init time. It provides a parameter (extra_links) that would allocate more links than the current needs, but this is not used by any driver. As we want to be able to do dynamic link allocation/removal, we'll need to change the implementation of the links. So, before doing that, let's first remove that extra unused parameter, in order to cleanup the interface first. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung2-2/+2
Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer for common use, and change its type to u64 in order to handling y2038 problem. This patch also includes all device drivers' changes related to this restructuring. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] vb2: drop v4l2_format argument from queue_setupHans Verkuil2-2/+1
The queue_setup callback has a void pointer that is just for V4L2 and is the pointer to the v4l2_format struct that was passed to VIDIOC_CREATE_BUFS. The idea was that drivers would use the information from that struct to buffers suitable for the requested format. After the vb2 split series this pointer is now a void pointer, which is ugly, and the reality is that all existing drivers will effectively just look at the sizeimage field of v4l2_format. To make this more generic the queue_setup callback is changed: the void pointer is dropped, instead if the *num_planes argument is 0, then use the current format size, if it is non-zero, then it contains the number of requested planes and the sizes array contains the requested sizes. If either is unsupported, then return -EINVAL, otherwise use the requested size(s). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03[media] staging: media: lirc: Replace timeval with ktime_t in lirc_parallel.cArnd Bergmann1-20/+15
'struct timeval tv' and 'struct timeval now' is used to calculate the elapsed time. 'LIRC_SFH506_DELAY' is a delay t_phl in usecs. 32-bit systems using 'struct timeval' will break in the year 2038, so we have to replace that code with more appropriate types. This patch changes the lirc_parallel.c file of media: lirc driver to use ktime_t. ktime_get() is better than using do_gettimeofday(), because it uses the monotonic clock. ktime_sub is used to subtract two ktime variables. ktime_to_us() is used to convert ktime to microsecond. New ktime_t variable timeout, is added in lirc_off(),to improve clarity. Introduced a new ktime_t variable in lirc_lirc_irq_handler() function, to avoid the use of signal variable for storing seconds in the first part of this function as later it uses a time unit that is defined by the global "timer" variable. This makes it more clear. ktime_set() is used to set a value in seconds to a value in nanosecond so that ktime_compare() can be used appropriately. ktime_compare() is used to compare two ktime values. ktime_add_ns() is used to increment a ktime value by 1 sec. One comment is also shifted a line up, as it was creating a 80 character warning. Build tested it. Also tested it with sparse. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>