public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	Tony Lindgren <tony@atomide.com>, Archit Taneja <archit@ti.com>
Subject: Re: [PATCHv2 1/3] OMAP: VRFB: convert vrfb to platform device
Date: Wed, 10 Oct 2012 11:12:04 -0700	[thread overview]
Message-ID: <87wqyyxkln.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1349842027.5972.8.camel@lappyti> (Tomi Valkeinen's message of "Wed, 10 Oct 2012 07:07:07 +0300")

Tomi Valkeinen <tomi.valkeinen@ti.com> writes:

> On Tue, 2012-10-09 at 13:37 -0700, Kevin Hilman wrote:
>> Hi Tomi,
>> 
>> Tomi Valkeinen <tomi.valkeinen@ti.com> writes:
>> 
>> > This patch converts vrfb library into a platform device, in an effort to
>> > remove omap dependencies.
>> >
>> > The platform device is registered in arch/arm/plat-omap/fb.c and
>> > assigned resources depending on whether running on omap2 or omap3.
>> >
>> > The vrfb driver will parse those resources and use them to access vrfb
>> > configuration registers and the vrfb virtual rotation areas.
>> >
>> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> > Cc: Tony Lindgren <tony@atomide.com>
>> 
>> [...]
>> 
>> I was having a quick look at this for the context save/restore piece in
>> order to understand how this driver's context is being saved/restored.
>> 
>> Looking at mainline, I don't see where omap_vrfb_restore_context() is
>> being called currently.  Am I missing something?
>
> No, the driver is missing something. I noticed the same thing. It seems
> ctx restore for vrfb has never been functional in mainline. I don't
> really have any recollection if this was left out intentionally from
> mainline (possibly because we didn't have a good way to handle it at
> that point), or was it just a mistake.
>
> Nobody has complained about it, though, so it can't be a major problem
> =).

heh

> Vrfb is a platform device/driver after this patch. Do you see any
> problem with handling the context restore in runtime PM's runtime_resume
> callback? 

No, that's the right way to handle it IMO.  In fact, that's what I was
going to check on when reviewing this patch when I noticed that the
restore function wasn't being used.

> Hmm, I guess then we could have a problem if omapdss and
> omapfb are resumed before vrfb.

Possibly, but this could be handled by adding some sanity checks, or
having VRFB functions return -EAGAIN if it hasn't been resumed.  Or
better yet, VRFB functions should be using runtime PM get/put
themselves, if they're used by omapdss/omapfb, a runtime resume (and
context restore) is forced.  (disclaimer: I don't actually know how VRFB
works, so maybe this isn't possible.)

> Any way to manage the suspend/resume ordering of unrelated (i.e. no
> parent/child relation) devices?

No good way at the moment.

And to make things interesting: static suspend/resume ordering is not
dependent on parent/child.  It's based on driver discover/probe order.

runtime PM ordering manages parent/child relationships.

Kevin

  reply	other threads:[~2012-10-10 18:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 12:30 [PATCHv2 0/3] OMAP: VRFB: convert to platform device Tomi Valkeinen
2012-10-09 12:30 ` [PATCHv2 1/3] OMAP: VRFB: convert vrfb " Tomi Valkeinen
2012-10-09 20:37   ` Kevin Hilman
2012-10-10  4:07     ` Tomi Valkeinen
2012-10-10 18:12       ` Kevin Hilman [this message]
2012-10-09 12:30 ` [PATCHv2 2/3] OMAP: move arch/arm/plat-omap/include/plat/vrfb.h Tomi Valkeinen
2012-10-09 12:54   ` Hiremath, Vaibhav
2012-10-09 12:57     ` Tomi Valkeinen
2012-10-09 12:30 ` [PATCHv2 3/3] OMAP: SDRC: remove VRFB code Tomi Valkeinen

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=87wqyyxkln.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=archit@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.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