devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: mark.rutland@arm.com, andrew-ct.chen@mediatek.com,
	minghsiu.tsai@mediatek.com, sakari.ailus@linux.intel.com,
	nick@shmanahar.org, songjun.wu@microchip.com, hverkuil@xs4all.nl,
	Steve Longerbeam <steve_longerbeam@mentor.com>,
	pavel@ucw.cz, robert.jarzmik@free.fr, devel@driverdev.osuosl.org,
	markus.heiser@darmarIT.de,
	laurent.pinchart+renesas@ideasonboard.com, shuah@kernel.org,
	geert@linux-m68k.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, kernel@pengutronix.de, arnd@arndb.de,
	mchehab@kernel.org, bparrot@ti.com, robh+dt@kernel.org,
	horms+renesas@verge.net.au, tiffany.lin@mediatek.com,
	linux-arm-kernel@lists.infradead.org,
	niklas.soderlund+renesas@ragnatech.se,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	jean-christophe.trotin@st.com, p.zabel@pengut
Subject: Re: [PATCH v5 00/39] i.MX Media Driver
Date: Sun, 12 Mar 2017 13:39:37 -0700	[thread overview]
Message-ID: <146d8ac4-bf7d-59d3-a71b-9833cfdd6639@gmail.com> (raw)
In-Reply-To: <fa07c8d2-0943-b7d1-8d37-76e03bd527c0@gmail.com>



On 03/12/2017 01:36 PM, Steve Longerbeam wrote:
>
>
> On 03/12/2017 01:16 PM, Steve Longerbeam wrote:
>>
>>
>> On 03/12/2017 12:44 PM, Steve Longerbeam wrote:
>>>
>>>
>>> On 03/12/2017 12:29 PM, Russell King - ARM Linux wrote:
>>>> On Sun, Mar 12, 2017 at 12:21:45PM -0700, Steve Longerbeam wrote:
>>>>> There's actually nothing preventing userland from disabling a link
>>>>> multiple times, and imx_media_link_notify() complies, and so
>>>>> csi_s_power(OFF) gets called multiple times, and so that WARN_ON()
>>>>> in there is silly, I borrowed this from other MC driver examples,
>>>>> but it makes no sense to me, I'll remove it and prevent the power
>>>>> count from going negative.
>>>>
>>>> Hmm.  So what happens if one of the CSI's links is enabled, and we
>>>> disable a different link from the CSI several times?  Doesn't that
>>>> mean the power count will go to zero despite there being an enabled
>>>> link?
>>>
>>> Yes, the CSI will be powered off even if it still has an enabled link.
>>> But one of its other links has been disabled, meaning the pipeline as
>>> a whole is disabled. So I think it makes sense to power down the CSI,
>>> the pipeline isn't usable at that point.
>>>
>>> And remember that the CSI does not allow both output pads to be enabled
>>> at the same time. If that were so then indeed there would be a problem,
>>> because it would mean there is another active pipeline that requires the
>>> CSI being powered on, but that's not the case.
>>>
>>> I think this is consistent with the other entities as well, but I will
>>> double check.
>>
>>
>> At first I thought this could be a problem for one entity, the csi-2
>> receiver.
>>
>> It can enable all four of its output pads at once (if the input stream
>> contains all 4 virtual channels, the csi-2 receiver must support
>> demuxing all of them onto all 4 of its output pads).
>>
>> But after more review, this should not be an issue. If a csi-2 sink
>> (a CSI or a CSI mux) link is disabled, the csi-2 receiver is no longer
>> reachable from that sink, so attempts to disable the csi-2 via that
>> path again is not possible. The other potential problem is disabling
>> from the csi-2's own sink pad, but in that case the csi-2 no longer
>> has a source, so again it makes sense to power off the csi-2 even
>> if it has enabled output pads.
>>
>
> But hold on, if my logic is correct, then why did the CSI power-off
> get reached in your case, multiple times? Yes I think there is a bug,
> link_notify() is not checking if the link has already been disabled.
> I will fix this. But I'm surprised media core's link_notify handling
> doesn't do this.

but it does:

int __media_entity_setup_link(struct media_link *link, u32 flags)
{
...
     if (link->flags == flags)
         return 0;
...
}

What the heck. Anyway, I'll track this down.

Steve

>
> Steve
>

  reply	other threads:[~2017-03-12 20:39 UTC|newest]

