Thread (51 messages) 51 messages, 8 authors, 2019-04-26

Re: [PATCH v6 05/17] media: rkisp1: add Rockchip ISP1 subdev driver

From: Tomasz Figa <hidden>
Date: 2018-05-25 04:36:03
Also in: linux-arm-kernel, linux-iommu, linux-media, linux-rockchip, lkml

On Thu, May 24, 2018 at 8:30 PM Baruch Siach [off-list ref] wrote:
Hi Tomasz,
On Mon, May 07, 2018 at 06:41:50AM +0000, Tomasz Figa wrote:
quoted
On Mon, May 7, 2018 at 3:38 PM Baruch Siach [off-list ref] wrote:
quoted
On Mon, May 07, 2018 at 06:13:27AM +0000, Tomasz Figa wrote:
quoted
On Thu, May 3, 2018 at 6:09 PM Baruch Siach [off-list ref]
wrote:
quoted
quoted
quoted
quoted
On Thu, Mar 08, 2018 at 05:47:55PM +0800, Jacob Chen wrote:
quoted
+static int rkisp1_isp_sd_s_power(struct v4l2_subdev *sd, int
on)
quoted
quoted
quoted
quoted
quoted
+{
+     struct rkisp1_device *isp_dev = sd_to_isp_dev(sd);
+     int ret;
+
+     v4l2_dbg(1, rkisp1_debug, &isp_dev->v4l2_dev, "s_power:
%d\n",
quoted
quoted
quoted
on);
quoted
quoted
+
+     if (on) {
+             ret = pm_runtime_get_sync(isp_dev->dev);
+             if (ret < 0)
+                     return ret;
+
+             rkisp1_config_clk(isp_dev);
+     } else {
+             ret = pm_runtime_put(isp_dev->dev);
quoted
I commented this line out to make more than one STREAMON work.
Otherwise,
quoted
quoted
quoted
the second STREAMON hangs. I guess the bug is not this driver.
Probably
quoted
quoted
quoted
something in drivers/soc/rockchip/pm_domains.c. Just noting that
in
quoted
case
quoted
quoted
quoted
you or someone on Cc would like to investigate it further.

I tested v4.16-rc4 on the Tinkerboard.
Looks like that version doesn't include the IOMMU PM and clock
handling
quoted
quoted
quoted
rework [1], which should fix a lot of runtime PM issues. FWIW,
linux-next
quoted
quoted
seems to already include it.

[1] https://lkml.org/lkml/2018/3/23/44
quoted
Thanks for the reference.
quoted
It looks like the iommu driver part is in Linus' tree already. The DT
part is
quoted
in the v4.18-armsoc/dts32 branch of Heiko's tree. Am I missing
anything?
quoted
You're right, most of the series made it in time for 4.17. However, the
DT
quoted
part (precisely, the clocks properties added to IOMMU nodes) is crucial
for
quoted
the fixes to be effective.
quoted
Anyway, I'll take a look.
Thanks for testing. :) (Forgot to mention in my previous email...)
I finally got around to testing. Unfortunately, kernel v4.17-rc6 with
cherry-pick of commit c78751f91c0b (ARM: dts: rockchip: add clocks in
iommu
nodes) from Heiko's tree still exhibit the same problem. STREAMON hangs on
second try. The same workaround "fixes" it.
Thanks for testing. I'm out of ideas, since the same code seems to work
fine for us in Chrome OS 4.4 kernel. Maybe we could have someone from RK
take a look.

Best regards,
Tomasz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help