linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <syrjala@sci.fi>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: linux-fbdev-devel@lists.sourceforge.net, paulus@samba.org
Subject: Re: [PATCH] Disable mach64 accelerator if	stride is not multiple of 64
Date: Wed, 17 Jun 2009 20:21:49 +0300	[thread overview]
Message-ID: <20090617172149.GA9980@sci.fi> (raw)
In-Reply-To: <Pine.LNX.4.64.0906170600590.30231@hs20-bc2-1.build.redhat.com>

On Wed, Jun 17, 2009 at 06:02:30AM -0400, Mikulas Patocka wrote:
> On my card, the accelerator corrupts display if its line length is not
> multiple of 64 bytes.
> 
> Misaligned lines in the drawn recrangle are shifted left, as if the accelerator
> thought that every line begins on 64-byte boundary. For example, in 800x600x8
> (scanlines are aligned on 32 bytes) every odd scanline is drawn shifted by
> 32 bytes to the left.
> 
> The card is ATI Technologies Inc 3D Rage Pro 215GP (rev 5c) onboard on
> Sparc64 Ultra 5.

I think normally the offset should be just aligned to 8 bytes and pitch
to 8 bytes and 8 pixels.

I was under the impression that 64 byte aligned offset and pitch are only
required if block writes are used. But perhaps it is always required
with SGRAM/WRAM, or perhaps you have auto block writes enabled. Can you
check the memory type and the the value of the HW_DEBUG register?

> This patch disables accelerator if scanline is not multiple of 64 bytes.

A better option would be to round the pitch up in check_var(). Also it
would be more proper to use fix.line_length as the pitch value instead
of var.xres_virtual. That way check_var() could leave var.xres_virtual
alone and just round fix.line_length to whatever is required.

Actually now that I think about it I would prefer to round to 64 bytes
always when SGRAM/WRAM is found. The reason is that the mach64 DirectFB
driver always enables auto block writes on SGRAM boards and if atyfb
uses less alignment things will not work correctly. Perhaps atyfb should
enable auto block writes too.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects

  reply	other threads:[~2009-06-17 17:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 10:00 [PATCH] Fix colors in mach64 accelerator Mikulas Patocka
2009-06-17 10:02 ` [PATCH] Disable mach64 accelerator if stride is not multiple of 64 Mikulas Patocka
2009-06-17 17:21   ` Ville Syrjälä [this message]
2009-06-17 21:05     ` Mikulas Patocka
2009-06-20 21:25       ` Ville Syrjälä
2009-06-17 17:24 ` [PATCH] Fix colors in mach64 accelerator Ville Syrjälä
2009-06-17 21:40 ` Krzysztof Helt
  -- strict thread matches above, loose matches on Subject: below --
2009-06-18 10:17 [PATCH] Disable mach64 accelerator if stride is not multiple of 64 krzysztof.h1
2009-06-18 12:38 ` Mikulas Patocka

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=20090617172149.GA9980@sci.fi \
    --to=syrjala@sci.fi \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=mpatocka@redhat.com \
    --cc=paulus@samba.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).