Thread overview: 161+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10  4:52 [PATCH v5 00/39] i.MX Media Driver Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 01/39] [media] dt-bindings: Add bindings for video-multiplexer device Steve Longerbeam
2017-03-16 21:21   ` Rob Herring
2017-03-10  4:52 ` [PATCH v5 02/39] [media] dt-bindings: Add bindings for i.MX media driver Steve Longerbeam
2017-03-20 15:02   ` Rob Herring
2017-03-10  4:52 ` [PATCH v5 04/39] ARM: dts: imx6qdl: Add compatible, clocks, irqs to MIPI CSI-2 node Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 05/39] ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their connections Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 06/39] ARM: dts: imx6qdl: add capture-subsystem device Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 07/39] ARM: dts: imx6qdl-sabrelite: remove erratum ERR006687 workaround Steve Longerbeam
2017-03-10 18:59   ` Troy Kisky
     [not found]     ` <9f5d0ac4-0602-c729-5c00-1d9ef49247c1-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
2017-03-10 19:17       ` Fabio Estevam
2017-03-10 21:57         ` Pavel Machek
2017-03-10 22:05           ` Fabio Estevam
2017-03-15 18:49         ` Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 08/39] ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 09/39] ARM: dts: imx6-sabresd: " Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 10/39] ARM: dts: imx6-sabreauto: create i2cmux for i2c3 Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 11/39] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 12/39] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 14/39] add mux and video interface bridge entity functions Steve Longerbeam
2017-03-10  4:52 ` [PATCH v5 15/39] [media] v4l2: add a frame interval error event Steve Longerbeam
2017-03-10 12:03   ` Hans Verkuil
2017-03-10 18:37     ` Steve Longerbeam
     [not found]       ` <ec05e6e0-79f2-2db2-bde9-4aed00d76faa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-10 23:30         ` Pavel Machek
2017-03-10 23:42           ` Steve Longerbeam
2017-03-11 11:39       ` Hans Verkuil
2017-03-11 18:14         ` Steve Longerbeam
     [not found]           ` <5d5cf4a4-a4d3-586e-cd16-54f543dfcce9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-11 18:51             ` Russell King - ARM Linux
2017-03-11 18:58               ` Steve Longerbeam
2017-03-11 19:00               ` Steve Longerbeam
2017-03-13 10:02             ` Hans Verkuil
     [not found]               ` <aa6a5a1d-18fd-8bed-a349-2654d2d1abe0-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2017-03-13 10:45                 ` Russell King - ARM Linux
     [not found]                   ` <20170313104538.GF21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-13 10:53                     ` Hans Verkuil
     [not found]                       ` <b36875e0-683a-fcc3-343d-9ddd1a39cac0-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2017-03-13 17:06                         ` Steve Longerbeam
     [not found]                           ` <bb2d078d-1c2f-ad67-d98f-bde3894601d6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-13 17:10                             ` Hans Verkuil
     [not found]                               ` <25963c4e-e326-fd60-32a3-918eea7d9bdc-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2017-03-13 21:47                                 ` Steve Longerbeam
2017-03-14 16:21                   ` Nicolas Dufresne
     [not found]                     ` <1489508491.28116.8.camel-dDhyB4GVkw9AFePFGvp55w@public.gmane.org>
2017-03-14 16:43                       ` Steve Longerbeam
2017-03-16 22:15                         ` Sakari Ailus
2017-03-14 16:47                     ` Russell King - ARM Linux
2017-03-14 16:50                       ` Steve Longerbeam
2017-03-14 18:26                   ` Pavel Machek
2017-03-10  4:52 ` [PATCH v5 16/39] [media] v4l2: add a new-frame before end-of-frame event Steve Longerbeam
2017-03-10 12:07   ` Hans Verkuil
2017-03-10  4:52 ` [PATCH v5 17/39] [media] v4l2-mc: add a function to inherit controls from a pipeline Steve Longerbeam
2017-03-10 11:45   ` Hans Verkuil
2017-03-10  4:52 ` [PATCH v5 18/39] [media] v4l: subdev: Add function to validate frame interval Steve Longerbeam
     [not found]   ` <1489121599-23206-19-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-03-11 13:41     ` Sakari Ailus
     [not found]       ` <20170311134119.GO3220-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2017-03-11 20:31         ` Steve Longerbeam
2017-03-16 22:17           ` Sakari Ailus
2017-03-10  4:52 ` [PATCH v5 19/39] [media] add Omnivision OV5640 sensor driver Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 20/39] platform: add video-multiplexer subdevice driver Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 21/39] UAPI: Add media UAPI Kbuild file Steve Longerbeam
     [not found]   ` <1489121599-23206-22-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-03-11 13:49     ` Sakari Ailus
2017-03-11 18:20       ` Steve Longerbeam
     [not found]         ` <184c02bf-782d-6dbe-e603-a82ac8dcc8b6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-13  9:55           ` Hans Verkuil
