* [PATCH] [media] exynos-gsc: fix s2r functionality
@ 2013-08-07 12:53 Arun Kumar K
2013-08-07 16:53 ` Sylwester Nawrocki
0 siblings, 1 reply; 3+ messages in thread
From: Arun Kumar K @ 2013-08-07 12:53 UTC (permalink / raw)
To: linux-media, linux-samsung-soc
Cc: s.nawrocki, prathyush.k, arun.m, arunkk.samsung
From: Prathyush K <prathyush.k@samsung.com>
When gsc is in runtime suspended state, there is no need to call
m2m_suspend during suspend and similarily, there is no need to call
m2m_resume during resume if already in runtime suspended state. This
patch adds the necessary conditions to achieve this.
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
---
drivers/media/platform/exynos-gsc/gsc-core.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 559fab2..fe69eae 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -1210,12 +1210,12 @@ static int gsc_resume(struct device *dev)
spin_unlock_irqrestore(&gsc->slock, flags);
return 0;
}
- gsc_hw_set_sw_reset(gsc);
- gsc_wait_reset(gsc);
-
spin_unlock_irqrestore(&gsc->slock, flags);
- return gsc_m2m_resume(gsc);
+ if (!pm_runtime_suspended(dev))
+ return gsc_runtime_resume(dev);
+
+ return 0;
}
static int gsc_suspend(struct device *dev)
@@ -1227,7 +1227,10 @@ static int gsc_suspend(struct device *dev)
if (test_and_set_bit(ST_SUSPEND, &gsc->state))
return 0;
- return gsc_m2m_suspend(gsc);
+ if (!pm_runtime_suspended(dev))
+ return gsc_runtime_suspend(dev);
+
+ return 0;
}
static const struct dev_pm_ops gsc_pm_ops = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] exynos-gsc: fix s2r functionality
2013-08-07 12:53 [PATCH] [media] exynos-gsc: fix s2r functionality Arun Kumar K
@ 2013-08-07 16:53 ` Sylwester Nawrocki
2013-08-08 2:14 ` Arun Kumar K
0 siblings, 1 reply; 3+ messages in thread
From: Sylwester Nawrocki @ 2013-08-07 16:53 UTC (permalink / raw)
To: Arun Kumar K
Cc: linux-media, linux-samsung-soc, s.nawrocki, prathyush.k, arun.m,
arunkk.samsung
On 08/07/2013 02:53 PM, Arun Kumar K wrote:
> From: Prathyush K <prathyush.k@samsung.com>
>
> When gsc is in runtime suspended state, there is no need to call
> m2m_suspend during suspend and similarily, there is no need to call
s/similarily/similarly. I'll fix that typo when applying.
> m2m_resume during resume if already in runtime suspended state. This
> patch adds the necessary conditions to achieve this.
>
> Signed-off-by: Prathyush K <prathyush.k@samsung.com>
> Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
> Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Thanks, that looks good. I'll queue it for 3.12. We actually have
similar patch for the exynos4-is fimc-is-i2c driver.
However this is sort of things that IMO should ideally be handled
in the PM core.
--
Sylwester Nawrocki
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] exynos-gsc: fix s2r functionality
2013-08-07 16:53 ` Sylwester Nawrocki
@ 2013-08-08 2:14 ` Arun Kumar K
0 siblings, 0 replies; 3+ messages in thread
From: Arun Kumar K @ 2013-08-08 2:14 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: LMML, linux-samsung-soc, prathyush.k, arun.m
Hi Sylwester,
On Wed, Aug 7, 2013 at 10:23 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 08/07/2013 02:53 PM, Arun Kumar K wrote:
>> From: Prathyush K <prathyush.k@samsung.com>
>>
>> When gsc is in runtime suspended state, there is no need to call
>> m2m_suspend during suspend and similarily, there is no need to call
>
> s/similarily/similarly. I'll fix that typo when applying.
>
Thanks.
>> m2m_resume during resume if already in runtime suspended state. This
>> patch adds the necessary conditions to achieve this.
>>
>> Signed-off-by: Prathyush K <prathyush.k@samsung.com>
>> Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
>> Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
>
> Thanks, that looks good. I'll queue it for 3.12. We actually have
> similar patch for the exynos4-is fimc-is-i2c driver.
>
> However this is sort of things that IMO should ideally be handled
> in the PM core.
>
Yes indeed.
Regards
Arun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-08 2:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07 12:53 [PATCH] [media] exynos-gsc: fix s2r functionality Arun Kumar K
2013-08-07 16:53 ` Sylwester Nawrocki
2013-08-08 2:14 ` Arun Kumar K
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.