linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Archit Taneja <archit@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Neuhaus <florian.neuhaus@reberinformatik.ch>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: AW: omapdss/omap3isp/omapfb: Picture from omap3isp can't recover after a blank/unblank (or overlay disables after resuming)
Date: Thu, 14 Feb 2013 17:39:47 +0530	[thread overview]
Message-ID: <511CD40B.5030208@ti.com> (raw)
In-Reply-To: <511CB792.1020608@ti.com>

On Thursday 14 February 2013 03:38 PM, Tomi Valkeinen wrote:
> On 2013-02-14 11:30, Florian Neuhaus wrote:
>> Hi Tomi,
>>
>> Tomi Valkeinen wrote on 2013-02-07:
>>
>>> FIFO underflow means that the DSS hardware wasn't able to fetch enough
>>> pixel data in time to output them to the panel. Sometimes this happens
>>> because of plain misconfiguration, but usually it happens because of
>>> the hardware just can't do things fast enough with the configuration
>>> the user has set.
>>>
>>> In this case I see that you are using VRFB rotation on fb0, and the
>>> rotation is
>>> 270 degrees. Rotating the fb is heavy, especially 90 and 270 degrees.
>>> It may be that when the DSS is resumed, there's a peak in the mem
>>> usage as DSS suddenly needs to fetch lots of data.
>>>
>>> Another issue that could be involved is power management. After the
>>> DSS is suspended, parts of OMAP may be put to sleep. When the DSS is
>>> resumed, these parts need to be woken up, and it may be that there's a
>>> higher mem latency for a short period of time right after resume.
>>> Which could again cause DSS not getting enough pixel data.
>>>
>>> You say the issue doesn't happen if you disable fb0. What happens if
>>> you disable fb0, blank the screen, then unblank the screen, and after
>>> that enable fb0 again?
>>
>> By "disable fb0" do you mean disconnect fb0 from ovl0 or disable ovl0?
>> I have done both:
>> http://pastebin.com/Bxm1Z2RY
>>
>> This works as expected.
>
> I think both disconnecting fb0 and ovl0, and disabling ovl0 end up doing
> the same, which is disabling ovl0. Which is what I meant.
>
> So, if I understand correctly, this only happens at unblank, and can be
> circumvented by temporarily keeping ovl0 disabled during the unblank,
> and enabling ovl0 afterwards works fine.
>
> So for some reason the time of unblank is "extra heavy" for the memory bus.
>
> Archit, I have a feeling that enabling the LCD is heavier on the memory
> bus than what happens at VBLANK, even if both start fetching the pixels
> for a fresh frame. You've been twiddling with the FIFO stuff, am I right
> there?

I don't think it's heavier in terms of memory bandwidth when you enable 
the LCD compared to the fetch of new frame content on a VBLANK. In both 
cases, the DSS tries to preload a few set of lines.

In terms of responsiveness from the interconnect, it's possible that DSS 
has a lower priority(in the round robin queue of initiators) compared to 
when it was active.

I don't know if LCD enable vs VBLANK has some sort of difference with VRFB.

>
>> Further tests I have done:
>>
>> Enable fb1/ovl1 and hit some keys on the keyboard to let fb0/ovl0 update in the
>> background causes a fifo underflow too:
>> http://pastebin.com/f3JnMLsV
>>
>> This happens only, if I enable the vrfb (rotate=3). So the whole thing
>> seems to be a rotation issue. Do you have some hints to trace down
>> the problem?
>
> Not rotation issue as such, but memory bandwidth issue.
>
>>> How about if you disable VRFB rotation, either totally, or set the
>>> rotation to 0 or 180 degrees?
>>
>> Disable rotation is not an option for me, as we have a "wrong" oriented
>> portrait display with 480x800 which we must use in landscape mode...
>
> I understand, I only meant that for testing purposes. VRFB rotation with
> 0 and 180 cause a slight impact on the mem bus, whereas 90 and 270
> rotation cause a large impact. Also, as I mentioned earlier, the PM may
> also affect this, as things may have been shut down in the OMAP. So
> disabling PM related features could also "fix" the problem.
>
> In many cases underflows are rather hard to debug and solve. There are
> things in the DSS hardware like FIFO thresholds and prefetch, and VRFB
> tile sizes, which can be changed (although unfortunately only by
> modifying the drivers). How they should be changed if a difficult
> question, though, and whether it'll help is also a question mark.

One thing which might help to debug this is to comment out the underflow 
error handling, and see if it continues to happen, this will tell if it 
was just a temporary bandwidth issue, or it's some consistent PM related 
thing

Archit

      parent reply	other threads:[~2013-02-14 12:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6EE9CD707FBED24483D4CB0162E85467245822C8@AMSPRD0711MB532.eurprd07.prod.outlook.com>
     [not found] ` <2253226.r6AZgSrtcE@avalon>
2013-01-31 13:06   ` AW: omapdss/omap3isp/omapfb: Picture from omap3isp can't recover after a blank/unblank (or overlay disables after resuming) Florian Neuhaus
2013-02-01 22:14     ` Laurent Pinchart
     [not found] ` <51138BCA.4010701@ti.com>
2013-02-14  9:30   ` Florian Neuhaus
2013-02-14 10:08     ` Tomi Valkeinen
2013-02-14 11:07       ` Laurent Pinchart
2013-02-14 11:15         ` Tomi Valkeinen
2013-02-14 12:09       ` Archit Taneja [this message]

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=511CD40B.5030208@ti.com \
    --to=archit@ti.com \
    --cc=florian.neuhaus@reberinformatik.ch \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=tomi.valkeinen@ti.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).