2017-03-10  4:53 ` [PATCH v5 22/39] media: Add userspace header file for i.MX Steve Longerbeam
2017-03-10 11:49   ` Hans Verkuil
     [not found]   ` <1489121599-23206-23-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-03-10 23:32     ` Pavel Machek
2017-03-10  4:53 ` [PATCH v5 23/39] media: Add i.MX media core driver Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 24/39] media: imx: Add Capture Device Interface Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 25/39] media: imx: Add CSI subdev driver Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 26/39] media: imx: Add VDIC " Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 27/39] media: imx: Add IC subdev drivers Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 28/39] media: imx: Add MIPI CSI-2 Receiver subdev driver Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 29/39] ARM: imx_v6_v7_defconfig: Enable staging video4linux drivers Steve Longerbeam
     [not found] ` <1489121599-23206-1-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-03-10  4:52   ` [PATCH v5 03/39] [media] dt/bindings: Add bindings for OV5640 Steve Longerbeam
2017-03-20 15:03     ` Rob Herring
2017-03-10  4:52   ` [PATCH v5 13/39] ARM: dts: imx6-sabreauto: add the ADV7180 video decoder Steve Longerbeam
2017-03-10  4:53   ` [PATCH v5 30/39] media: imx: add support for bayer formats Steve Longerbeam
2017-03-10 20:13   ` [PATCH v5 00/39] i.MX Media Driver Russell King - ARM Linux
2017-03-10 23:20     ` Steve Longerbeam
2017-03-12 17:47       ` Russell King - ARM Linux
2017-03-12  0:30     ` Steve Longerbeam
2017-03-12 19:57       ` Russell King - ARM Linux
     [not found]         ` <20170312195741.GS21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-12 20:05           ` Steve Longerbeam
2017-03-12 20:22             ` Russell King - ARM Linux
2017-03-13  4:26               ` Steve Longerbeam
     [not found]                 ` <f1807742-012f-249e-1ad8-22d8434695cb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-13  8:16                   ` Russell King - ARM Linux
2017-03-13  9:30                     ` Russell King - ARM Linux
     [not found]                       ` <20170313093007.GD21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-13 23:39                         ` Steve Longerbeam
2017-03-13 23:37                     ` Steve Longerbeam
2017-03-12 17:51   ` Russell King - ARM Linux
     [not found]     ` <20170312175118.GP21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-12 19:21       ` Steve Longerbeam
2017-03-12 19:29         ` Russell King - ARM Linux
2017-03-12 19:44           ` Steve Longerbeam
     [not found]             ` <58b30bca-20ca-d4bd-7b86-04a4b8e71935-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-12 20:16               ` Steve Longerbeam
2017-03-12 20:36                 ` Steve Longerbeam
2017-03-12 20:39                   ` Steve Longerbeam [this message]
2017-03-12 20:40                   ` Russell King - ARM Linux
     [not found]                     ` <20170312204037.GU21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-12 21:09                       ` Russell King - ARM Linux
     [not found]                         ` <20170312210952.GV21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-14 17:29                           ` Steve Longerbeam
2017-03-18 20:02                             ` Steve Longerbeam
2017-03-12 19:47   ` Russell King - ARM Linux
     [not found]     ` <20170312194700.GR21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-12 20:00       ` Steve Longerbeam
2017-03-12 20:59       ` Mauro Carvalho Chehab
2017-03-12 21:13         ` Russell King - ARM Linux
     [not found]           ` <20170312211324.GW21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-12 22:10             ` Mauro Carvalho Chehab
2017-03-14 17:02               ` Steve Longerbeam
2017-03-18 19:22   ` Russell King - ARM Linux
     [not found]     ` <20170318192258.GL21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-18 19:58       ` Steve Longerbeam
2017-03-18 20:43         ` Russell King - ARM Linux
     [not found]           ` <20170318204324.GM21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-19  0:41             ` Nicolas Dufresne
2017-03-19  0:54               ` Russell King - ARM Linux
2017-03-19 14:33                 ` Nicolas Dufresne
2017-03-19 14:51                   ` Russell King - ARM Linux
     [not found]               ` <1489884074.21659.7.camel-dDhyB4GVkw9AFePFGvp55w@public.gmane.org>
