Re: Media Controller patches

2015-12-18 Thread Shuah Khan
On 12/17/2015 04:06 AM, Mauro Carvalho Chehab wrote:
> Em Thu, 17 Dec 2015 00:19:24 -0200
> Mauro Carvalho Chehab  escreveu:
> 
>> Em Wed, 16 Dec 2015 18:12:58 -0700
>> Shuah Khan  escreveu:
>>
>>> On 12/16/2015 10:43 AM, Mauro Carvalho Chehab wrote:
 Em Sun, 13 Dec 2015 09:12:50 -0200
 Mauro Carvalho Chehab  escreveu:

>>>

 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.
>>
>> 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=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
> 

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


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shua...@osg.samsung.com | (970) 217-8978
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Media Controller patches

2015-12-16 Thread Mauro Carvalho Chehab
Em Sun, 13 Dec 2015 09:12:50 -0200
Mauro Carvalho Chehab  escreveu:

> Em Fri, 11 Dec 2015 19:05:22 -0200
> Mauro Carvalho Chehab  escreveu:
> 
> > Em Thu, 10 Dec 2015 18:34:11 -0200
> > Mauro Carvalho Chehab  escreveu:
> > 
> > > 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:
> > 
> > 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;

Done.

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

Done.

> 
> - 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.

> 
> I reviewed both Sakari and Javier series this weekend with a few
> comments.
> 
> > 
> > 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.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Media Controller patches

2015-12-16 Thread Mauro Carvalho Chehab
Em Wed, 16 Dec 2015 18:12:58 -0700
Shuah Khan  escreveu:

> On 12/16/2015 10:43 AM, Mauro Carvalho Chehab wrote:
> > Em Sun, 13 Dec 2015 09:12:50 -0200
> > Mauro Carvalho Chehab  escreveu:
> > 
> 
> > 
> > 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.

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=9c04bcb45824fd8e5231f6f26269b57830c1f34d

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

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


Re: Media Controller patches

2015-12-13 Thread Mauro Carvalho Chehab
Em Fri, 11 Dec 2015 19:05:22 -0200
Mauro Carvalho Chehab  escreveu:

> Em Thu, 10 Dec 2015 18:34:11 -0200
> Mauro Carvalho Chehab  escreveu:
> 
> > 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:
> 
> 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.

> 
> 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.

> 
> 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);

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

> 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 

Re: Media Controller patches

2015-12-11 Thread Mauro Carvalho Chehab
Em Thu, 10 Dec 2015 18:34:11 -0200
Mauro Carvalho Chehab  escreveu:

> 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:

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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Media Controller patches

2015-12-10 Thread Mauro Carvalho Chehab
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 {
 > > +u32id;
 > > +};
 > > +
 > > +  
 > 
 > 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:
>  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:
> +/*
> + * 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:
> -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, >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) {


[PATCH 00/14] OMAP3 ISP and media controller patches for 2.6.39

2011-04-05 Thread Laurent Pinchart
Hi everybody,

Here's a set of OMAP3 ISP patches for 2.6.39, including two media controller
patches and a V4L2 core patch.

Most of those patches fix code and documentation. Patches 10/14 to 13/14
implement lane shifter support in the OMAP3 ISP driver. That's a new feature,
but there's no risk of regression from 2.6.38 as the OMAP3 ISP driver has been
merged into 2.6.39-r1.

I'll send a pull request at the end of the week if there's no comment on the
patches.

David Cohen (1):
  omap3isp: stat: update struct ispstat_generic_config's comments

Laurent Pinchart (6):
  media: Use correct ioctl name in MEDIA_IOC_SETUP_LINK documentation
  omap3isp: resizer: Center the crop rectangle
  omap3isp: resizer: Use 4-tap mode equations when the ratio is = 512
  media: Properly handle link flags in link setup, link notify callback
  omap3isp: isp: Reset the ISP when the pipeline can't be stopped
  omap3isp: Don't increment node entity use count when poweron fails

Michael Jones (5):
  omap3isp: Fix trivial typos
  v4l: add V4L2_PIX_FMT_Y12 format
  media: add missing 8-bit bayer formats and Y12
  omap3isp: ccdc: support Y10/12, 8-bit bayer fmts
  omap3isp: lane shifter support

Sakari Ailus (1):
  omap3isp: resizer: Improved resizer rsz factor formula

Stanimir Varbanov (1):
  omap3isp: Use isp xclk defines

 Documentation/DocBook/media-entities.tmpl  |1 +
 Documentation/DocBook/v4l/media-ioc-setup-link.xml |2 +-
 Documentation/DocBook/v4l/pixfmt-y12.xml   |   79 ++
 Documentation/DocBook/v4l/pixfmt.xml   |1 +
 Documentation/DocBook/v4l/subdev-formats.xml   |   59 +++
 drivers/media/media-entity.c   |8 +-
 drivers/media/video/omap3isp/isp.c |   39 +--
 drivers/media/video/omap3isp/isp.h |   12 +-
 drivers/media/video/omap3isp/ispccdc.c |   37 ++--
 drivers/media/video/omap3isp/isppreview.c  |2 +-
 drivers/media/video/omap3isp/ispqueue.c|4 +-
 drivers/media/video/omap3isp/ispresizer.c  |   75 +++---
 drivers/media/video/omap3isp/ispstat.h |6 +-
 drivers/media/video/omap3isp/ispvideo.c|  108 +---
 drivers/media/video/omap3isp/ispvideo.h|3 +
 include/linux/v4l2-mediabus.h  |7 +-
 include/linux/videodev2.h  |1 +
 17 files changed, 380 insertions(+), 64 deletions(-)
 create mode 100644 Documentation/DocBook/v4l/pixfmt-y12.xml

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html