summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] media.h: create connector entities for hybrid TV devicesMauro Carvalho Chehab2016-01-111-2/+10
| | | | | | | | Add entities to represent the connectors that exists inside a hybrid TV device. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-entity.h: document all the structsMauro Carvalho Chehab2016-01-111-30/+84
| | | | | | | | | | | | Only a few structs are documented on kernel-doc-nano format (the ones added by the MC next gen patches). Add a documentation for all structs, and ensure that they'll be producing the documentation at the Kernel's device driver DocBook. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2-core: create MC interfaces for devnodesMauro Carvalho Chehab2016-01-113-19/+109
| | | | | | | | | | | V4L2 device (and subdevice) nodes should create an interface, if the Media Controller support is enabled. Please notice that radio devices should not create an entity, as radio input/output is either via wires or via ALSA. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvbdev: returns error if graph object creation failsMauro Carvalho Chehab2016-01-113-137/+193
| | | | | | | | | | | | | | | | | | | | | Right now, if something gets wrong at dvb_create_media_entity() or at dvb_create_media_graph(), the device will still be registered. Change the logic to properly handle it and free all media graph objects if something goes wrong at dvb_register_device(). Also, change the logic at dvb_create_media_graph() to return an error code if something goes wrong. It is up to the caller to implement the right logic and to call dvb_unregister_device() to unregister the already-created objects. While here, add a missing logic to unregister the created interfaces. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-entity: fix backlink removal on __media_entity_remove_link()Mauro Carvalho Chehab2016-01-111-3/+3
| | | | | | | | | The logic is testing if num_links==0 at the wrong place. Due to that, a backlink may be kept without removal, causing KASAN to complain about usage after free during either entity or link removal. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: don't try to empty links list in media_entity_cleanup()Javier Martinez Canillas2016-01-111-7/+0Star
| | | | | | | | | | | | | | | | The media_entity_cleanup() function only cleans up the entity links list but this operation is already made in media_device_unregister_entity(). In most cases this should be harmless (besides having duplicated code) since the links list would be empty so the iteration would not happen but the links list is initialized in media_device_register_entity() so if a driver fails to register an entity with a media device and clean up the entity in the error path, a NULL deference pointer error will happen. So don't try to empty the links list in media_entity_cleanup() since is either done already or haven't been initialized yet. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
* [media] au0828: postpone call to au0828_unregister_media_device()Mauro Carvalho Chehab2016-01-111-2/+4
| | | | | | | | | The DVB core needs to unregister the media device. So, we can't call au0828_unregister_media_device() before calling au0828_dvb_unregister(), otherwise the DVB MC free code (that will be implemented on the next patch) will fail. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvbdev: enable all interface links at initMauro Carvalho Chehab2016-01-111-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interface links are normally enabled, meaning that the interfaces are bound to the entities. So, any ioctl sent to the interface are reflected at the entities managed by the interface. However, when a device is in use, other interfaces for the same hardware could be decoupled from the entities linked to them, because the hardware may have some parts busy. That's for example, what happens when an hybrid TV device is in use. If it is streaming analog TV or capturing signals from S-Video/Composite connectors, typically the digital part of the hardware can't be used and vice-versa. This is generally due to some internal hardware or firmware limitation, that it is not easily mapped via data pipelines. What the Kernel drivers do internally is that they decouple the hardware from the interface. So, all changes, if allowed, are done only at some interface cache, but not physically changed at the hardware. The usage is similar to the usage of the MEDIA_LNK_FL_ENABLED on data links. So, let's use the same flag to indicate if either the interface to entity link is bound/enabled or not. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] tuner-core: add an input padMauro Carvalho Chehab2016-01-115-6/+22
| | | | | | | | | Tuners actually have at least one connector on its input. Add a PAD to connect it. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-entity: protect object creation/removal using spin lockMauro Carvalho Chehab2016-01-112-9/+9
| | | | | | | | | | | | | | | Some parts of the media controller are using mutexes while others are using spin locks in order to protect creation and removal of elements in the graph. That's wrong! Also, the V4L2 core can remove graph elements on non-interactive context: BUG: sleeping function called from invalid context at include/linux/sched.h:2776 Fix it by always using spin locks for graph element addition/removal, just like entity creation/removal is protected at media-device.c Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-device: remove interfaces and interface linksMauro Carvalho Chehab2016-01-113-12/+25
| | | | | | | | Just like what's done with entities, when the media controller is unregistered, release any interface and interface links that might still be there. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] remove interface links at media_entity_unregister()Mauro Carvalho Chehab2016-01-111-0/+16
| | | | | | | | Interface links connected to an entity should be removed before the entity itself can be removed. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-entity: unregister entity linksMauro Carvalho Chehab2016-01-112-0/+26
| | | | | | | | | Add functions to explicitly unregister all entity links. This function is called automatically when an entity link is destroyed. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-device: add support for MEDIA_IOC_G_TOPOLOGY ioctlMauro Carvalho Chehab2016-01-111-0/+158
| | | | | | | Add support for the new MEDIA_IOC_G_TOPOLOGY ioctl, according with the RFC for the MC next generation. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media_device: add a topology version fieldMauro Carvalho Chehab2016-01-112-0/+9
| | | | | | | | | | Every time a graph object is added or removed, the version of the topology changes. That's a requirement for the new MEDIA_IOC_G_TOPOLOGY, in order to allow userspace to know that the topology has changed after a previous call to it. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-device: add pads and links to media_deviceMauro Carvalho Chehab2016-01-113-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MC next gen API sends objects to userspace grouped by their types. In the case of pads and links, in order to improve performance and have a simpler code, the best is to store them also on separate linked lists at MC. If we don't do that, we would need this kind of interaction to send data to userspace (code is in structured english): for each entity: for each pad: store pads for each entity: for each link: store link for each interface: for each link: store link With would require one nested loop for pads and two nested loops for links. By using separate linked lists for them, just one loop would be enough. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: move mdev list init to gobjMauro Carvalho Chehab2016-01-114-10/+16
| | | | | | | | | | | | Let's control the topology changes inside the graph_object. So, move the addition and removal of interfaces/entities from the mdev lists to media_gobj_init() and media_gobj_remove(). The main reason is that mdev should have lists for all object types, as the new MC api will require to store objects in separate places. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: Use a macro to interate between all interfacesMauro Carvalho Chehab2016-01-112-1/+7
| | | | | | | | Just like we do with entities, use a similar macro for the interfaces loop. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] uapi/media.h: Add MEDIA_IOC_G_TOPOLOGY ioctlMauro Carvalho Chehab2016-01-112-1/+89
| | | | | | | | Add a new ioctl that will report the entire topology on one go. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: report if a pad is sink or source at debug msgMauro Carvalho Chehab2016-01-111-2/+5
| | | | | | | | Sometimes, it is important to see if the created pad is sink or source. Add info to track that. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb: modify core to implement interfaces/entities at MC new genMauro Carvalho Chehab2016-01-1113-34/+148
| | | | | | | | | | The Media Controller New Generation redefines the types for both interfaces and entities to be used on DVB. Make the needed changes at the DVB core for all interfaces, entities and data and interface links to appear in the graph. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] DocBook: update descriptions for the media controller entitiesMauro Carvalho Chehab2016-01-111-25/+22Star
| | | | | | | | | | | | | Cleanup the media controller entities description: - remove MEDIA_ENT_T_DEVNODE and MEDIA_ENT_T_V4L2_SUBDEV entity types, as they don't mean anything; - add MEDIA_ENT_T_UNKNOWN with a proper description; - remove ALSA and FB entity types. Those should not be used, as the types are deprecated. We'll soon be adidng ALSA, but with a different entity namespace; - improve the description of some entities. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media.h: don't use legacy entity macros at KernelMauro Carvalho Chehab2016-01-111-0/+2
| | | | | | | | | | Put the legacy MEDIA_ENT_* macros under a #ifndef __KERNEL__, in order to be sure that none of those old symbols are used inside the Kernel. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media controller: get rid of entity subtype on KernelMauro Carvalho Chehab2016-01-112-12/+0Star
| | | | | | | | | Don't use anymore the type/subtype entity data/macros inside the Kernel. 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>
* [media] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevsMauro Carvalho Chehab2016-01-113-1/+21
| | | | | | | | Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize new subdev entities as MEDIA_ENT_T_UNKNOWN. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] omap4iss: change the logic that checks if an entity is a subdevMauro Carvalho Chehab2016-01-111-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>
* [media] davinci_vbpe: stop MEDIA_ENT_T_V4L2_SUBDEV abuseMauro Carvalho Chehab2016-01-112-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>
* [media] s5k5baf: fix subdev typeMauro Carvalho Chehab2016-01-111-1/+1
| | | | | | | | | | | | The driver creates two subdevs, one for the image sensor pixel array (and the related readout logic) and one for an ISP. The first subdev already uses the MEDIA_ENT_T_V4L2_SUBDEV_SENSOR type, but the second subdev isn't a sensor pixel array. So, rename the second subdev as MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5c73m3: fix subdev typeMauro Carvalho Chehab2016-01-111-2/+2
| | | | | | | | | | | | This sensor driver is abusing MEDIA_ENT_T_V4L2_SUBDEV, creating some subdevs with a non-existing type. As this is a sensor driver, one of the entries is MEDIA_ENT_T_CAM_SENSOR. The other one will be using MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN, because the subdev is not any of the already existing types. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] omap3/omap4/davinci: get rid of MEDIA_ENT_T_V4L2_SUBDEV abuseMauro Carvalho Chehab2016-01-1112-51/+106
| | | | | | | | | | | | | | 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>
* [media] media: use macros to check for V4L2 subdev entitiesMauro Carvalho Chehab2016-01-1114-54/+39Star
| | | | | | | | | | | | | | | | | | 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>
* [media] media: add macros to check if subdev or V4L2 DMAMauro Carvalho Chehab2016-01-112-0/+37
| | | | | | | | | | | | | As we'll be removing entity subtypes from the Kernel, we need to provide a way for drivers and core to check if a given entity is represented by a V4L2 subdev or if it is an V4L2 I/O entity (typically with DMA). Drivers that create entities that don't belong to any defined subdev category should use MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] replace all occurrences of MEDIA_ENT_T_DEVNODE_DVBMauro Carvalho Chehab2016-01-111-5/+5
| | | | | | | | | | | | | | Now that interfaces and entities are distinct, it makes no sense of keeping something named as MEDIA_ENT_T_DEVNODE_DVB_foo. Made via this script: for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DEVNODE_DVB_,MEDIA_ENT_T_DVB_, <$i >a && mv a $i; done for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DVB_DVR,MEDIA_ENT_T_DVB_TSOUT, <$i >a && mv a $i; done for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DVB_FE,MEDIA_ENT_T_DVB_DEMOD, <$i >a && mv a $i; done for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DVB_NET,MEDIA_ENT_T_DVB_DEMOD_NET_DECAP, <$i >a && mv a $i; done Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] replace all occurrences of MEDIA_ENT_T_DEVNODE_V4LMauro Carvalho Chehab2016-01-114-4/+4
| | | | | | | | | | | | Now that interfaces and entities are distinct, it makes no sense of keeping something named as MEDIA_ENT_T_DEVNODE. This change was done with this script: for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DEVNODE_V4L,MEDIA_ENT_T_V4L2_VIDEO, <$i >a && mv a $i; done Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] uapi/media.h: Fix entity namespaceMauro Carvalho Chehab2016-01-112-32/+70
| | | | | | | | | | | Now that interfaces got created, we need to fix the entity namespace. So, let's create a consistent new namespace and add backward compatibility macros to keep the old namespace preserved. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvbdev: add support for indirect interface linksMauro Carvalho Chehab2016-01-111-0/+11
| | | | | | | | Some interfaces indirectly control multiple entities. Add support for those. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: add a linked list to track interfaces by mdevMauro Carvalho Chehab2016-01-114-0/+9
| | | | | | | | The media device should list the interface objects, so add a linked list for those interfaces in struct media_device. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvbdev: add support for interfacesMauro Carvalho Chehab2016-01-112-24/+79
| | | | | | | | | | | | | | | | | | Now that the infrastruct for that is set, add support for interfaces. Please notice that we're missing two links: DVB FE intf -> tuner DVB demux intf -> dvr Those should be added latter, after having the entire graph set. With the current infrastructure, those should be added at dvb_create_media_graph(), but it would also require some extra core changes, to allow the function to enumerate the interfaces. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-entity: add a helper function to create interfaceMauro Carvalho Chehab2016-01-111-9/+14
| | | | | | | | | As we'll be adding other interface types in the future, put the common interface create code on a separate function. Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: add support to link interfaces and entitiesMauro Carvalho Chehab2016-01-112-0/+47
| | | | | | | | | | | Now that we have a new graph object called "interfaces", we need to be able to link them to the entities. Add a linked list to the interfaces to allow them to be linked to the entities. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: make link debug printk more genericMauro Carvalho Chehab2016-01-111-7/+5Star
| | | | | | | | Remove entity name from the link as this exists only if the object type is PAD on both link ends. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: make media_link more generic to handle interace linksMauro Carvalho Chehab2016-01-111-5/+11
| | | | | | | | | | | By adding an union at media_link, we get for free a way to represent interface->entity links. No need to change anything at the code, just at the internal header file. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: make add link more genericMauro Carvalho Chehab2016-01-111-4/+4
| | | | | | | | | | | | | The media_entity_add_link() function takes an entity as an argument just to get the list head. Make it more generic by changing the function argument to list_head. No functional changes. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: convert links from array to listMauro Carvalho Chehab2016-01-117-103/+97Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The entire logic that represent graph links were developed on a time where there were no needs to dynamic remove links. So, although links are created/removed one by one via some functions, they're stored as an array inside the entity struct. As the array may grow, there's a logic inside the code that checks if the amount of space is not enough to store the needed links. If it isn't the core uses krealloc() to change the size of the link, with is bad, as it leaves the memory fragmented. So, convert links into a list. Also, currently, both source and sink entities need the link at the graph traversal logic inside media_entity. So there's a logic duplicating all links. That makes it to spend twice the memory needed. This is not a big deal for today's usage, where the number of links are not big. Yet, if during the MC workshop discussions, it was said that IIO graphs could have up to 4,000 entities. So, we may want to remove the duplication on some future. The problem is that it would require a separate linked list to store the backlinks inside the entity, or to use a more complex algorithm to do graph backlink traversal, with is something that the current graph traversal inside the core can't cope with. So, let's postpone a such change if/when it is actually needed. It should also be noticed that the media_link structure uses 44 bytes on 32-bit architectures and 84 bytes on 64-bit architecture. It will thus be allocated out of the 64-bytes and 96-bytes pools respectively. That's a 12.5% memory waste on 64-bit architectures and 31.25% on 32-bit architecture. A linked list is less efficient than an array in this case, but this could later be optimized if we can get rid of the reverse links (with would reduce memory allocation by 50%). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: Don't accept early-created linksMauro Carvalho Chehab2016-01-112-7/+2Star
| | | | | | | | | | | | | | | Links are graph objects that represent the links of two already existing objects in the graph. While with the current implementation, it is possible to create the links earlier, It doesn't make any sense to allow linking two objects when they are not both created. So, remove the code that would be handling those early-created links and add a BUG_ON() to ensure that. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] smiapp: create pad links after subdev registrationJavier Martinez Canillas2016-01-111-10/+10
| | | | | | | | | | | | The smiapp driver creates the pads links before the media entity is registered with the media device. This doesn't work now that object IDs are used to create links so the media_device has to be set. Move entity registration logic before pads links creation. 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>
* [media] uvcvideo: create pad links after subdev registrationJavier Martinez Canillas2016-01-111-4/+19
| | | | | | | | | | | The uvc driver creates the pads links before the media entity is registered with the media device. This doesn't work now that obj IDs are used to create links so the media_device has to be set. Move entities registration logic before pads links creation. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l: vsp1: separate links creation from entities initJavier Martinez Canillas2016-01-114-26/+62
| | | | | | | | | | | | | | The vsp1 driver initializes the entities and creates the pads links before the entities are registered with the media device. This doesn't 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>
* [media] v4l: vsp1: create pad links after subdev registrationJavier Martinez Canillas2016-01-111-8/+8
| | | | | | | | | | | | The vsp1 driver creates the pads links before the media entities are registered with the media device. This doesn't work now that object IDs are used to create links so the media_device has to be set. Move entities registration logic before pads links creation. 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>
* [media] staging: omap4iss: separate links creation from entities initJavier Martinez Canillas2016-01-117-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>