From: Tomasz Figa <t.figa@samsung.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: dri-devel@lists.freedesktop.org,
Viresh Kumar <viresh.kumar@linaro.org>,
Tomasz Figa <tomasz.figa@gmail.com>,
linux-samsung-soc@vger.kernel.org,
"patches@linaro.org" <patches@linaro.org>,
Kukjin Kim <kgene.kim@samsung.com>,
Vikas Sajjan <vikas.sajjan@linaro.org>,
linaro-kernel@lists.linaro.org,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
mturquette@linaro.org
Subject: Re: [PATCH v4] drm/exynos: prepare FIMD clocks
Date: Mon, 22 Apr 2013 14:30:10 +0200 [thread overview]
Message-ID: <1939043.4I27nO6WDE@amdc1227> (raw)
In-Reply-To: <51750B7D.3050401@samsung.com>
On Monday 22 of April 2013 12:05:49 Sylwester Nawrocki wrote:
> On 04/22/2013 11:56 AM, Tomasz Figa wrote:
> > On Monday 22 of April 2013 10:44:00 Viresh Kumar wrote:
> >> On 21 April 2013 20:13, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> >>> 3) after those two changes, all that remains is to fix compliance with
> >>> Common Clock Framework, in other words:
> >>>
> >>> s/clk_enable/clk_prepare_enable/
> >>>
> >>> and
> >>>
> >>> s/clk_disable/clk_disable_unprepare/
> >>
> >> We don't have to call clk_{un}prepare() everytime for your platform as
> >> you aren't doing anything in it. So just call them once at probe/remove
> >> and
> >> call clk_enable/disable everywhere else.
>
> Yes, I agree with that. Additionally clk_(un)prepare must not be called in
> atomic context, so some drivers will have to work like this anyway.
> Or the clocks could be prepared/unprepared in the device open/close file op
> for instance.
Well, I don't think drivers should make any assumptions how particular clk ops
are implemented on particular platform.
Instead, generic semantics of Common Clock Framework should be obeyed, which
AFAIK are:
1) Each clock must be prepared before enabling.
2) clk_prepare() can not be called from atomic contexts.
3) clk_prepare_enable() can be used instead of clk_prepare() + clk_enable()
when the driver does not need to enable the clock from atomic context.
Since the Exynos DRM FIMD driver does not need to do call any clock operations
in atomic contexts, the approach keeping the clock handling as simple as
possible would be to just replace all clk_{enable,disable} with
clk_{prepare_enable,disable_unprepare}, as I suggested.
CCing Mike, the maintainer of Common Clock Framework, since he's the right
person to pass any judgements when it is about clocks.
Best regards,
--
Tomasz Figa
Samsung Poland R&D Center
SW Solution Development, Kernel and System Framework
next prev parent reply other threads:[~2013-04-22 12:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 11:07 [PATCH v4] drm/exynos: prepare FIMD clocks Vikas Sajjan
2013-04-08 11:11 ` Viresh Kumar
2013-04-19 8:55 ` Vikas Sajjan
2013-04-20 15:26 ` Inki Dae
2013-04-21 7:24 ` Vikas Sajjan
2013-04-21 7:53 ` Viresh Kumar
2013-04-21 10:35 ` Tomasz Figa
2013-04-21 14:05 ` Inki Dae
2013-04-21 14:15 ` Tomasz Figa
2013-04-21 10:26 ` Tomasz Figa
2013-04-21 13:36 ` Inki Dae
2013-04-21 14:43 ` Tomasz Figa
2013-04-22 5:11 ` Inki Dae
2013-04-22 9:52 ` Tomasz Figa
2013-04-22 10:03 ` Inki Dae
2013-04-22 10:17 ` Sylwester Nawrocki
2013-04-22 10:20 ` Inki Dae
2013-04-22 10:37 ` Tomasz Figa
2013-04-22 11:42 ` Rafael J. Wysocki
2013-04-22 12:04 ` Inki Dae
2013-04-23 11:51 ` myungjoo.ham
2013-04-23 12:09 ` Inki Dae
2013-04-22 11:52 ` Inki Dae
2013-04-22 5:14 ` Viresh Kumar
2013-04-22 9:56 ` Tomasz Figa
2013-04-22 10:05 ` Sylwester Nawrocki
2013-04-22 12:30 ` Tomasz Figa [this message]
2013-04-22 10:26 ` Viresh Kumar
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=1939043.4I27nO6WDE@amdc1227 \
--to=t.figa@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kgene.kim@samsung.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=patches@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=tomasz.figa@gmail.com \
--cc=vikas.sajjan@linaro.org \
--cc=viresh.kumar@linaro.org \
/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 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.