From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: adaplas@gmail.com
Cc: Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Console rotation problems
Date: Thu, 24 Nov 2005 12:47:11 +1100 [thread overview]
Message-ID: <1132796831.26560.392.camel@gaston> (raw)
In-Reply-To: <1132793556.26560.361.camel@gaston>
On Thu, 2005-11-24 at 11:52 +1100, Benjamin Herrenschmidt wrote:
> On Thu, 2005-11-24 at 11:45 +1100, Benjamin Herrenschmidt wrote:
> > Hi Antonio !
> >
> > I decided to give a quick test to console rotation on my g5 (radeonfb)
> > and couldn't get it to work.
> >
> > When I tried echo'ing something in con_rotate, something very strange
> > happened:
> >
> > pogo:/sys/class/graphics/fb0# echo "1" >con_rotate
> > benh@pogo:~$
>
> .../...
>
> And here is the Oops that explains the shell exit and that I didn't see
> the first time :)
>
> Trap 0x600 is an alignment exception, which is a bit weird, I'll try to
> dig a bit more, it could be a problem with the alignment trap handler on
> ppc.
Ok, looks like an unaligned set_bit() or atomic_or(). You can't do
atomic operations on non-aligned quantities. Let me check the code ...
OUCH !
Is there any reason why you are using set_bit & friends all over the
place over there in fbcon_rotate.h ? Are you actually trying to perform
atomic operations ?
set_bit(), clear_bit() etc... are
1) atomic. that mean slow, won't work on uncached memory (like
framebuffer), and won't work if not aligned propertly
2) won't guarantee the bit position, they are consistent within an
architecture but not accross.
If you want bit manipulation of pixel data, use your own routines, using
set_bit/clear_bit & friends is completely bogus.
The __xxx versions will fix 1), but not 2) btw.
Ben.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: adaplas@gmail.com
Cc: Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Console rotation problems
Date: Thu, 24 Nov 2005 12:47:11 +1100 [thread overview]
Message-ID: <1132796831.26560.392.camel@gaston> (raw)
In-Reply-To: <1132793556.26560.361.camel@gaston>
On Thu, 2005-11-24 at 11:52 +1100, Benjamin Herrenschmidt wrote:
> On Thu, 2005-11-24 at 11:45 +1100, Benjamin Herrenschmidt wrote:
> > Hi Antonio !
> >
> > I decided to give a quick test to console rotation on my g5 (radeonfb)
> > and couldn't get it to work.
> >
> > When I tried echo'ing something in con_rotate, something very strange
> > happened:
> >
> > pogo:/sys/class/graphics/fb0# echo "1" >con_rotate
> > benh@pogo:~$
>
> .../...
>
> And here is the Oops that explains the shell exit and that I didn't see
> the first time :)
>
> Trap 0x600 is an alignment exception, which is a bit weird, I'll try to
> dig a bit more, it could be a problem with the alignment trap handler on
> ppc.
Ok, looks like an unaligned set_bit() or atomic_or(). You can't do
atomic operations on non-aligned quantities. Let me check the code ...
OUCH !
Is there any reason why you are using set_bit & friends all over the
place over there in fbcon_rotate.h ? Are you actually trying to perform
atomic operations ?
set_bit(), clear_bit() etc... are
1) atomic. that mean slow, won't work on uncached memory (like
framebuffer), and won't work if not aligned propertly
2) won't guarantee the bit position, they are consistent within an
architecture but not accross.
If you want bit manipulation of pixel data, use your own routines, using
set_bit/clear_bit & friends is completely bogus.
The __xxx versions will fix 1), but not 2) btw.
Ben.
next prev parent reply other threads:[~2005-11-24 1:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-24 0:45 Console rotation problems Benjamin Herrenschmidt
2005-11-24 0:52 ` Benjamin Herrenschmidt
2005-11-24 1:47 ` Benjamin Herrenschmidt [this message]
2005-11-24 1:47 ` Benjamin Herrenschmidt
2005-11-24 3:05 ` Benjamin Herrenschmidt
2005-11-24 6:29 ` Antonino A. Daplas
2005-11-24 9:43 ` [Linux-fbdev-devel] " Geert Uytterhoeven
2005-11-24 10:13 ` Antonino A. Daplas
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=1132796831.26560.392.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=adaplas@gmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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 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.