2017-03-19  9:55                 ` Russell King - ARM Linux
2017-03-19 14:45                   ` Nicolas Dufresne
2017-03-19 13:57             ` Vladimir Zapolskiy
2017-03-19 14:21               ` Russell King - ARM Linux
2017-03-19 14:22                 ` Russell King - ARM Linux
2017-03-19 15:00                   ` Vladimir Zapolskiy
2017-03-19 15:09                     ` Russell King - ARM Linux
     [not found]                 ` <20170319142110.GT21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-19 14:47                   ` Nicolas Dufresne
2017-03-19 10:38         ` Russell King - ARM Linux
2017-03-19 17:54           ` Steve Longerbeam
2017-03-19 18:04             ` Russell King - ARM Linux
2017-03-20 13:01             ` Hans Verkuil
2017-03-20 13:29               ` Russell King - ARM Linux
2017-03-20 13:57                 ` Hans Verkuil
2017-03-20 14:11                   ` Russell King - ARM Linux
2017-03-20 15:57                     ` Hans Verkuil
     [not found]                       ` <40e08d05-58cd-a295-3174-123147ee2ac5-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2017-03-21 10:42                         ` Niklas Söderlund
2017-03-21 10:59                           ` Hans Verkuil
2017-03-21 11:36                             ` Russell King - ARM Linux
2017-03-22 18:10                               ` Nicolas Dufresne
2017-03-19 12:14         ` Russell King - ARM Linux
2017-03-19 18:37           ` Steve Longerbeam
2017-03-19 18:51             ` Russell King - ARM Linux
2017-03-19 18:56               ` Steve Longerbeam
2017-03-20 12:49           ` Hans Verkuil
2017-03-20 13:20           ` Philipp Zabel
2017-03-20 15:43             ` Russell King - ARM Linux
2017-03-20 16:29               ` Philipp Zabel
2017-03-20 16:35                 ` Russell King - ARM Linux
     [not found]         ` <aef6c412-5464-726b-42f6-a24b7323aa9c-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-03-20 13:15           ` Philipp Zabel
2017-03-10  4:53 ` [PATCH v5 31/39] media: imx: csi: add support for bayer formats Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 32/39] media: imx: csi: fix crop rectangle changes in set_fmt Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 33/39] media: imx: mipi-csi2: enable setting and getting of frame rates Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 34/39] media: imx: csi: add __csi_get_fmt Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 35/39] media: imx: csi/fim: add support for frame intervals Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 36/39] media: imx: redo pixel format enumeration and negotiation Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 37/39] media: imx: csi: add frame skipping support Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 38/39] media: imx: csi: fix crop rectangle reset in sink set_fmt Steve Longerbeam
     [not found]   ` <1489121599-23206-39-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-03-19 15:22     ` Russell King - ARM Linux
2017-03-19 19:08       ` Steve Longerbeam
2017-03-20 11:55         ` Philipp Zabel
2017-03-20 12:08           ` Russell King - ARM Linux
2017-03-20 14:00             ` Philipp Zabel
2017-03-20 14:17               ` Russell King - ARM Linux
2017-03-20 17:16                 ` Russell King - ARM Linux
     [not found]                 ` <20170320141705.GL21222-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-03-20 17:23                   ` Philipp Zabel
2017-03-20 20:47                     ` Russell King - ARM Linux
2017-03-21  4:03                     ` Steve Longerbeam
2017-03-21 11:27                     ` Russell King - ARM Linux
2017-03-21 23:56                       ` Steve Longerbeam
2017-03-21 23:33                     ` Steve Longerbeam
2017-03-20 17:40                 ` Philipp Zabel
2017-03-20 17:59                   ` Russell King - ARM Linux
2017-03-20 19:48               ` Steve Longerbeam
2017-03-10  4:53 ` [PATCH v5 39/39] media: imx: propagate sink pad formats to source pads Steve Longerbeam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146d8ac4-bf7d-59d3-a71b-9833cfdd6639@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=arnd@arndb.de \
    --cc=bparrot@ti.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms+renesas@verge.net.au \
    --cc=hverkuil@xs4all.nl \
    --cc=jean-christophe.trotin@st.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=markus.heiser@darmarIT.de \
    --cc=mchehab@kernel.org \
    --cc=minghsiu.tsai@mediatek.com \
    --cc=nick@shmanahar.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=p.zabel@pengut \
    --cc=pavel@ucw.cz \
    --cc=robert.jarzmik@free.fr \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shuah@kernel.org \
    --cc=songjun.wu@microchip.com \
    --cc=steve_longerbeam@mentor.com \
    --cc=tiffany.lin@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).