linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] staging: drm/imx: add i.MX IPUv3 base driver
Date: Fri, 14 Sep 2012 11:38:31 +0200	[thread overview]
Message-ID: <20120914093831.GV6180@pengutronix.de> (raw)
In-Reply-To: <5052F8E2.6010106@de.bosch.com>

On Fri, Sep 14, 2012 at 11:29:06AM +0200, Dirk Behme wrote:
> On 12.09.2012 12:31, Sascha Hauer wrote:
> >+
> >+       timeout = jiffies + msecs_to_jiffies(1000);
> >+       while (ipu_cm_read(ipu, IPU_MEM_RST) & 0x80000000) {
> >+               if (time_after(jiffies, timeout))
> >+                       return -ETIME;
> >+               cpu_relax();
> >+       }
> >+
> >+       mdelay(300);
>           ^^^^^^^^^^^^
> 
> >+       return 0;
> >+}
> 
> While doing some boot time measurement with i.MX6, we found that the
> above mdelay(300) is hurting regarding boot time. On i.MX6 you have
> two IPU instances, so in the end you get 600ms additional delay.
> 
> Looking at the Freescale code, this function looks like
> 
> static int ipu_reset(struct ipu_soc *ipu)
> {
> int timeout = 1000;
> 
> ipu_cm_write(ipu, 0x807FFFFF, IPU_MEM_RST);
> 
> while (ipu_cm_read(ipu, IPU_MEM_RST) & 0x80000000) {
>  if (!timeout--)
>    return -ETIME;
>  msleep(1);
> }
> return 0;
> }
> 
> So there is a msleep() in the loop but no mdelay() outside. Any idea
> why the mdelay() is needed here? Or what could be done regarding
> boot time with this?

I remember we had issues on i.MX51 or 53 without it, but I would have to
recheck it.
In any way, I think this should be reworked. The reset takes quite a
long time and it's not nice to block the boot process for so long.
Some asynchronous reset would be nice here.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-09-14  9:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 10:31 [PATCH] Add i.MX IPUv3 base/KMS driver to the staging tree Sascha Hauer
2012-09-12 10:31 ` [PATCH 1/6] staging: drm/imx: Add i.MX drm core support Sascha Hauer
2012-09-12 16:49   ` Greg Kroah-Hartman
2012-09-13  6:56     ` Sascha Hauer
2012-09-12 10:31 ` [PATCH 2/6] staging: drm/imx: Add parallel display support Sascha Hauer
2012-09-12 10:31 ` [PATCH 3/6] staging: drm/imx: add i.MX IPUv3 base driver Sascha Hauer
2012-09-14  9:29   ` Dirk Behme
2012-09-14  9:38     ` Sascha Hauer [this message]
2012-09-12 10:31 ` [PATCH 4/6] staging: drm/imx: Add i.MX IPUv3 crtc support Sascha Hauer
2012-09-12 10:31 ` [PATCH 5/6] staging: drm/imx: Add devicetree binding documentation Sascha Hauer
2012-09-18 22:06   ` Eric Nelson
2012-09-19  6:52     ` Sascha Hauer
2012-09-19 13:43       ` Eric Nelson
2012-09-12 10:31 ` [PATCH 6/6] staging: drm/imx: Add TODO Sascha Hauer
2012-09-19  5:53   ` Shawn Guo
2012-09-19  7:18     ` Sascha Hauer
2012-09-19  8:05       ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2012-09-21  8:07 [PATCH] Add i.MX IPUv3 base/KMS driver to the staging tree Sascha Hauer
2012-09-21  8:07 ` [PATCH 3/6] staging: drm/imx: add i.MX IPUv3 base driver Sascha Hauer

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=20120914093831.GV6180@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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 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).