Skip to contentSkip to conversation

Media Controller patches

PATCH Mauro Carvalho Chehab 2 participants 8 messages Dec 10, 2015 – Dec 18, 2015

Subsystems (9)
lore
Share & tools
lore
#0 lore raw

Hi,

I've been working during this week to address the issues pointed during the Media Controller really long review process. We should avoid taking so long to review patches in the future, as it is really painful to go back to the already done work 4/5/7 months after the patchsets (yes, there are patches here written 7 months ago that were only very recently reviewed!). Shame on us.

Anyway, The reviewed patches are now at the media-controller topic branch, at the main tree.

I took the care of recompiling and automatically doing runtime tests with KASAN enabled, patch by patch, in order to be sure that the MC is in a sane state. I also ran kmemleak, and was unable to identify any troubles associated with the MC next gen rework.

So, the media-controller topic branch looks sane to me. It should be noticed that there are several items on a TODO list to be addressed before being able to merge this branch back at the master branch.

Please notice that patch 22 was removed from this series:
Subject: [media] uapi/media.h: Declare interface types for ALSA

The idea is that this patch should be part of the patches that Shuah will submit and that requires review from the ALSA community before being merged.

Javier and me will start tomorrow on working on the pending items.

My goal is to have everything needed for Kernel 4.5 merge window done up to the next week.

---

The current TODO list, based on the per-patch review is:

=================================================

PER_PATCH TODO list
===================

media: create a macro to get entity ID:

Sailus:

media-entity.h is a pretty widely included header file. Perhaps we should think about the naming a bit.

All the other names in the header begin with media (or __media); I'd very much prefer not changing that pattern.

media: add a common struct to be embed on media graph objects:
Sailus:

     > > +struct media_gobj {
     > > +        u32                        id;
     > > +};
     > > +
     > > +  
     > 
     > Two newlines. Looks like one would be enough. A minor matter though.  
    Ok, I'll be dropping the extra line.

media: use media_gobj inside pads:
Sailus:

Quoted 4 lines

