lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 11 Nov 2009 22:26:53 +0000
From:	Ben Dooks <ben@...tec.co.uk>
To:	Vincent Sanders <vince@...tec.co.uk>
CC:	Krzysztof Helt <krzysztof.h1@...pl>, akpm@...ux-foundation.org,
	lethal@...ux-sh.org, dilinger@...ian.org,
	linux-kernel@...r.kernel.org,
	Simtec Linux Team <linux@...tec.co.uk>
Subject: Re: SM501: Implement acceleration features

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@...tec.co.uk> wrote:
>>
>>> From: Vincent Sanders <vince@...tec.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@...tec.co.uk>
>>> Signed-off-by: Simtec Linux Team <linux@...tec.co.uk>
>>> Signed-off-by: Ben Dooks <ben@...tec.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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists