All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben@simtec.co.uk>
To: Vincent Sanders <vince@simtec.co.uk>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>,
	akpm@linux-foundation.org, lethal@linux-sh.org,
	dilinger@debian.org, linux-kernel@vger.kernel.org,
	Simtec Linux Team <linux@simtec.co.uk>
Subject: Re: SM501: Implement acceleration features
Date: Wed, 11 Nov 2009 22:26:53 +0000	[thread overview]
Message-ID: <4AFB3A2D.3070908@simtec.co.uk> (raw)
In-Reply-To: <20091111214915.GA5182@kyllikki.org>

Vincent Sanders wrote:
> On Wed, Nov 11, 2009 at 12:58:25AM +0100, Krzysztof Helt wrote:
>> On Tue, 10 Nov 2009 17:18:10 +0000
>> Ben Dooks <ben@simtec.co.uk> wrote:
>>
>>> From: Vincent Sanders <vince@simtec.co.uk>
>>>
>>> This patch provides the acceleration entry points for the SM501
>>> framebuffer driver.
>>>
>>> This patch provides the sync, copyarea and fillrect entry points,
>>> using the SM501's 2D acceleration engine to perform the operations
>>> in-chip rather than across the bus.
>>>
>>> Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
>>> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
>>> Signed-off-by: Ben Dooks <ben@simtec.co.uk>
>>>
>>> ---
>>>  drivers/video/sm501fb.c    |  238 ++++++++++++++++++++++++++++++++++++++++++---
>>>  include/linux/sm501-regs.h |    2 
>>>  2 files changed, 226 insertions(+), 14 deletions(-)
>>>
>>> Index: b/drivers/video/sm501fb.c
>>> ===================================================================
>>> --- a/drivers/video/sm501fb.c	2009-11-03 11:19:44.000000000 +0000
>>> +++ b/drivers/video/sm501fb.c	2009-11-03 11:19:46.000000000 +0000
> 
> I have snipped all but small amount for context
> 
>>> +	/* wait for the 2d engine to be ready */
>>> +	while ((count > 0) &&
>>> +	       (readl(fbi->regs + SM501_SYSTEM_CONTROL) &
>>> +		SM501_SYSCTRL_2D_ENGINE_STATUS) != 0)
>>> +		count--;
>>> +
>> You may add cpu_relax() inside this loop.
>>
> 
> ok, would need to test this thoroughly as the SM501 has some...odd
> behaviours (see later on).
> 
>>> +
>>> +	if (sm501fb_sync(info))
>>> +		return;
>>> +
>> Please check if you need to wait for the blit engine before writting
>> to any register.  Usually, the values in the bit engine registers
>> are shadowed after the engine is started (ie. the blitting operation
>> is started) and the next set of values can be written into the regs.
> 
> indeed, if it were sane I would agree, it isnt in all circumstances, see later

It might be worth caching the data that relies on bpp after set_par
call, and thus avoiding another swtich on bpp in the acceleration
routines.

Otherwise not much else to say.

-- 
Ben Dooks, Software Engineer, Simtec Electronics

http://www.simtec.co.uk/

      reply	other threads:[~2009-11-11 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 17:18 SM501: Implement acceleration features Ben Dooks
2009-11-10 22:21 ` Ben Dooks
2009-11-10 23:58 ` Krzysztof Helt
2009-11-11 21:49   ` Vincent Sanders
2009-11-11 22:26     ` Ben Dooks [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=4AFB3A2D.3070908@simtec.co.uk \
    --to=ben@simtec.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=dilinger@debian.org \
    --cc=krzysztof.h1@wp.pl \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@simtec.co.uk \
    --cc=vince@simtec.co.uk \
    /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.