int __must_check media_device_register_entity(struct media_device *mdev,
struct media_entity *entity)
{
+ int i;

unsigned int?

> void media_device_unregister_entity(struct media_entity *entity) > {
> + int i;

Ditto. It'd be nice to declare short temporary and counter variables as last (i.e. after mdev).

uapi/media.h: Declare interface types for ALSA:
Add it to ALSA patch series and send it for ALSA people to review

omap3isp: separate links creation from entities init:
Laurent:
See his comments about this patch. Several minor issues to be addressed - mostly on comments

media] omap3isp: create links after all subdevs have been bound
Laurent:
We need to properly think about
initialization (and, for that matter, cleanup as well) order, both for the media device and the entities. And, as a corollary, for subdevs too. The current media entity and subdevs initialization and registration code grew in an organic way without much design behind it, let's not repeat the same mistake.

staging: omap4iss: separate links creation from entities init
Laurent:

Quoted 2 lines

+/*
+ * iss_create_pads_links() - Pads links creation for the subdevices

Could you please s/pads_links/links/ and s/pads links/links/ ?

v4l: vsp1: separate links creation from entities init:
Laurent:

Review

Quoted 4 lines
(quoted diff) +2 -2
-                if (entity->type == VSP1_ENTITY_LIF ||
-                    entity->type == VSP1_ENTITY_RPF)
+                if (entity->type == VSP1_ENTITY_LIF) {
+                        ret = vsp1_wpf_create_pads_links(vsp1, entity);  
    Could you please s/pads_links/links/ ? There's no other type of links handled 
    by the driver.
    > +                        if (ret < 0)
    > +                                goto done;
    > +                        continue;  
    I would use
            } else if (...) {
    instead of a continue.
    > +                }
    > +
    > +                if (entity->type == VSP1_ENTITY_RPF) {
    > +                        ret = vsp1_rpf_create_pads_links(vsp1, entity);
    > +                        if (ret < 0)
    > +                                goto done;
    >                          continue;  
    Same here.
    
    uvcvideo: create pad links after subdev registration:

uvcvideo: create pad links after subdev registration:

Laurent:
> + list_for_each_entry(entity, &chain->entities, chain) {

> + ret = uvc_mc_create_pads_links(chain, entity);

You can call this uvc_mc_create_links(), there's no other type of links in the

driver.

> + if (ret < 0) {

> + uvc_printk(KERN_INFO, "Failed to create pads links

> for "

Same here, I'd s/pad links/links/.

> + "entity %u\n", entity->id);

> + return ret;

> + }

> + }

This creates three loops, and I think that's one too much. The reason why init

and register are separate is that the latter creates links, which requires all

entities to be initialized. If you move link create after registration I

believe you can init and register in a single loop (just move the

v4l2_device_register_subdev() call in the appropriate location in

uvc_mc_init_entity()) and then create links in a second loop.

media: Don't accept early-created links
Laurent:

Review void media_gobj_init(struct media_device *mdev,

Quoted 13 lines

+++ b/drivers/media/media-entity.c

(quoted diff) +2 -0
@@ -161,6 +161,8 @@ void media_gobj_init(struct media_device *mdev,
 
                            enum media_gobj_type type,
 
                            struct media_gobj *gobj)
 
 {
 
+        BUG_ON(!mdev);
 
+  

Please use a WARN_ON() and return (and possibly make the function return an

int error code), we don't want to panic completely for this.

media: convert links from array to list:
Laurent made several comments on this one. Please see the ML.

media: add support to link interfaces and entities
Sailus: rename media_obj functions to *_create *_destroy

omap3/omap4/davinci: get rid of MEDIA_ENT_T_V4L2_SUBDEV abuse
Laurent:
- Replace int by unsigned int on "index";
- Do a non-hacking version of the pad/subdev switch logic.

v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs:
- Some minor changes - mostly on comments
- Should address on a later series the changes to remove MEDIA_ENT_T_SUBDEV_UNKNOWN

uapi/media.h: Add MEDIA_IOC_G_TOPOLOGY ioctl:
Laurent added to address some issues - discussion needed

media: Use a macro to interate between all interfaces
Laurent:
- Remove one blank line at media-device.h

media_device: add a topology version field:
Laurent:

- Zero topology version at media_device_register()

media-device: add support for MEDIA_IOC_G_TOPOLOGY ioctl:
Hans:
- Fix media_device_compat_ioctl()
- move MEDIA_LNK_FL_INTERFACE_LINK to link creation code

media-entity: unregister entity links:
Laurent:
- Kerneldoc: add media_remove_intf_links()

media: don't try to empty links list in media_entity_cleanup()

Laurent:

- Does this mean that it's an invalid usage of the API to create links before

registering entities ? If so it should be clearly documented somewhere, such

as in the kerneldoc of the media_create_pad_link() function.

- All exported API functions need kerneldoc.

- media_entity_cleanup is now empty I'd turn it into a static inline.

v4l2-core: create MC interfaces for devnodes:
Hans:
- Make macro names more consistent:
> + intf_type = MEDIA_INTF_T_V4L_VIDEO;

> + vdev->entity.type = MEDIA_ENT_T_V4L2_VIDEO;

> + break;

I think I mentioned it before: V4L vs V4L2 in the macro names is inconsistent.

I would suggest using V4L2 as well in MEDIA_INTF_. It looks really weird and

arbitrary here.

tuner-core: add an input pad:
Laurent:
Additionally it should be documented somewhere that drivers instantiating

tuners are responsible for creating and linking a connector to the tuner

input.

media-entity.h: document all the structs:
Laurent:

> > + * @major: Devnode major number (zero if not applicable). Kept just

>

> Maybe s/@major/@dev.major/ (and the same for minor) ?

I don't think it works. The kernel-doc script is not smart enough to

handle this kind of things.

>

> > + * for backward compatibility.

> > + * @minor: Devnode minor number (zero if not applicable). Kept just

> > + * for backward compatibility.

>

> As this is an internal structure I think we should clean code up sooner than

> later and remove the major and minor fields. It will be confusing for driver

> authors otherwise. Same for the revision and group_id fields.

media.h: create connector entities for hybrid TV devices:

Laurent:

> When later renaming types to functions you rename this type as well, and I'm

> still not convinced that we shouldn't have both types and functions.

> Let's discuss these topics and the one below on the documentation patches.

media-entity: init pads on entity init if was registered:
See the discussion at the ML. Basically, warnings should be added if the driver is not doing it on the expected way.

=================================================

And those are the remaining items that may or may not have been already addressed, or pointed above:

TODO for next Kernel version (goal: Kernel version 4.5):
=========================================================

- Find entities that belong to V4L2 or DVB via the interfaces, in order to enable/disable the inteface links when the device gets busy (Probably, Shuah's patches did this already);

media controller kernel interface:
Rename interfaces so that the naming of the constructor and destructor match, i.e. media_create_intf_link / media_remove_intf_link is a mismatch. Think a bit what's in which header and whether the current hader naming still makes sense.

media controller user space API:
G_TOPOLOGY IOCTL argument struct reserved fields need rework

omap3isp:
Clean up isp_subdev_notifier_complete()

Apply Sakari's patch series that remove the graph traversal entity ID range dependency of the entity ID

Merge IDs for entity, interface, links into a single one

Rename the generic MEDIA_ENT_F_IO to MEDIA_ENT_F_IO_function, where function is "VIDEO", "VBI", "DVB", etc...

Turn media_entity_cleanup() into a static inline now that is an empty function.

Document that links can't be created before entities are registered with the media device. In fact document any constraints that may exist so drivers authors know when things have to be initialized and registered.

Update documentation to not mention that links are stored in an array.

Make sure that all exported API functions have a proper kerneldoc.

Sort all headers alphabetically

Rename all create_pads_links functions to just create_links if there is no other type of link in the driver.

Simplify uvc_mc_register_entities() to avoid having 3 loops by init and registering in the same loop.

Use "else if" instead of continue in vsp1_create_entities() loop that create links.

Revising locking

Add documentation for the uAPI.

TODO for ALSA
============

Merge Shuah patch series after being reviewed by Media and ALSA people

TODO for a next versions:
=========================

- Remove unused fields from media_entity (like major, minor, revision, group_id, num_links, num_backlinks, num_pads)

- dynamic entity/interface/link creation and removal;

- SETUP_LINK_V2 with dynamic support;

- dynamic pad creation and removal (needed?);

- multiple function per entity support;

- indirect interface links support;

- MC properties API.

Userspace:
==========

- Create a library with v2 API;

- Use the v2 API library on qv4l2/libdvbv5/xawtv/libv4l;

- Add the libudev/libsysfs logic at mc_nextgen_test to convert a devnode major/minor into a /dev/* name;

Other Nice things
=================

- Rename media_entity_init() to media_entity_create_pads()
- Rename media_graph_init() to media_graph_register()

=====================================================

The diffstat when compared with the branch devel/mc_next_gen.v8.4-rebased_v2 from my experimental tree follows.

Updating 90d1f0a4cc49..fc6740cbdd99
Fast-forward

 Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml |  81 +++++++++++++---------
 Documentation/media-framework.txt                           |   2 +-
 Documentation/video4linux/v4l2-framework.txt                |   4 +-
 drivers/media/common/siano/smsdvb-main.c                    |   6 +-
 drivers/media/dvb-core/dmxdev.c                             |   4 +-
 drivers/media/dvb-core/dvb_ca_en50221.c                     |   2 +-
 drivers/media/dvb-core/dvb_frontend.c                       |  11 ++-
 drivers/media/dvb-core/dvb_net.c                            |   2 +-
 drivers/media/dvb-core/dvbdev.c                             | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
 drivers/media/dvb-core/dvbdev.h                             |  17 +++--
 drivers/media/dvb-frontends/au8522_decoder.c                |   2 +-
 drivers/media/firewire/firedtv-ci.c                         |   2 +-
 drivers/media/i2c/adp1653.c                                 |   2 +-
 drivers/media/i2c/adv7180.c                                 |   2 +-
 drivers/media/i2c/as3645a.c                                 |   2 +-
 drivers/media/i2c/cx25840/cx25840-core.c                    |   2 +-
 drivers/media/i2c/lm3560.c                                  |   2 +-
 drivers/media/i2c/lm3646.c                                  |   2 +-
 drivers/media/i2c/m5mols/m5mols_core.c                      |   2 +-
 drivers/media/i2c/noon010pc30.c                             |   2 +-
 drivers/media/i2c/ov2659.c                                  |   2 +-
 drivers/media/i2c/ov9650.c                                  |   2 +-
 drivers/media/i2c/s5c73m3/s5c73m3-core.c                    |   8 +--
 drivers/media/i2c/s5k4ecgx.c                                |   2 +-
 drivers/media/i2c/s5k5baf.c                                 |   8 +--
 drivers/media/i2c/s5k6aa.c                                  |   2 +-
 drivers/media/i2c/smiapp/smiapp-core.c                      |  22 +++---
 drivers/media/i2c/tvp514x.c                                 |   2 +-
 drivers/media/i2c/tvp7002.c                                 |   2 +-
 drivers/media/media-device.c                                | 265 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 drivers/media/media-entity.c                                | 462 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------
 drivers/media/pci/bt8xx/dst_ca.c                            |   3 +-
 drivers/media/pci/ddbridge/ddbridge-core.c                  |   2 +-
 drivers/media/pci/ngene/ngene-core.c                        |   2 +-
 drivers/media/pci/ttpci/av7110.c                            |   2 +-
 drivers/media/pci/ttpci/av7110_av.c                         |   4 +-
 drivers/media/pci/ttpci/av7110_ca.c                         |   2 +-
 drivers/media/platform/exynos4-is/fimc-isp-video.c          |   9 ++-
 drivers/media/platform/exynos4-is/fimc-lite.c               |  18 +++--
 drivers/media/platform/exynos4-is/media-dev.c               |  25 ++++---
 drivers/media/platform/exynos4-is/media-dev.h               |   8 +--
 drivers/media/platform/omap3isp/isp.c                       | 202 +++++++++++++++++++++++++++++++++--------------------
 drivers/media/platform/omap3isp/ispccdc.c                   |  39 +++++++----
 drivers/media/platform/omap3isp/ispccdc.h                   |   1 +
 drivers/media/platform/omap3isp/ispccp2.c                   |  35 ++++++----
 drivers/media/platform/omap3isp/ispccp2.h                   |   1 +
 drivers/media/platform/omap3isp/ispcsi2.c                   |  33 ++++++---
 drivers/media/platform/omap3isp/ispcsi2.h                   |   1 +
 drivers/media/platform/omap3isp/isppreview.c                |  48 ++++++++-----
 drivers/media/platform/omap3isp/isppreview.h                |   1 +
 drivers/media/platform/omap3isp/ispresizer.c                |  46 ++++++++-----
 drivers/media/platform/omap3isp/ispresizer.h                |   1 +
 drivers/media/platform/omap3isp/ispvideo.c                  |  17 ++---
 drivers/media/platform/s3c-camif/camif-capture.c            |   2 +-
 drivers/media/platform/s3c-camif/camif-core.c               |   4 +-
 drivers/media/platform/vsp1/vsp1_drv.c                      |  34 +++++----
 drivers/media/platform/vsp1/vsp1_rpf.c                      |  29 +++++---
 drivers/media/platform/vsp1/vsp1_rwpf.h                     |   5 ++
 drivers/media/platform/vsp1/vsp1_video.c                    |  15 ++--
 drivers/media/platform/vsp1/vsp1_wpf.c                      |  40 +++++++----
 drivers/media/platform/xilinx/xilinx-dma.c                  |  10 ++-
 drivers/media/platform/xilinx/xilinx-vipp.c                 |   4 +-
 drivers/media/usb/au0828/au0828-core.c                      | 100 ++++++++++++++++++++++-----
 drivers/media/usb/au0828/au0828-dvb.c                       |   8 ++-
 drivers/media/usb/au0828/au0828-video.c                     |  84 ++++++++++++++++++-----
 drivers/media/usb/au0828/au0828.h                           |   3 +-
 drivers/media/usb/cx231xx/cx231xx-cards.c                   |  46 ++++++++-----
 drivers/media/usb/cx231xx/cx231xx-dvb.c                     |   6 +-
 drivers/media/usb/cx231xx/cx231xx-video.c                   |  10 ++-
 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c                 |   4 +-
 drivers/media/usb/dvb-usb/dvb-usb-dvb.c                     |   6 +-
 drivers/media/usb/uvc/uvc_entity.c                          |  25 +++++--
 drivers/media/v4l2-core/tuner-core.c                        |  10 +--
 drivers/media/v4l2-core/v4l2-dev.c                          | 111 +++++++++++++++++++++++++-----
 drivers/media/v4l2-core/v4l2-device.c                       |  16 ++++-
 drivers/media/v4l2-core/v4l2-flash-led-class.c              |   2 +-
 drivers/media/v4l2-core/v4l2-subdev.c                       |   8 +--
 drivers/staging/media/davinci_vpfe/dm365_ipipe.c            |   9 ++-
 drivers/staging/media/davinci_vpfe/dm365_ipipeif.c          |  15 ++--
 drivers/staging/media/davinci_vpfe/dm365_isif.c             |  15 ++--
 drivers/staging/media/davinci_vpfe/dm365_resizer.c          |  33 +++++----
 drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c        |  10 +--
 drivers/staging/media/davinci_vpfe/vpfe_video.c             |  17 +++--
 drivers/staging/media/omap4iss/iss.c                        | 123 +++++++++++++++++++++------------
 drivers/staging/media/omap4iss/iss_csi2.c                   |  46 ++++++++++---
 drivers/staging/media/omap4iss/iss_csi2.h                   |   1 +
 drivers/staging/media/omap4iss/iss_ipipe.c                  |   9 ++-
 drivers/staging/media/omap4iss/iss_ipipeif.c                |  42 +++++++-----
 drivers/staging/media/omap4iss/iss_ipipeif.h                |   1 +
 drivers/staging/media/omap4iss/iss_resizer.c                |  40 +++++++----
 drivers/staging/media/omap4iss/iss_resizer.h                |   1 +
 drivers/staging/media/omap4iss/iss_video.c                  |   9 ++-
 include/media/media-device.h                                |  36 +++++++++-
 include/media/media-entity.h                                | 314 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
 include/media/tuner.h                                       |   8 +++
 include/media/v4l2-dev.h                                    |   1 +
 include/uapi/linux/media.h                                  | 213 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 99 files changed, 2539 insertions(+), 832 deletions(-)
Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml +14 -2
index f9bfe8094d6d..27f8817e7abe 100644
@@ -184,10 +184,22 @@
 	    a driver didn't initialize properly the entity, with is a Kernel bug</entry>
 	  </row>
 	  <row>
-	    <entry><constant>MEDIA_ENT_F_IO</constant></entry>
+	    <entry><constant>MEDIA_ENT_F_IO_V4L</constant></entry>
 	    <entry>Data streaming input and/or output entity.</entry>
 	  </row>
 	  <row>
+	    <entry><constant>MEDIA_ENT_F_IO_VBI</constant></entry>
+	    <entry>V4L VBI streaming input or output entity</entry>
+	  </row>
+	  <row>
+	    <entry><constant>MEDIA_ENT_F_IO_SWRADIO</constant></entry>
+	    <entry>V4L Software Digital Radio (SDR) streaming input or output entity</entry>
+	  </row>
+	  <row>
+	    <entry><constant>MEDIA_ENT_F_IO_DTV</constant></entry>
+	    <entry>DVB Digital TV streaming input or output entity</entry>
+	  </row>
+	  <row>
 	    <entry><constant>MEDIA_ENT_F_DTV_DEMOD</constant></entry>
 	    <entry>Digital TV demodulator entity.</entry>
 	  </row>
@@ -238,7 +250,7 @@
 	    broadcast, DVD players, cameras and video cassette recorders, in
 	    either NTSC, PAL, SECAM or HD format, separating the stream
 	    into its component parts, luminance and chrominance, and output
-	    it in some digital video standard, with appropriate embedded timing
+	    it in some digital video standard, with appropriate timing
 	    signals.</entry>
 	  </row>
 	  <row>
drivers/media/dvb-core/dvbdev.c +41 -23

144 lines not on this page · raw message

drivers/media/i2c/s5c73m3/s5c73m3-core.c +1 -1
index 7a68cf055486..3d578f2ce7b2 100644
@@ -1704,7 +1704,7 @@ static int s5c73m3_probe(struct i2c_client *client,
 	state->oif_pads[OIF_ISP_PAD].flags = MEDIA_PAD_FL_SINK;
 	state->oif_pads[OIF_JPEG_PAD].flags = MEDIA_PAD_FL_SINK;
 	state->oif_pads[OIF_SOURCE_PAD].flags = MEDIA_PAD_FL_SOURCE;
-	oif_sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
+	oif_sd->entity.function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
 
 	ret = media_entity_init(&oif_sd->entity, OIF_NUM_PADS,
 							state->oif_pads);
drivers/media/i2c/s5k5baf.c +1 -1
index 3a10e50b3620..564938ab2abd 100644
@@ -1919,7 +1919,7 @@ static int s5k5baf_configure_subdevs(struct s5k5baf *state,
 
 	state->pads[PAD_CIS].flags = MEDIA_PAD_FL_SINK;
 	state->pads[PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
-	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
+	sd->entity.function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
 	ret = media_entity_init(&sd->entity, NUM_ISP_PADS, state->pads);
 
 	if (!ret)
drivers/media/media-device.c +14 -21
index 1312e93ebd6e..3d0a77c1c899 100644
@@ -243,8 +243,8 @@ static long __media_device_get_topology(struct media_device *mdev,
 	struct media_v2_interface uintf;
 	struct media_v2_pad upad;
 	struct media_v2_link ulink;
-	int ret = 0;
 	unsigned int i;
+	int ret = 0;
 
 	topo->topology_version = mdev->topology_version;
 
@@ -579,25 +579,21 @@ void media_device_unregister(struct media_device *mdev)
 {
 	struct media_entity *entity;
 	struct media_entity *next;
-	struct media_link *link, *tmp_link;
 	struct media_interface *intf, *tmp_intf;
 
-	/* Remove interface links from the media device */
-	list_for_each_entry_safe(link, tmp_link, &mdev->links,
-				 graph_obj.list) {
-		media_gobj_remove(&link->graph_obj);
-		kfree(link);
-	}
+	/* Remove all entities from the media device */
+	list_for_each_entry_safe(entity, next, &mdev->entities, graph_obj.list)
+		media_device_unregister_entity(entity);
 
