* PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
@ 2004-10-29 0:27 ` Mark Fortescue
0 siblings, 0 replies; 11+ messages in thread
From: Mark Fortescue @ 2004-10-29 0:27 UTC (permalink / raw)
To: davem, ecd, jj, anton, wli; +Cc: linux-kernel, sparclinux, ultralinux, trivial
Hi All,
This patch fixes an error in the blanking code for the GCThree SBUS
video card. Now I get a logo and black screen, not just a blank (no
video) screen. It is a trivual fix that has taken too long to identify as
it is such a small typing error during the rewriting of the code for
the new frame buffer system introduced in the 2.5 series kernels.
Given that it still exists in the 2.6.8.1 kernel, I assume that not many
people have tried using the latest kernel on systems with a CGThree.
Regards
Mark Fortescue.
------------------------------------------------------------------------
#######################################################################
#
# Mark Fortescue <mark@mtfhpc.demon.co.uk>
#
# Patch to fix the blanking on the CG3 (SBUS) video card.
# The file (formally cgthreefb.c, now cg3.c) has a typing error that
# messes up the card initialisation when blanking is enabled/disabled.
# Given that the blanking functions are called in the initialisation
# routine, this makes the card un-usable. This patch fixes the error
# and needs to be applied to all kernels from 2.5.64 to 2.8.6.1 and
# possibly later if the CG3 is to be used sucessfully.
#
#######################################################################
diff -rupd ref-2.6.8.1/drivers/video/cg3.c linux-2.6.8.1/drivers/video/cg3.c
--- ref-2.6.8.1/drivers/video/cg3.c Sat Aug 14 11:55:35 2004
+++ linux-2.6.8.1/drivers/video/cg3.c Fri Oct 29 01:03:03 2004
@@ -198,9 +204,9 @@ cg3_blank(int blank, struct fb_info *inf
switch (blank) {
case 0: /* Unblanking */
- val = sbus_readl(®s->control);
+ val = sbus_readb(®s->control);
val |= CG3_CR_ENABLE_VIDEO;
- sbus_writel(val, ®s->control);
+ sbus_writeb(val, ®s->control);
par->flags &= ~CG3_FLAG_BLANKED;
break;
@@ -208,11 +214,16 @@ cg3_blank(int blank, struct fb_info *inf
case 2: /* VESA blank (vsync off) */
case 3: /* VESA blank (hsync off) */
case 4: /* Poweroff */
- val = sbus_readl(®s->control);
- val |= CG3_CR_ENABLE_VIDEO;
- sbus_writel(val, ®s->control);
+ val = sbus_readb(®s->control);
+ val &= ~CG3_CR_ENABLE_VIDEO;
+ sbus_writeb(val, ®s->control);
par->flags |= CG3_FLAG_BLANKED;
break;
+
+ default:
+ printk ("Invalid Blanking mode (%d), unblanking\n", blank);
+ spin_unlock_irqrestore(&par->lock, flags);
+ return 1;
}
spin_unlock_irqrestore(&par->lock, flags);
--------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
@ 2004-10-29 0:27 ` Mark Fortescue
0 siblings, 0 replies; 11+ messages in thread
From: Mark Fortescue @ 2004-10-29 0:27 UTC (permalink / raw)
To: davem, ecd, jj, anton, wli; +Cc: linux-kernel, sparclinux, ultralinux, trivial
Hi All,
This patch fixes an error in the blanking code for the GCThree SBUS
video card. Now I get a logo and black screen, not just a blank (no
video) screen. It is a trivual fix that has taken too long to identify as
it is such a small typing error during the rewriting of the code for
the new frame buffer system introduced in the 2.5 series kernels.
Given that it still exists in the 2.6.8.1 kernel, I assume that not many
people have tried using the latest kernel on systems with a CGThree.
Regards
Mark Fortescue.
------------------------------------------------------------------------
#######################################################################
#
# Mark Fortescue <mark@mtfhpc.demon.co.uk>
#
# Patch to fix the blanking on the CG3 (SBUS) video card.
# The file (formally cgthreefb.c, now cg3.c) has a typing error that
# messes up the card initialisation when blanking is enabled/disabled.
# Given that the blanking functions are called in the initialisation
# routine, this makes the card un-usable. This patch fixes the error
# and needs to be applied to all kernels from 2.5.64 to 2.8.6.1 and
# possibly later if the CG3 is to be used sucessfully.
#
#######################################################################
diff -rupd ref-2.6.8.1/drivers/video/cg3.c linux-2.6.8.1/drivers/video/cg3.c
--- ref-2.6.8.1/drivers/video/cg3.c Sat Aug 14 11:55:35 2004
+++ linux-2.6.8.1/drivers/video/cg3.c Fri Oct 29 01:03:03 2004
@@ -198,9 +204,9 @@ cg3_blank(int blank, struct fb_info *inf
switch (blank) {
case 0: /* Unblanking */
- val = sbus_readl(®s->control);
+ val = sbus_readb(®s->control);
val |= CG3_CR_ENABLE_VIDEO;
- sbus_writel(val, ®s->control);
+ sbus_writeb(val, ®s->control);
par->flags &= ~CG3_FLAG_BLANKED;
break;
@@ -208,11 +214,16 @@ cg3_blank(int blank, struct fb_info *inf
case 2: /* VESA blank (vsync off) */
case 3: /* VESA blank (hsync off) */
case 4: /* Poweroff */
- val = sbus_readl(®s->control);
- val |= CG3_CR_ENABLE_VIDEO;
- sbus_writel(val, ®s->control);
+ val = sbus_readb(®s->control);
+ val &= ~CG3_CR_ENABLE_VIDEO;
+ sbus_writeb(val, ®s->control);
par->flags |= CG3_FLAG_BLANKED;
break;
+
+ default:
+ printk ("Invalid Blanking mode (%d), unblanking\n", blank);
+ spin_unlock_irqrestore(&par->lock, flags);
+ return 1;
}
spin_unlock_irqrestore(&par->lock, flags);
--------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
2004-10-29 0:27 ` Mark Fortescue
@ 2004-10-29 0:34 ` William Lee Irwin III
-1 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2004-10-29 0:34 UTC (permalink / raw)
To: Mark Fortescue
Cc: davem, ecd, jj, anton, linux-kernel, sparclinux, ultralinux,
trivial
On Fri, Oct 29, 2004 at 01:27:51AM +0100, Mark Fortescue wrote:
> This patch fixes an error in the blanking code for the GCThree SBUS
> video card. Now I get a logo and black screen, not just a blank (no
> video) screen. It is a trivual fix that has taken too long to identify as
> it is such a small typing error during the rewriting of the code for
> the new frame buffer system introduced in the 2.5 series kernels.
> Given that it still exists in the 2.6.8.1 kernel, I assume that not many
> people have tried using the latest kernel on systems with a CGThree.
Yes, all my systems are headless unfortunately.
-- wli
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
@ 2004-10-29 0:34 ` William Lee Irwin III
0 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2004-10-29 0:34 UTC (permalink / raw)
To: Mark Fortescue
Cc: davem, ecd, jj, anton, linux-kernel, sparclinux, ultralinux,
trivial
On Fri, Oct 29, 2004 at 01:27:51AM +0100, Mark Fortescue wrote:
> This patch fixes an error in the blanking code for the GCThree SBUS
> video card. Now I get a logo and black screen, not just a blank (no
> video) screen. It is a trivual fix that has taken too long to identify as
> it is such a small typing error during the rewriting of the code for
> the new frame buffer system introduced in the 2.5 series kernels.
> Given that it still exists in the 2.6.8.1 kernel, I assume that not many
> people have tried using the latest kernel on systems with a CGThree.
Yes, all my systems are headless unfortunately.
-- wli
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
2004-10-29 0:34 ` William Lee Irwin III
@ 2004-10-29 3:51 ` Lee Revell
-1 siblings, 0 replies; 11+ messages in thread
From: Lee Revell @ 2004-10-29 3:51 UTC (permalink / raw)
To: William Lee Irwin III
Cc: Mark Fortescue, davem, ecd, jj, anton, linux-kernel, sparclinux,
ultralinux, trivial
On Thu, 2004-10-28 at 17:34 -0700, William Lee Irwin III wrote:
> Yes, all my systems are headless unfortunately.
*All* of them? I am impressed...
Lee
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
@ 2004-10-29 3:51 ` Lee Revell
0 siblings, 0 replies; 11+ messages in thread
From: Lee Revell @ 2004-10-29 3:51 UTC (permalink / raw)
To: William Lee Irwin III
Cc: Mark Fortescue, davem, ecd, jj, anton, linux-kernel, sparclinux,
ultralinux, trivial
On Thu, 2004-10-28 at 17:34 -0700, William Lee Irwin III wrote:
> Yes, all my systems are headless unfortunately.
*All* of them? I am impressed...
Lee
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
2004-10-29 3:51 ` Lee Revell
@ 2004-10-29 3:55 ` William Lee Irwin III
-1 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2004-10-29 3:55 UTC (permalink / raw)
To: Lee Revell
Cc: Mark Fortescue, davem, ecd, jj, anton, linux-kernel, sparclinux,
ultralinux, trivial
On Thu, 2004-10-28 at 17:34 -0700, William Lee Irwin III wrote:
>> Yes, all my systems are headless unfortunately.
On Thu, Oct 28, 2004 at 11:51:32PM -0400, Lee Revell wrote:
> *All* of them? I am impressed...
All of the UltraSPARC and SPARC systems, yes.
-- wli
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
@ 2004-10-29 3:55 ` William Lee Irwin III
0 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2004-10-29 3:55 UTC (permalink / raw)
To: Lee Revell
Cc: Mark Fortescue, davem, ecd, jj, anton, linux-kernel, sparclinux,
ultralinux, trivial
On Thu, 2004-10-28 at 17:34 -0700, William Lee Irwin III wrote:
>> Yes, all my systems are headless unfortunately.
On Thu, Oct 28, 2004 at 11:51:32PM -0400, Lee Revell wrote:
> *All* of them? I am impressed...
All of the UltraSPARC and SPARC systems, yes.
-- wli
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
@ 2005-02-16 14:15 Meelis Roos
2005-02-16 16:13 ` David S. Miller
2005-02-16 16:27 ` Mark Fortescue
0 siblings, 2 replies; 11+ messages in thread
From: Meelis Roos @ 2005-02-16 14:15 UTC (permalink / raw)
To: sparclinux
MF> This patch fixes an error in the blanking code for the GCThree SBUS
MF> video card. Now I get a logo and black screen, not just a blank (no
MF> video) screen. It is a trivual fix that has taken too long to identify as
MF> it is such a small typing error during the rewriting of the code for
MF> the new frame buffer system introduced in the 2.5 series kernels.
The "val &= ~CG3_CR_ENABLE_VIDEO;" bit is in main kernel now. But what
about the readl/writel vs readb/writeb - is this also needed? Why?
--
Meelis Roos
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
2005-02-16 14:15 Meelis Roos
@ 2005-02-16 16:13 ` David S. Miller
2005-02-16 16:27 ` Mark Fortescue
1 sibling, 0 replies; 11+ messages in thread
From: David S. Miller @ 2005-02-16 16:13 UTC (permalink / raw)
To: sparclinux
On Wed, 16 Feb 2005 16:15:47 +0200
Meelis Roos <mroos@linux.ee> wrote:
> MF> This patch fixes an error in the blanking code for the GCThree SBUS
> MF> video card. Now I get a logo and black screen, not just a blank (no
> MF> video) screen. It is a trivual fix that has taken too long to identify as
> MF> it is such a small typing error during the rewriting of the code for
> MF> the new frame buffer system introduced in the 2.5 series kernels.
>
> The "val &= ~CG3_CR_ENABLE_VIDEO;" bit is in main kernel now. But what
> about the readl/writel vs readb/writeb - is this also needed? Why?
The main kernel uses byte read/write operations in the cg3 driver.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH to fix initialisation issue for GC3 (linux-2.5.64 +).
2005-02-16 14:15 Meelis Roos
2005-02-16 16:13 ` David S. Miller
@ 2005-02-16 16:27 ` Mark Fortescue
1 sibling, 0 replies; 11+ messages in thread
From: Mark Fortescue @ 2005-02-16 16:27 UTC (permalink / raw)
To: sparclinux
Hi Mellis,
The register masks are set up for an 8bit byte operation. If you use a
32bit read/write (readl/writel) you get very different results on a big
endian system (SPARC) when you apply a byte mask. This is why you need to
use 8bit (readb/writeb) operations.
In addition, using 8bit read/write will prevent corruption of any of the
next three registers if they have different read/write information.
Regards
Mark Fortescue.
On Wed, 16 Feb 2005, Meelis Roos wrote:
> MF> This patch fixes an error in the blanking code for the GCThree SBUS
> MF> video card. Now I get a logo and black screen, not just a blank (no
> MF> video) screen. It is a trivual fix that has taken too long to identify as
> MF> it is such a small typing error during the rewriting of the code for
> MF> the new frame buffer system introduced in the 2.5 series kernels.
>
> The "val &= ~CG3_CR_ENABLE_VIDEO;" bit is in main kernel now. But what
> about the readl/writel vs readb/writeb - is this also needed? Why?
>
> --
> Meelis Roos
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-02-16 16:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-29 0:27 PATCH to fix initialisation issue for GC3 (linux-2.5.64 +) Mark Fortescue
2004-10-29 0:27 ` Mark Fortescue
2004-10-29 0:34 ` William Lee Irwin III
2004-10-29 0:34 ` William Lee Irwin III
2004-10-29 3:51 ` Lee Revell
2004-10-29 3:51 ` Lee Revell
2004-10-29 3:55 ` William Lee Irwin III
2004-10-29 3:55 ` William Lee Irwin III
-- strict thread matches above, loose matches on Subject: below --
2005-02-16 14:15 Meelis Roos
2005-02-16 16:13 ` David S. Miller
2005-02-16 16:27 ` Mark Fortescue
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.