 	/* Remove all interfaces from the media device */
+	spin_lock(&mdev->lock);
 	list_for_each_entry_safe(intf, tmp_intf, &mdev->interfaces,
 				 graph_obj.list) {
+		__media_remove_intf_links(intf);
 		media_gobj_remove(&intf->graph_obj);
 		kfree(intf);
 	}
-
-	list_for_each_entry_safe(entity, next, &mdev->entities, graph_obj.list)
-		media_device_unregister_entity(entity);
+	spin_unlock(&mdev->lock);
 
 	device_remove_file(&mdev->devnode.dev, &dev_attr_model);
 	media_devnode_unregister(&mdev->devnode);
@@ -653,6 +649,7 @@ void media_device_unregister_entity(struct media_entity *entity)
 {
 	struct media_device *mdev = entity->graph_obj.mdev;
 	struct media_link *link, *tmp;
+	struct media_interface *intf;
 	unsigned int i;
 
 	if (mdev == NULL)
@@ -660,20 +657,16 @@ void media_device_unregister_entity(struct media_entity *entity)
 
 	spin_lock(&mdev->lock);
 
-	/* Remove interface links with this entity on it */
-	list_for_each_entry_safe(link, tmp, &mdev->links, graph_obj.list) {
-		if (media_type(link->gobj1) == MEDIA_GRAPH_ENTITY
-		    && link->entity == entity) {
-			media_gobj_remove(&link->graph_obj);
-			kfree(link);
+	/* Remove all interface links pointing to this entity */
+	list_for_each_entry(intf, &mdev->interfaces, graph_obj.list) {
+		list_for_each_entry_safe(link, tmp, &intf->links, list) {
+			if (link->entity == entity)
+				__media_remove_intf_link(link);
 		}
 	}
 
 	/* Remove all data links that belong to this entity */
-	list_for_each_entry_safe(link, tmp, &entity->links, list) {
-		media_gobj_remove(&link->graph_obj);
-		kfree(link);
-	}
+	__media_entity_remove_links(entity);
 
 	/* Remove all pads that belong to this entity */
 	for (i = 0; i < entity->num_pads; i++)
drivers/media/media-entity.c +16 -28

101 lines not on this page · raw message

drivers/media/platform/xilinx/xilinx-dma.c +1 -1
index b4697519201d..06eb74344507 100644
@@ -191,7 +191,7 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe,
 	while ((entity = media_entity_graph_walk_next(&graph))) {
 		struct xvip_dma *dma;
 
-		if (entity->function != MEDIA_ENT_F_IO)
+		if (entity->function != MEDIA_ENT_F_IO_V4L)
 			continue;
 
 		dma = to_xvip_dma(media_entity_to_video_device(entity));
drivers/media/usb/au0828/au0828-core.c +5 -3
index 71f3a9587825..1b207fa16a55 100644
@@ -206,11 +206,13 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
 		au0828_analog_unregister(dev);
 		v4l2_device_disconnect(&dev->v4l2_dev);
 		v4l2_device_put(&dev->v4l2_dev);
+		/*
+		 * No need to call au0828_usb_release() if V4L2 is enabled,
+		 * as this is already called via au0828_usb_v4l2_release()
+		 */
 		return;
 	}
 #endif
-	au0828_unregister_media_device(dev);
-
 	au0828_usb_release(dev);
 }
 
@@ -301,7 +303,7 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
 		if (AUVI_INPUT(i).type == AU0828_VMUX_UNDEFINED)
 			break;
 
-		switch(AUVI_INPUT(i).type) {
+		switch (AUVI_INPUT(i).type) {
 		case AU0828_VMUX_CABLE:
 		case AU0828_VMUX_TELEVISION:
 		case AU0828_VMUX_DVB:
drivers/media/usb/au0828/au0828-video.c +2 -2
index 637e369c87d9..150824fe382a 100644
@@ -1802,7 +1802,7 @@ static int au0828_vb2_setup(struct au0828_dev *dev)
 static void au0828_analog_create_entities(struct au0828_dev *dev)
 {
 #if defined(CONFIG_MEDIA_CONTROLLER)
-	static const char *inames[] = {
+	static const char * const inames[] = {
 		[AU0828_VMUX_COMPOSITE] = "Composite",
 		[AU0828_VMUX_SVIDEO] = "S-Video",
 		[AU0828_VMUX_CABLE] = "Cable TV",
@@ -1834,7 +1834,7 @@ static void au0828_analog_create_entities(struct au0828_dev *dev)
 		ent->flags = MEDIA_ENT_FL_CONNECTOR;
 		dev->input_pad[i].flags = MEDIA_PAD_FL_SOURCE;
 
-		switch(AUVI_INPUT(i).type) {
+		switch (AUVI_INPUT(i).type) {
 		case AU0828_VMUX_COMPOSITE:
 			ent->function = MEDIA_ENT_F_CONN_COMPOSITE;
 			break;
drivers/media/v4l2-core/v4l2-dev.c +3 -4
index bcf60d412905..d8e5994cccf1 100644
@@ -726,7 +726,6 @@ static void determine_valid_ioctls(struct video_device *vdev)
 			BASE_VIDIOC_PRIVATE);
 }
 
-
 static int video_register_media_controller(struct video_device *vdev, int type)
 {
 #if defined(CONFIG_MEDIA_CONTROLLER)
@@ -741,15 +740,15 @@ static int video_register_media_controller(struct video_device *vdev, int type)
 	switch (type) {
 	case VFL_TYPE_GRABBER:
 		intf_type = MEDIA_INTF_T_V4L_VIDEO;
-		vdev->entity.function = MEDIA_ENT_F_IO;
+		vdev->entity.function = MEDIA_ENT_F_IO_V4L;
 		break;
 	case VFL_TYPE_VBI:
 		intf_type = MEDIA_INTF_T_V4L_VBI;
-		vdev->entity.function = MEDIA_ENT_F_IO;
+		vdev->entity.function = MEDIA_ENT_F_IO_VBI;
 		break;
 	case VFL_TYPE_SDR:
 		intf_type = MEDIA_INTF_T_V4L_SWRADIO;
-		vdev->entity.function = MEDIA_ENT_F_IO;
+		vdev->entity.function = MEDIA_ENT_F_IO_SWRADIO;
 		break;
 	case VFL_TYPE_RADIO:
 		intf_type = MEDIA_INTF_T_V4L_RADIO;
drivers/media/v4l2-core/v4l2-subdev.c +1 -1
index d70aedc75998..d63083803144 100644
@@ -535,7 +535,7 @@ v4l2_subdev_link_validate_get_format(struct media_pad *pad,
 		return v4l2_subdev_call(sd, pad, get_fmt, NULL, fmt);
 	}
 
-	WARN(pad->entity->function != MEDIA_ENT_F_IO,
+	WARN(pad->entity->function != MEDIA_ENT_F_IO_V4L,
 	     "Driver bug! Wrong media entity type 0x%08x, entity %s\n",
 	     pad->entity->function, pad->entity->name);
 
drivers/staging/media/omap4iss/iss_resizer.c +1 -1
index 1d2cc3386c66..a3925ecd0ed7 100644
@@ -740,7 +740,7 @@ static int resizer_link_setup(struct media_entity *entity,
 
 		break;
 
-	case RESIZER_PAD_SOURCE_MEM :
+	case RESIZER_PAD_SOURCE_MEM:
 		/* Write to memory */
 		if (flags & MEDIA_LNK_FL_ENABLED) {
 			if (resizer->output & ~RESIZER_OUTPUT_MEMORY)
include/media/media-device.h +1 -1
index 1b12774a9ab4..87ff299e1265 100644
@@ -88,7 +88,7 @@ struct media_device {
 	struct list_head pads;
 	struct list_head links;
 
-	/* Protects the entities list */
+	/* Protects the graph objects creation/removal */
 	spinlock_t lock;
 	/* Serializes graph operations. */
 	struct mutex graph_mutex;
include/media/media-entity.h +35 -36

173 lines not on this page · raw message

include/uapi/linux/media.h +18 -19
index 90e90a6e62bf..ff6a8010c520 100644
@@ -51,8 +51,8 @@ struct media_device_info {
 /*
  * Base number ranges for entity functions
  *
- * NOTE: those ranges and entity function number are spased just to
- * make easier to maintain this file. Userspace should not rely on
+ * NOTE: those ranges and entity function number are phased just to
+ * make it easier to maintain this file. Userspace should not rely on
  * the ranges to identify a group of function types, as newer
  * functions can be added with any name within the full u32 range.
  */
@@ -64,7 +64,7 @@ struct media_device_info {
  * DVB entities
  */
 #define MEDIA_ENT_F_DTV_DEMOD		(MEDIA_ENT_F_BASE + 1)
-#define MEDIA_ENT_F_MPEG_TS_DEMUX	(MEDIA_ENT_F_BASE + 2)
+#define MEDIA_ENT_F_TS_DEMUX		(MEDIA_ENT_F_BASE + 2)
 #define MEDIA_ENT_F_DTV_CA		(MEDIA_ENT_F_BASE + 3)
 #define MEDIA_ENT_F_DTV_NET_DECAP	(MEDIA_ENT_F_BASE + 4)
 
@@ -78,6 +78,13 @@ struct media_device_info {
 #define MEDIA_ENT_F_CONN_TEST		(MEDIA_ENT_F_BASE + 24)
 
 /*
+ * I/O entities
+ */
+#define MEDIA_ENT_F_IO_DTV  		(MEDIA_ENT_F_BASE + 31)
+#define MEDIA_ENT_F_IO_VBI  		(MEDIA_ENT_F_BASE + 32)
+#define MEDIA_ENT_F_IO_SWRADIO		(MEDIA_ENT_F_BASE + 33)
+
+/*
  * Don't touch on those. The ranges MEDIA_ENT_F_OLD_BASE and
  * MEDIA_ENT_F_OLD_SUBDEV_BASE are kept to keep backward compatibility
  * with the legacy v1 API.The number range is out of range by purpose:
@@ -89,7 +96,7 @@ struct media_device_info {
  * registering the entity.
  */
 
-#define MEDIA_ENT_F_IO  		(MEDIA_ENT_F_OLD_BASE + 1)
+#define MEDIA_ENT_F_IO_V4L  		(MEDIA_ENT_F_OLD_BASE + 1)
 
 #define MEDIA_ENT_F_CAM_SENSOR		(MEDIA_ENT_F_OLD_SUBDEV_BASE + 1)
 #define MEDIA_ENT_F_FLASH		(MEDIA_ENT_F_OLD_SUBDEV_BASE + 2)
@@ -113,13 +120,13 @@ struct media_device_info {
 #define MEDIA_ENT_SUBTYPE_MASK		0x0000ffff
 
 #define MEDIA_ENT_T_DEVNODE		MEDIA_ENT_F_OLD_BASE
-#define MEDIA_ENT_T_DEVNODE_V4L		MEDIA_ENT_F_IO
+#define MEDIA_ENT_T_DEVNODE_V4L		MEDIA_ENT_F_IO_V4L
 #define MEDIA_ENT_T_DEVNODE_FB		(MEDIA_ENT_T_DEVNODE + 2)
 #define MEDIA_ENT_T_DEVNODE_ALSA	(MEDIA_ENT_T_DEVNODE + 3)
 #define MEDIA_ENT_T_DEVNODE_DVB		(MEDIA_ENT_T_DEVNODE + 4)
 
 #define MEDIA_ENT_T_UNKNOWN		MEDIA_ENT_F_UNKNOWN
-#define MEDIA_ENT_T_V4L2_VIDEO		MEDIA_ENT_F_IO
+#define MEDIA_ENT_T_V4L2_VIDEO		MEDIA_ENT_F_IO_V4L
 #define MEDIA_ENT_T_V4L2_SUBDEV		MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN
 #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR	MEDIA_ENT_F_CAM_SENSOR
 #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH	MEDIA_ENT_F_FLASH
@@ -237,7 +244,6 @@ struct media_links_enum {
 
 #define MEDIA_INTF_T_DVB_BASE	0x00000100
 #define MEDIA_INTF_T_V4L_BASE	0x00000200
-#define MEDIA_INTF_T_ALSA_BASE	0x00000300
 
 /* Interface types */
 
@@ -253,13 +259,6 @@ struct media_links_enum {
 #define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3)
 #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)
 
-#define MEDIA_INTF_T_ALSA_PCM_CAPTURE   (MEDIA_INTF_T_ALSA_BASE)
-#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK  (MEDIA_INTF_T_ALSA_BASE + 1)
-#define MEDIA_INTF_T_ALSA_CONTROL       (MEDIA_INTF_T_ALSA_BASE + 2)
-#define MEDIA_INTF_T_ALSA_COMPRESS      (MEDIA_INTF_T_ALSA_BASE + 3)
-#define MEDIA_INTF_T_ALSA_RAWMIDI       (MEDIA_INTF_T_ALSA_BASE + 4)
-#define MEDIA_INTF_T_ALSA_HWDEP         (MEDIA_INTF_T_ALSA_BASE + 5)
-
 /*
  * MC next gen API definitions
  *
@@ -313,11 +312,11 @@ struct media_v2_pad {
 };
 
 struct media_v2_link {
-    __u32 id;
-    __u32 source_id;
-    __u32 sink_id;
-    __u32 flags;
-    __u32 reserved[5];
+	__u32 id;
+	__u32 source_id;
+	__u32 sink_id;
+	__u32 flags;
+	__u32 reserved[5];
 };
 
 struct media_v2_topology {
#1 lore raw

Em Thu, 10 Dec 2015 18:34:11 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 28 lines

Hi,

I've been working during this week to address the issues pointed during the Media Controller really long review process. We should avoid taking so long to review patches in the future, as it is really painful to go back to the already done work 4/5/7 months after the patchsets (yes, there are patches here written 7 months ago that were only very recently reviewed!). Shame on us.

Anyway, The reviewed patches are now at the media-controller topic branch, at the main tree.

I took the care of recompiling and automatically doing runtime tests with KASAN enabled, patch by patch, in order to be sure that the MC is in a sane state. I also ran kmemleak, and was unable to identify any troubles associated with the MC next gen rework.

So, the media-controller topic branch looks sane to me. It should be noticed that there are several items on a TODO list to be addressed before being able to merge this branch back at the master branch.

Please notice that patch 22 was removed from this series:
Subject: [media] uapi/media.h: Declare interface types for ALSA

The idea is that this patch should be part of the patches that Shuah will submit and that requires review from the ALSA community before being merged.

Quoted 8 lines

Javier and me will start tomorrow on working on the pending items.

My goal is to have everything needed for Kernel 4.5 merge window done up to the next week.

---

The current TODO list, based on the per-patch review is:

As far as I checked, all issues at the TODO for Kernel 4.5 were already addressed, except for one item:

- Add documentation for the uAPI.

I'll address this last item tomorrow.

The patches that addressed the TODO list were sent already to the ML, on a few independent patch series.

They're all (including the Javier ones) applied on my experimental tree at branch media-controller-rc3:
git://linuxtv.org/mchehab/experimental.git media-controller-rc3

The userspace testing tool was also modified for the MC next gen, at the branch mc-next-gen-v2:
git://linuxtv.org/mchehab/experimental-v4l-utils.git mc-next-gen-v2

Please let me know if something else got missed ASAP, as I'll be addressing any missing stuff during this weekend.

My goal is to merge those patches at the main development branch this Monday.

NOTE:
====

The TODO list are hosted at: https://etherpad.fr

The original one is on the above site, at: /p/mc-v2-todo And we added a new version on the same site, at: /p/mc-v2-todo-v2

Things that got postponed to other Kernel versions:
===================================================

1) Sakari: Rethink about media-entity.h name;
2) Laurent: do a non-hacking version of the pad/subdev switch logic (waiting for Laurent's comment on this one);
3) Should address on a later series the changes to remove MEDIA_ENT_T_SUBDEV_UNKNOWN;
4) Laurent: All exported API functions need kerneldoc. (most are. There are a few less used that needs documentation, like the __foo functions);
5) Laurent: remove major/minor fields from entities

6) Remove unused fields from media_entity (major, minor, num_links, num_backlinks, num_pads)
7) dynamic entity/interface/link creation and removal;
8) SETUP_LINK_V2 with dynamic support;
9) dynamic pad creation and removal (needed?);
10) multiple function per entity support;
11) indirect interface links support;
12) MC properties API.

Userspace TODO:
==============

1) Create a library with v2 API;
2) Use the v2 API library on qv4l2/libdvbv5/xawtv/libv4l;

Regards,
Mauro

#2 lore raw

Em Fri, 11 Dec 2015 19:05:22 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 36 lines

Em Thu, 10 Dec 2015 18:34:11 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 33 lines

Hi,

I've been working during this week to address the issues pointed during the Media Controller really long review process. We should avoid taking so long to review patches in the future, as it is really painful to go back to the already done work 4/5/7 months after the patchsets (yes, there are patches here written 7 months ago that were only very recently reviewed!). Shame on us.

Anyway, The reviewed patches are now at the media-controller topic branch, at the main tree.

I took the care of recompiling and automatically doing runtime tests with KASAN enabled, patch by patch, in order to be sure that the MC is in a sane state. I also ran kmemleak, and was unable to identify any troubles associated with the MC next gen rework.

So, the media-controller topic branch looks sane to me. It should be noticed that there are several items on a TODO list to be addressed before being able to merge this branch back at the master branch.

Please notice that patch 22 was removed from this series:
Subject: [media] uapi/media.h: Declare interface types for ALSA

The idea is that this patch should be part of the patches that Shuah will submit and that requires review from the ALSA community before being merged.

Javier and me will start tomorrow on working on the pending items.

My goal is to have everything needed for Kernel 4.5 merge window done up to the next week.

Quoted 8 lines
Quoted 3 lines

---

The current TODO list, based on the per-patch review is:

As far as I checked, all issues at the TODO for Kernel 4.5 were already addressed, except for one item:

- Add documentation for the uAPI.

There are actually 3 other items that were not listed at the TODO:

- Merge of Sakari patches fixing media graph to work with entities with ID > 64;

- Use just one counter for the graph ID range. This patch depends on Sakari series;

- Merge of Javier patches that split media devnode register from the media_device internal register. Not actually a requirement for MC next gen, as it fixes an already existing race condition, but it will allow almost for free to have topology_version = 0 as the start version, with seems to be a good thing to drivers where the topology is always static;

I reviewed both Sakari and Javier series this weekend with a few comments.

Quoted 2 lines

I'll address this last item tomorrow.

Item addressed. I also sent some patches fixing some kernel-doc left overs. Now, there are only a few set of functions not documented at media-entity.h:

- the ones that will be touched by Sakari patches;
- two ancillary functions that will be removed when we unify the object ID numberspace.

I'll review those remaining items after merging Sakari's series.

Quoted 28 lines

The patches that addressed the TODO list were sent already to the ML, on a few independent patch series.

They're all (including the Javier ones) applied on my experimental tree at branch media-controller-rc3:
git://linuxtv.org/mchehab/experimental.git media-controller-rc3

The userspace testing tool was also modified for the MC next gen, at the branch mc-next-gen-v2:
git://linuxtv.org/mchehab/experimental-v4l-utils.git mc-next-gen-v2

Please let me know if something else got missed ASAP, as I'll be addressing any missing stuff during this weekend.

My goal is to merge those patches at the main development branch this Monday.

NOTE:
====

The TODO list are hosted at: https://etherpad.fr

The original one is on the above site, at: /p/mc-v2-todo And we added a new version on the same site, at: /p/mc-v2-todo-v2

Quoted 7 lines

Things that got postponed to other Kernel versions:
===================================================

1) Sakari: Rethink about media-entity.h name;
2) Laurent: do a non-hacking version of the pad/subdev switch logic (waiting for Laurent's comment on this one);
3) Should address on a later series the changes to remove MEDIA_ENT_T_SUBDEV_UNKNOWN;
4) Laurent: All exported API functions need kerneldoc. (most are. There are a few less used that needs documentation, like the __foo functions);

This will actually be addressed after applying Sakari's patch series.

Quoted 22 lines

5) Laurent: remove major/minor fields from entities

6) Remove unused fields from media_entity (major, minor, num_links, num_backlinks, num_pads)
7) dynamic entity/interface/link creation and removal;
8) SETUP_LINK_V2 with dynamic support;
9) dynamic pad creation and removal (needed?);
10) multiple function per entity support;
11) indirect interface links support;
12) MC properties API.

Userspace TODO:
==============

1) Create a library with v2 API;
2) Use the v2 API library on qv4l2/libdvbv5/xawtv/libv4l;

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Em Sun, 13 Dec 2015 09:12:50 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 46 lines

Em Fri, 11 Dec 2015 19:05:22 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 43 lines

Em Thu, 10 Dec 2015 18:34:11 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 28 lines

Hi,

I've been working during this week to address the issues pointed during the Media Controller really long review process. We should avoid taking so long to review patches in the future, as it is really painful to go back to the already done work 4/5/7 months after the patchsets (yes, there are patches here written 7 months ago that were only very recently reviewed!). Shame on us.

Anyway, The reviewed patches are now at the media-controller topic branch, at the main tree.

I took the care of recompiling and automatically doing runtime tests with KASAN enabled, patch by patch, in order to be sure that the MC is in a sane state. I also ran kmemleak, and was unable to identify any troubles associated with the MC next gen rework.

So, the media-controller topic branch looks sane to me. It should be noticed that there are several items on a TODO list to be addressed before being able to merge this branch back at the master branch.

Please notice that patch 22 was removed from this series:
Subject: [media] uapi/media.h: Declare interface types for ALSA

The idea is that this patch should be part of the patches that Shuah will submit and that requires review from the ALSA community before being merged.

Quoted 8 lines

Javier and me will start tomorrow on working on the pending items.

My goal is to have everything needed for Kernel 4.5 merge window done up to the next week.

---

The current TODO list, based on the per-patch review is:

As far as I checked, all issues at the TODO for Kernel 4.5 were already addressed, except for one item:

Quoted 6 lines
Quoted 1 line

- Add documentation for the uAPI.

There are actually 3 other items that were not listed at the TODO:

- Merge of Sakari patches fixing media graph to work with entities with ID > 64;

Done.

Quoted 3 lines

- Use just one counter for the graph ID range. This patch depends on Sakari series;

Done.

Quoted 7 lines

- Merge of Javier patches that split media devnode register from the media_device internal register. Not actually a requirement for MC next gen, as it fixes an already existing race condition, but it will allow almost for free to have topology_version = 0 as the start version, with seems to be a good thing to drivers where the topology is always static;

Done.

Quoted 11 lines

I reviewed both Sakari and Javier series this weekend with a few comments.

Quoted 2 lines

I'll address this last item tomorrow.

Item addressed. I also sent some patches fixing some kernel-doc left overs. Now, there are only a few set of functions not documented at media-entity.h:

Quoted 5 lines

- the ones that will be touched by Sakari patches;
- two ancillary functions that will be removed when we unify the object ID numberspace.

I'll review those remaining items after merging Sakari's series.

Done.

As far as I know, all pending items for Kernel 4.5 merge are complete. I should be moving the remaining patches from my experimental tree:
git://linuxtv.org/mchehab/experimental.git media-controller-rc4

to the media-controller topic branch by the end of this week, if nothing pops up.

Regards,
Mauro

#4 lore raw
Quoted 5 lines · Mauro Carvalho Chehab

Em Sun, 13 Dec 2015 09:12:50 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 7 lines

As far as I know, all pending items for Kernel 4.5 merge are complete. I should be moving the remaining patches from my experimental tree:
git://linuxtv.org/mchehab/experimental.git media-controller-rc4

to the media-controller topic branch by the end of this week, if nothing pops up.

Hi Mauro,

I don't like the flat graph I am seeing on experimental rc4 with all the pending patches for 4.5. I am attaching two media graphs generated on au0828 on rc3 and rc4. Something is off with rc4. I used the latest mc_nextgen_test tool to generate the graphs.

thanks,
-- Shuah

Signature · 5 lines
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
[email protected] | (970) 217-8978
#5 lore raw

Em Wed, 16 Dec 2015 18:12:58 -0700
Shuah Khan <[email protected]> escreveu:

Quoted 14 lines · Mauro Carvalho Chehab
Quoted 5 lines

Em Sun, 13 Dec 2015 09:12:50 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 7 lines

As far as I know, all pending items for Kernel 4.5 merge are complete. I should be moving the remaining patches from my experimental tree:
git://linuxtv.org/mchehab/experimental.git media-controller-rc4

to the media-controller topic branch by the end of this week, if nothing pops up.

Quoted 7 lines

Hi Mauro,

I don't like the flat graph I am seeing on experimental rc4 with all the pending patches for 4.5. I am attaching two media graphs generated on au0828 on rc3 and rc4. Something is off with rc4. I used the latest mc_nextgen_test tool to generate the graphs.

I guess this problem is due to the patch changed the object ID to use a single number range:

	http://git.linuxtv.org/mchehab/experimental.git/commit/?h=media-controller-rc4&id=9c04bcb45824fd8e5231f6f26269b57830c1f34d

We likely need to change the userspace tool due to that, but I'll take a look on it tomorrow.

Regards,
Mauro

#6 lore raw

Em Thu, 17 Dec 2015 00:19:24 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 25 lines

Em Wed, 16 Dec 2015 18:12:58 -0700
Shuah Khan <[email protected]> escreveu:

Quoted 14 lines · Mauro Carvalho Chehab
Quoted 5 lines

Em Sun, 13 Dec 2015 09:12:50 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 7 lines

As far as I know, all pending items for Kernel 4.5 merge are complete. I should be moving the remaining patches from my experimental tree:
git://linuxtv.org/mchehab/experimental.git media-controller-rc4

to the media-controller topic branch by the end of this week, if nothing pops up.

Quoted 7 lines

Hi Mauro,

I don't like the flat graph I am seeing on experimental rc4 with all the pending patches for 4.5. I am attaching two media graphs generated on au0828 on rc3 and rc4. Something is off with rc4. I used the latest mc_nextgen_test tool to generate the graphs.

Quoted 6 lines

I guess this problem is due to the patch changed the object ID to use a single number range:

	http://git.linuxtv.org/mchehab/experimental.git/commit/?h=media-controller-rc4&id=9c04bcb45824fd8e5231f6f26269b57830c1f34d

We likely need to change the userspace tool due to that, but I'll take a look on it tomorrow.

Yes, this was the culprit. I changed the ID to 64 bits, but this was actually a bad idea. This got fixed on this patch:

	https://patchwork.linuxtv.org/patch/32348/

I replaced the old patch to the new one on my -rc4 branch:

git://linuxtv.org/mchehab/experimental.git media-controller-rc4

The graph produced with it is enclosed.

Regards,
Mauro

Quoted 3 lines

Regards,
Mauro

#7 lore raw
Quoted 35 lines · Mauro Carvalho Chehab

Em Thu, 17 Dec 2015 00:19:24 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 25 lines

Em Wed, 16 Dec 2015 18:12:58 -0700
Shuah Khan <[email protected]> escreveu:

Quoted 14 lines · Mauro Carvalho Chehab
Quoted 5 lines

Em Sun, 13 Dec 2015 09:12:50 -0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 7 lines

As far as I know, all pending items for Kernel 4.5 merge are complete. I should be moving the remaining patches from my experimental tree:
git://linuxtv.org/mchehab/experimental.git media-controller-rc4

to the media-controller topic branch by the end of this week, if nothing pops up.

Quoted 7 lines

Hi Mauro,

I don't like the flat graph I am seeing on experimental rc4 with all the pending patches for 4.5. I am attaching two media graphs generated on au0828 on rc3 and rc4. Something is off with rc4. I used the latest mc_nextgen_test tool to generate the graphs.

Quoted 6 lines

I guess this problem is due to the patch changed the object ID to use a single number range:

	http://git.linuxtv.org/mchehab/experimental.git/commit/?h=media-controller-rc4&id=9c04bcb45824fd8e5231f6f26269b57830c1f34d

We likely need to change the userspace tool due to that, but I'll take a look on it tomorrow.

Quoted 9 lines

Yes, this was the culprit. I changed the ID to 64 bits, but this was actually a bad idea. This got fixed on this patch:

	https://patchwork.linuxtv.org/patch/32348/

I replaced the old patch to the new one on my -rc4 branch:

git://linuxtv.org/mchehab/experimental.git media-controller-rc4

Graph looks good. Update on ALSA work. I rebased on media-controller rc3 and test the 24 patch series. I was hoping to wrap up reabse on media-controller rc4 and send patches out today.

However, I ran into problems on on patch 18 switches au0828 to using managed media controller media_device. The change to split media device registration into init and register phases is posing some problems with my approach for coordinating media device init and register by au0828 bridge driver and smd-usb-audio. It can be easily solved, I do have to rethink the logic and re-do the code in these two drivers.

I am going to take care of this little (cross my fingers) before the end of the year and still hope to make 4.5 if stars and media and alsa maintainers are aligned :)

thanks,
-- Shuah

Signature · 5 lines
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
[email protected] | (970) 217-8978