|
From: Mayuresh D. <ma...@ya...> - 2001-06-25 18:35:35
|
I have two questions:
1) i have a photocell connected on my screen which
tells me my refresh rate.
how can i send a signal from the parallel port maybe
that syncs with the vertical refresh signal. How do i
know that it is exactly syncing.
2) Suppose a have a switch. How do i flip frames (or
screens) using the fb device or in any other
appropiate way when i turn the switch on/off??
Thanks,
Mayuresh
**********************************************
Mayuresh Deorukhkar
Graduate Research Assistant
University Of Missouri - Columbia
**********************************************
On Wed, 6 Jun 2001, Deorukhkar, Mayuresh S.
(UMC-Student) wrote:
> Hi,
>
> we are working on real time linux and we want to
know when a screen
refresh
> occurs.
> How do we detect a vertical refresh strobe??
>
The right way to do it is via interrupt, however X is
completely in
userspace so you need to write a kernel driver to
catch this interrupt.
At least as far as ATI cards are concerned it is
fairly easy to intruct
them to make this interrupt. Just be careful of dri
interactions - the
very same interrupt is used for everything else too.
Vladimir Dergachev
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
|
|
From: James S. <jsi...@tr...> - 2001-11-13 23:04:18
|
Hi! As some of you know I have been working on a new console system for 2.5.X. Now that 2.5.X is very very close I really like to work together with various people from various trees to pull this together. The two biggest changes I have done is: 1) A new fbdev api with is much simpler and allows fbdev devices to exist without a console system. Nice for embedded devices. 2) We also will be moving the various input devices including keyboards over to the input api. 3) Also I plan to work on a new serial api based on Russell King's work to work nicely with the input layer. The serial layer will be more like the parallel port layer. So what I need is the latest drivers from people so they can be ported over. I also want to know what people needed for the fbdev layer as well as the input layer. I see some email about DDC support for example. Please let me know what you need. Thank you. |
|
From: Robert S. <ro...@sc...> - 2001-11-14 13:21:37
|
Hello James, On Tue, 13 Nov 2001, James Simmons wrote: > As some of you know I have been working on a new console system for > 2.5.X. This might be a good opportunity to throw in some remarks from the embedded front. I currently have the problem that I would like to attach a Displaytech 64128a LCD to an embedded machine running Linux. The problem with these displays is that they have their own controller which is accessable through an 8 bit parallel port and some control lines, so it does not have any memory mappable frame buffer. Nevertheless, it would be great to write a framebuffer driver for that beast, because then I could use all kinds of "normal" libraries ontop of that device, e.g. svgalib, Qt-Embedded, MicroWindows or whatsoever. I'm no expert in the current FB interface, but it looks to me that there is no mechanism for devices like that. I can imagine to write something like the virtual vfb driver, but there is still a mechanism missing that can be used to tell the driver that the frame is "dirty" and it has to be transferred by the driver into the display. Any ideas how this could be done, either with the existing interface or with possible improvements in the new API are welcome. Robert --=20 +--------------------------------------------------------+ | Dipl.-Ing. Robert Schwebel | | Pengutronix - Linux Solutions for Science and Industry | | Braunschweiger Stra=DFe 79, 31134 Hildesheim, Germany | | Phone: +49-5121-28619-0 Fax: +49-5121-28619-4 | +--------------------------------------------------------+ |
|
From: Geert U. <ge...@li...> - 2001-11-14 14:17:40
|
On Wed, 14 Nov 2001, Robert Schwebel wrote:
> On Tue, 13 Nov 2001, James Simmons wrote:
> > As some of you know I have been working on a new console system for
> > 2.5.X.
>
> This might be a good opportunity to throw in some remarks from the
> embedded front. I currently have the problem that I would like to attach a
> Displaytech 64128a LCD to an embedded machine running Linux. The problem
> with these displays is that they have their own controller which is
> accessable through an 8 bit parallel port and some control lines, so it
> does not have any memory mappable frame buffer.
>
> Nevertheless, it would be great to write a framebuffer driver for that
> beast, because then I could use all kinds of "normal" libraries ontop of
> that device, e.g. svgalib, Qt-Embedded, MicroWindows or whatsoever. I'm no
> expert in the current FB interface, but it looks to me that there is no
> mechanism for devices like that. I can imagine to write something like the
> virtual vfb driver, but there is still a mechanism missing that can be
> used to tell the driver that the frame is "dirty" and it has to be
> transferred by the driver into the display.
>
> Any ideas how this could be done, either with the existing interface or
> with possible improvements in the new API are welcome.
The method used in vga256fb (fake a frame buffer, use MMU tricks) can be used
here. Search the list archives for more info.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
|
|
From: Adam K K. <ad...@vo...> - 2002-08-06 17:37:06
|
Ani and others :-) =09I was hoping you could lend me some insight :-) I'm trying to do some work with DirectFB, and I'm now running into a slight problem concerning getting output on the VGA port. =09I've e-mailed the directfb-dev mailing list about it and had some interesting conversations, but the end result was basically: "You should check with Ani Joshi about that, and maybe ask on the linux-fbdev-devel mailing list". =09So now I'm asking here :-) Below this I'm including the description of the problem I'm seeing that I sent to the directfb-dev mailing list. =09Can anyone help me out? Thanks :-) Adam ---------- Forwarded message ---------- Date: Tue, 6 Aug 2002 12:51:24 -0400 (EDT) From: Adam K Kirchhoff <ad...@vo...> To: "[iso-8859-1] Ville Syrj=E4l=E4" <sy...@sc...> Cc: directfb-devel <dir...@di...> Subject: Re: [directfb-dev] Re: Radeon support... > I'm getting really confused as to what's going on... What exactly happens > when you run a DirectFB application? It took me a while to figure it out what I know so far, and I'm still not 100% sure what's going on... If I run *any* DirectFB application, the screen blanks. The system doesn't lock. I can ssh in and see the application listed in the process table. For example, running df_fire, the screen blanks and, after a few seconds, the monitor goes to sleep (as if it's no longer getting a signal)... Hitting the 'esc' key brings back the vt, just as usual when runnin the application. Running dfbsee produces similar results. However, with any video that I play, I can hear the audio stream :-) I just can't see anything... Now, when I first experienced this, I posted about it on either directfb-dev or directfb-user. A short while later, I figured out a workaround :-) Instead of booting with my CRT plugged into the VGA port, I used a DVI-to-VGA adapter (that came with my Radeon 7500), and plugged the monitor into the DVI-A port. Lo' and behold, DirectFB applications were now showing up :-) Since then I've done some video card swapping and now have a "Powered By ATI" Radeon 8500 LE. This card has both a VGA port and a DVI-D port, but no adapter. The old adapter doesn't work for this card because it's designed for DVI-A as compared to DVI-D. I've encountered similar problems elsewhere, too. For example, a hacked radeon 7500 driver for BeOS would only display on the DVI port, even if the computer booted up fine with a monitor on the VGA port. Of course, I just don't know why this is the case :-) I've been poking around on-line looking for a DVI-D to VGA adapter, but very few of the shops that sell them on-line clarify if it's DVI-A or DVI-D :-) Adam |
|
From: Adam K K. <ad...@vo...> - 2002-08-08 01:19:29
|
Me again, =09So I think I might have a better idea of what's going on... I did some testing with the Radeon framebuffer tonight, and can only seem to get it to work with just two modes: 1024x768@70 and 640x480@60. I've tried a number of others, which worked with the DVI output of my 7500, but don't seem to work with the VGA port of the card. =09Any ideas? Adam On Tue, 6 Aug 2002, Adam K Kirchhoff wrote: > > Ani and others :-) > > =09I was hoping you could lend me some insight :-) I'm trying to do > some work with DirectFB, and I'm now running into a slight problem > concerning getting output on the VGA port. > > =09I've e-mailed the directfb-dev mailing list about it and had some > interesting conversations, but the end result was basically: "You should > check with Ani Joshi about that, and maybe ask on the linux-fbdev-devel > mailing list". > > =09So now I'm asking here :-) Below this I'm including the > description of the problem I'm seeing that I sent to the directfb-dev > mailing list. > > =09Can anyone help me out? Thanks :-) > > Adam > > ---------- Forwarded message ---------- > Date: Tue, 6 Aug 2002 12:51:24 -0400 (EDT) > From: Adam K Kirchhoff <ad...@vo...> > To: "[iso-8859-1] Ville Syrj=E4l=E4" <sy...@sc...> > Cc: directfb-devel <dir...@di...> > Subject: Re: [directfb-dev] Re: Radeon support... > > > > I'm getting really confused as to what's going on... What exactly happe= ns > > when you run a DirectFB application? > > It took me a while to figure it out what I know so far, and I'm still not > 100% sure what's going on... > > If I run *any* DirectFB application, the screen blanks. The system > doesn't lock. I can ssh in and see the application listed in the process > table. For example, running df_fire, the screen blanks and, after a few > seconds, the monitor goes to sleep (as if it's no longer getting a > signal)... Hitting the 'esc' key brings back the vt, just as usual when > runnin the application. > > Running dfbsee produces similar results. However, with any video that I > play, I can hear the audio stream :-) I just can't see anything... > > Now, when I first experienced this, I posted about it on either > directfb-dev or directfb-user. A short while later, I figured out a > workaround :-) > > Instead of booting with my CRT plugged into the VGA port, I used a > DVI-to-VGA adapter (that came with my Radeon 7500), and plugged the > monitor into the DVI-A port. Lo' and behold, DirectFB applications were > now showing up :-) > > Since then I've done some video card swapping and now have a "Powered By > ATI" Radeon 8500 LE. This card has both a VGA port and a DVI-D port, but > no adapter. The old adapter doesn't work for this card because it's > designed for DVI-A as compared to DVI-D. > > I've encountered similar problems elsewhere, too. For example, a hacked > radeon 7500 driver for BeOS would only display on the DVI port, even if > the computer booted up fine with a monitor on the VGA port. > > Of course, I just don't know why this is the case :-) > > I've been poking around on-line looking for a DVI-D to VGA adapter, but > very few of the shops that sell them on-line clarify if it's DVI-A or > DVI-D :-) > > Adam > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Linux-fbdev-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel > > |
|
From: Adam K K. <ad...@vo...> - 2002-08-08 13:02:04
|
Alright, so I did some more testing this morning... I tried the exact same modes, with the exact same monitor, first hooked up to the VGA port and then hooked up to the DVI port of my Radeon 7500... All but two of the modes were taken from the fb.modes file supplied by the DirectFB project. *None* of the following modes (all at 16 bit) worked with the VGA port: 640x480 75Hz 800x600 75Hz 1024x768 72Hz 1280x1024 60Hz 1600x1200 60Hz All of the above worked (again, with the *same* monitor) hooked up to the DVI port. The two modes that *did* work with the VGA port were modes that I specified to the kernel when booting (they were not taken from fb.modes): 1024x768 70Hz 640x480 60Hz Also, it makes no difference if I use one of the unsupported modes from the list of five above with fbset or when the kernel boots... In both situations, the display just blanks, as if it's either: A) getting no signal, or B) getting sent to a frequency it doesn't support. Does *anyone* know what's going on and how to fix this? Adam On Wed, 7 Aug 2002, Adam K Kirchhoff wrote: > > Me again, > > =09So I think I might have a better idea of what's going on... I did > some testing with the Radeon framebuffer tonight, and can only seem to ge= t > it to work with just two modes: 1024x768@70 and 640x480@60. I've tried a > number of others, which worked with the DVI output of my 7500, but don't > seem to work with the VGA port of the card. > > =09Any ideas? > > Adam > > On Tue, 6 Aug 2002, Adam K Kirchhoff wrote: > > > > > Ani and others :-) > > > > =09I was hoping you could lend me some insight :-) I'm trying to do > > some work with DirectFB, and I'm now running into a slight problem > > concerning getting output on the VGA port. > > > > =09I've e-mailed the directfb-dev mailing list about it and had some > > interesting conversations, but the end result was basically: "You shoul= d > > check with Ani Joshi about that, and maybe ask on the linux-fbdev-devel > > mailing list". > > > > =09So now I'm asking here :-) Below this I'm including the > > description of the problem I'm seeing that I sent to the directfb-dev > > mailing list. > > > > =09Can anyone help me out? Thanks :-) > > > > Adam > > > > ---------- Forwarded message ---------- > > Date: Tue, 6 Aug 2002 12:51:24 -0400 (EDT) > > From: Adam K Kirchhoff <ad...@vo...> > > To: "[iso-8859-1] Ville Syrj=E4l=E4" <sy...@sc...> > > Cc: directfb-devel <dir...@di...> > > Subject: Re: [directfb-dev] Re: Radeon support... > > > > > > > I'm getting really confused as to what's going on... What exactly hap= pens > > > when you run a DirectFB application? > > > > It took me a while to figure it out what I know so far, and I'm still n= ot > > 100% sure what's going on... > > > > If I run *any* DirectFB application, the screen blanks. The system > > doesn't lock. I can ssh in and see the application listed in the proce= ss > > table. For example, running df_fire, the screen blanks and, after a fe= w > > seconds, the monitor goes to sleep (as if it's no longer getting a > > signal)... Hitting the 'esc' key brings back the vt, just as usual whe= n > > runnin the application. > > > > Running dfbsee produces similar results. However, with any video that = I > > play, I can hear the audio stream :-) I just can't see anything... > > > > Now, when I first experienced this, I posted about it on either > > directfb-dev or directfb-user. A short while later, I figured out a > > workaround :-) > > > > Instead of booting with my CRT plugged into the VGA port, I used a > > DVI-to-VGA adapter (that came with my Radeon 7500), and plugged the > > monitor into the DVI-A port. Lo' and behold, DirectFB applications wer= e > > now showing up :-) > > > > Since then I've done some video card swapping and now have a "Powered B= y > > ATI" Radeon 8500 LE. This card has both a VGA port and a DVI-D port, b= ut > > no adapter. The old adapter doesn't work for this card because it's > > designed for DVI-A as compared to DVI-D. > > > > I've encountered similar problems elsewhere, too. For example, a hacke= d > > radeon 7500 driver for BeOS would only display on the DVI port, even if > > the computer booted up fine with a monitor on the VGA port. > > > > Of course, I just don't know why this is the case :-) > > > > I've been poking around on-line looking for a DVI-D to VGA adapter, but > > very few of the shops that sell them on-line clarify if it's DVI-A or > > DVI-D :-) > > > > Adam > > > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Linux-fbdev-devel mailing list > > Lin...@li... > > https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel > > > > > > |
|
From: Adam K K. <ad...@vo...> - 2002-08-09 17:33:48
|
Well, I finally got it working... I had to use the radeon framebuffer code that's distributed with mplayer, though :-) Adam On Thu, 8 Aug 2002, Adam K Kirchhoff wrote: > > Alright, so I did some more testing this morning... I tried the exact > same modes, with the exact same monitor, first hooked up to the VGA port > and then hooked up to the DVI port of my Radeon 7500... All but two of > the modes were taken from the fb.modes file supplied by the DirectFB > project. *None* of the following modes (all at 16 bit) worked with the > VGA port: > > 640x480 75Hz > 800x600 75Hz > 1024x768 72Hz > 1280x1024 60Hz > 1600x1200 60Hz > > All of the above worked (again, with the *same* monitor) hooked up to the > DVI port. > > The two modes that *did* work with the VGA port were modes that I > specified to the kernel when booting (they were not taken from fb.modes): > > 1024x768 70Hz > 640x480 60Hz > > Also, it makes no difference if I use one of the unsupported modes from > the list of five above with fbset or when the kernel boots... In both > situations, the display just blanks, as if it's either: A) getting no > signal, or B) getting sent to a frequency it doesn't support. > > Does *anyone* know what's going on and how to fix this? > > Adam > > On Wed, 7 Aug 2002, Adam K Kirchhoff wrote: > > > > > Me again, > > > > =09So I think I might have a better idea of what's going on... I did > > some testing with the Radeon framebuffer tonight, and can only seem to = get > > it to work with just two modes: 1024x768@70 and 640x480@60. I've tried= a > > number of others, which worked with the DVI output of my 7500, but don'= t > > seem to work with the VGA port of the card. > > > > =09Any ideas? > > > > Adam > > > > On Tue, 6 Aug 2002, Adam K Kirchhoff wrote: > > > > > > > > Ani and others :-) > > > > > > =09I was hoping you could lend me some insight :-) I'm trying to do > > > some work with DirectFB, and I'm now running into a slight problem > > > concerning getting output on the VGA port. > > > > > > =09I've e-mailed the directfb-dev mailing list about it and had some > > > interesting conversations, but the end result was basically: "You sho= uld > > > check with Ani Joshi about that, and maybe ask on the linux-fbdev-dev= el > > > mailing list". > > > > > > =09So now I'm asking here :-) Below this I'm including the > > > description of the problem I'm seeing that I sent to the directfb-dev > > > mailing list. > > > > > > =09Can anyone help me out? Thanks :-) > > > > > > Adam > > > > > > ---------- Forwarded message ---------- > > > Date: Tue, 6 Aug 2002 12:51:24 -0400 (EDT) > > > From: Adam K Kirchhoff <ad...@vo...> > > > To: "[iso-8859-1] Ville Syrj=E4l=E4" <sy...@sc...> > > > Cc: directfb-devel <dir...@di...> > > > Subject: Re: [directfb-dev] Re: Radeon support... > > > > > > > > > > I'm getting really confused as to what's going on... What exactly h= appens > > > > when you run a DirectFB application? > > > > > > It took me a while to figure it out what I know so far, and I'm still= not > > > 100% sure what's going on... > > > > > > If I run *any* DirectFB application, the screen blanks. The system > > > doesn't lock. I can ssh in and see the application listed in the pro= cess > > > table. For example, running df_fire, the screen blanks and, after a = few > > > seconds, the monitor goes to sleep (as if it's no longer getting a > > > signal)... Hitting the 'esc' key brings back the vt, just as usual w= hen > > > runnin the application. > > > > > > Running dfbsee produces similar results. However, with any video tha= t I > > > play, I can hear the audio stream :-) I just can't see anything... > > > > > > Now, when I first experienced this, I posted about it on either > > > directfb-dev or directfb-user. A short while later, I figured out a > > > workaround :-) > > > > > > Instead of booting with my CRT plugged into the VGA port, I used a > > > DVI-to-VGA adapter (that came with my Radeon 7500), and plugged the > > > monitor into the DVI-A port. Lo' and behold, DirectFB applications w= ere > > > now showing up :-) > > > > > > Since then I've done some video card swapping and now have a "Powered= By > > > ATI" Radeon 8500 LE. This card has both a VGA port and a DVI-D port,= but > > > no adapter. The old adapter doesn't work for this card because it's > > > designed for DVI-A as compared to DVI-D. > > > > > > I've encountered similar problems elsewhere, too. For example, a hac= ked > > > radeon 7500 driver for BeOS would only display on the DVI port, even = if > > > the computer booted up fine with a monitor on the VGA port. > > > > > > Of course, I just don't know why this is the case :-) > > > > > > I've been poking around on-line looking for a DVI-D to VGA adapter, b= ut > > > very few of the shops that sell them on-line clarify if it's DVI-A or > > > DVI-D :-) > > > > > > Adam > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > Linux-fbdev-devel mailing list > > > Lin...@li... > > > https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel > > > > > > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Linux-fbdev-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel > > |
|
From: Adam K K. <ad...@vi...> - 2002-08-09 23:19:21
|
FYI, using the radeon framebuffer code from the mplayer package seems to have resolved the issues I was having. Any chance of the mplayer driver making it's way into the kernel? Adam On Thu, 8 Aug 2002, Adam K Kirchhoff wrote: > > Alright, so I did some more testing this morning... I tried the exact > same modes, with the exact same monitor, first hooked up to the VGA port > and then hooked up to the DVI port of my Radeon 7500... All but two of > the modes were taken from the fb.modes file supplied by the DirectFB > project. *None* of the following modes (all at 16 bit) worked with the > VGA port: > > 640x480 75Hz > 800x600 75Hz > 1024x768 72Hz > 1280x1024 60Hz > 1600x1200 60Hz > > All of the above worked (again, with the *same* monitor) hooked up to the > DVI port. > > The two modes that *did* work with the VGA port were modes that I > specified to the kernel when booting (they were not taken from fb.modes): > > 1024x768 70Hz > 640x480 60Hz > > Also, it makes no difference if I use one of the unsupported modes from > the list of five above with fbset or when the kernel boots... In both > situations, the display just blanks, as if it's either: A) getting no > signal, or B) getting sent to a frequency it doesn't support. > > Does *anyone* know what's going on and how to fix this? > > Adam > > On Wed, 7 Aug 2002, Adam K Kirchhoff wrote: > > > > > Me again, > > > > =09So I think I might have a better idea of what's going on... I did > > some testing with the Radeon framebuffer tonight, and can only seem to = get > > it to work with just two modes: 1024x768@70 and 640x480@60. I've tried= a > > number of others, which worked with the DVI output of my 7500, but don'= t > > seem to work with the VGA port of the card. > > > > =09Any ideas? > > > > Adam > > > > On Tue, 6 Aug 2002, Adam K Kirchhoff wrote: > > > > > > > > Ani and others :-) > > > > > > =09I was hoping you could lend me some insight :-) I'm trying to do > > > some work with DirectFB, and I'm now running into a slight problem > > > concerning getting output on the VGA port. > > > > > > =09I've e-mailed the directfb-dev mailing list about it and had some > > > interesting conversations, but the end result was basically: "You sho= uld > > > check with Ani Joshi about that, and maybe ask on the linux-fbdev-dev= el > > > mailing list". > > > > > > =09So now I'm asking here :-) Below this I'm including the > > > description of the problem I'm seeing that I sent to the directfb-dev > > > mailing list. > > > > > > =09Can anyone help me out? Thanks :-) > > > > > > Adam > > > > > > ---------- Forwarded message ---------- > > > Date: Tue, 6 Aug 2002 12:51:24 -0400 (EDT) > > > From: Adam K Kirchhoff <ad...@vo...> > > > To: "[iso-8859-1] Ville Syrj=E4l=E4" <sy...@sc...> > > > Cc: directfb-devel <dir...@di...> > > > Subject: Re: [directfb-dev] Re: Radeon support... > > > > > > > > > > I'm getting really confused as to what's going on... What exactly h= appens > > > > when you run a DirectFB application? > > > > > > It took me a while to figure it out what I know so far, and I'm still= not > > > 100% sure what's going on... > > > > > > If I run *any* DirectFB application, the screen blanks. The system > > > doesn't lock. I can ssh in and see the application listed in the pro= cess > > > table. For example, running df_fire, the screen blanks and, after a = few > > > seconds, the monitor goes to sleep (as if it's no longer getting a > > > signal)... Hitting the 'esc' key brings back the vt, just as usual w= hen > > > runnin the application. > > > > > > Running dfbsee produces similar results. However, with any video tha= t I > > > play, I can hear the audio stream :-) I just can't see anything... > > > > > > Now, when I first experienced this, I posted about it on either > > > directfb-dev or directfb-user. A short while later, I figured out a > > > workaround :-) > > > > > > Instead of booting with my CRT plugged into the VGA port, I used a > > > DVI-to-VGA adapter (that came with my Radeon 7500), and plugged the > > > monitor into the DVI-A port. Lo' and behold, DirectFB applications w= ere > > > now showing up :-) > > > > > > Since then I've done some video card swapping and now have a "Powered= By > > > ATI" Radeon 8500 LE. This card has both a VGA port and a DVI-D port,= but > > > no adapter. The old adapter doesn't work for this card because it's > > > designed for DVI-A as compared to DVI-D. > > > > > > I've encountered similar problems elsewhere, too. For example, a hac= ked > > > radeon 7500 driver for BeOS would only display on the DVI port, even = if > > > the computer booted up fine with a monitor on the VGA port. > > > > > > Of course, I just don't know why this is the case :-) > > > > > > I've been poking around on-line looking for a DVI-D to VGA adapter, b= ut > > > very few of the shops that sell them on-line clarify if it's DVI-A or > > > DVI-D :-) > > > > > > Adam > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > Linux-fbdev-devel mailing list > > > Lin...@li... > > > https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel > > > > > > > > > > > > |
|
From: Geert U. <ge...@li...> - 2002-08-19 09:02:26
|
Hi,
In cfb_copyarea(), `tmp' must be unsigned long because it is used to store
unsigned long values (see patch at the end).
cfb_copyarea() also doesn't clear the bits to modify in the first and last
words of a line, e.g. it does
| last = (FB_READ(src) & start_mask);
|
| if (shift > 0)
| FB_WRITE(FB_READ(dst) | (last >> shift_right), dst);
^^^^^^^^^^^^
After this read, the bits to modify must be cleared first, before the OR!
I'm working on a version of cfb_copyarea() that fixes this and handles _all_
possible values of var.bits_per_pixel (the current code assumes
var.bits_per_pixel is a multiple of 8). Stay tuned!
--- fbdev-2.5/drivers/video/cfbcopyarea.c Mon Aug 19 10:49:58 2002
+++ geert-2.5/devivers/video/cfbcopyarea.c Mon Aug 19 10:55:53 2002
@@ -40,10 +40,10 @@
{
int x2, y2, lineincr, shift, shift_right, shift_left, old_dx, old_dy;
int j, linesize = p->fix.line_length, bpl = sizeof(unsigned long);
- unsigned long start_index, end_index, start_mask, end_mask, last;
+ unsigned long start_index, end_index, start_mask, end_mask, last, tmp;
unsigned long *dst = NULL, *src = NULL;
char *src1, *dst1;
- int tmp, height;
+ int height;
/* clip the destination */
old_dx = area->dx;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
|
|
From: Geert U. <ge...@li...> - 2002-08-19 09:11:58
|
On Mon, 19 Aug 2002, Geert Uytterhoeven wrote:
> In cfb_copyarea(), `tmp' must be unsigned long because it is used to store
> unsigned long values (see patch at the end).
>
> cfb_copyarea() also doesn't clear the bits to modify in the first and last
> words of a line, e.g. it does
>
> | last = (FB_READ(src) & start_mask);
> |
> | if (shift > 0)
> | FB_WRITE(FB_READ(dst) | (last >> shift_right), dst);
> ^^^^^^^^^^^^
> After this read, the bits to modify must be cleared first, before the OR!
>
> I'm working on a version of cfb_copyarea() that fixes this and handles _all_
> possible values of var.bits_per_pixel (the current code assumes
> var.bits_per_pixel is a multiple of 8). Stay tuned!
^^^^^^^^^^^^^^^
Oops, actually 8, 16, or 32 only (and 24 after Antonino Daplas' patch). I also
plan on relaxing the current limitation that line_size must be a multiple of
sizeof(unsigned long).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
|
|
From: Geert U. <ge...@li...> - 2002-08-25 15:19:20
|
On Mon, 19 Aug 2002, Geert Uytterhoeven wrote: > On Mon, 19 Aug 2002, Geert Uytterhoeven wrote: > > In cfb_copyarea(), `tmp' must be unsigned long because it is used to store > > unsigned long values (see patch at the end). > > > > cfb_copyarea() also doesn't clear the bits to modify in the first and last > > words of a line, e.g. it does > > > > | last = (FB_READ(src) & start_mask); > > | > > | if (shift > 0) > > | FB_WRITE(FB_READ(dst) | (last >> shift_right), dst); > > ^^^^^^^^^^^^ > > After this read, the bits to modify must be cleared first, before the OR! > > > > I'm working on a version of cfb_copyarea() that fixes this and handles _all_ > > possible values of var.bits_per_pixel (the current code assumes > > var.bits_per_pixel is a multiple of 8). Stay tuned! > ^^^^^^^^^^^^^^^ > Oops, actually 8, 16, or 32 only (and 24 after Antonino Daplas' patch). I also > plan on relaxing the current limitation that line_size must be a multiple of > sizeof(unsigned long). A very first version is available in fbtest (module `fbtest' in linux-fbdev's CVS at sourceforge.net). More optimizations (e.g. cached first/last masks) to be released later... Gr{oetje,eeting}s, Geert P.S. Yes, I work in userspace right know ;-) -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |
|
From: James S. <jsi...@in...> - 2002-08-22 18:53:40
|
> Hi, > > In cfb_copyarea(), `tmp' must be unsigned long because it is used to store > unsigned long values (see patch at the end). Oops. This might fix the one bug I see sometimes. When I delete some characters some of the remaining characters get corrputed. > cfb_copyarea() also doesn't clear the bits to modify in the first and last > words of a line, e.g. it does > > | last = (FB_READ(src) & start_mask); > | > | if (shift > 0) > | FB_WRITE(FB_READ(dst) | (last >> shift_right), dst); > ^^^^^^^^^^^^ > After this read, the bits to modify must be cleared first, before the OR! > > I'm working on a version of cfb_copyarea() that fixes this and handles _all_ > possible values of var.bits_per_pixel (the current code assumes > var.bits_per_pixel is a multiple of 8). Stay tuned! Yeah!!! Will test. |
|
From: =?iso-8859-1?Q?<p.g...@li...> - 2003-02-06 15:27:27
|
Hi,=0D=0AI have a problem when I change the bpp value, here is the code:=0D=
=0A=0D=0Aif( ioctl(fbd, FBIOGET_VSCREENINFO, &var_info) =3D=3D -1){=0D=0A=
perror("\nError IOCTL 1");=0D=0A exit(0);=0D=0A} =0D=0Aprintf(=
"\n bpp: %d", var_info.bits_per_pixel); // output is bpp: 16=0D=0Avar_=
info.bits_per_pixel =3D 24;=0D=0Aif( ioctl(fbd, FBIOPUT_VSCREENINFO, &var=
_info) =3D=3D -1){=0D=0A perror("\nError IOCTL 2");=0D=0A exit(0);=0D=0A}=
=0D=0AThe program exit with the following message error: =0D=0A=
Error IOCTL 2: Invalid argument=0D=0A=0D=0AHow can I set the bpp value? S=
hould I modify the file /etc/X11/XF86Config?=0D=0A=0D=0AI have another pr=
oblem, I try to write a simple program that reads frame from framebuffer =
and then creates a Divx file of a few seconds.=0D=0AI map the framebuffer=
to a buffer, but the program crash with a segmentation fault:=0D=0A =
=0D=0A screen_buffer =3D (=
char *)malloc(DIM_BUFFER * sizeof(char));=0D=0A screen_buffer =3D (voi=
d *)mmap(0, DIM_BUFFER, PROT_READ, MAP_SHARED, fbd, 0); =0D=
=0A =0D=0A encFrame.image =3D (void *)screen_buffer; <--- causes seg =
fault=0D=0A=0D=0AWhat's wrong? =0D=0A=0D=0AThanks,=0D=0APaolo Gilardetti=
=0D=0A =0D=0A
|
|
From: Antonino D. <ad...@po...> - 2003-02-06 21:55:46
|
On Thu, 2003-02-06 at 23:27, p.g...@li... wrote:
> Hi,
> I have a problem when I change the bpp value, here is the code:
>
> if( ioctl(fbd, FBIOGET_VSCREENINFO, &var_info) == -1){
> perror("\nError IOCTL 1");
> exit(0);
> }
> printf("\n bpp: %d", var_info.bits_per_pixel); // output is bpp: 16
> var_info.bits_per_pixel = 24;
> if( ioctl(fbd, FBIOPUT_VSCREENINFO, &var_info) == -1){
> perror("\nError IOCTL 2");
> exit(0);
> }
> The program exit with the following message error:
> Error IOCTL 2: Invalid argument
>
> How can I set the bpp value? Should I modify the file /etc/X11/XF86Config?
This will depend on the driver you are using. vesafb does not support
any change to fb_var_screeninfo. Other drivers, may not round off
invalid values: ie bpp == 24 is not supported. Also, increasing bpp
implies that more video memory will be required if var.xres_virtual and
var.yres_virtual remains the same. So try to check xres, yres,
xres_virtual and yres_virtual against fix.smem_len and
var.bits_per_pixel.
fix.smem_len >= (var.bits_per_pixel * var.xres_virtual)/8 *
var.yres_virtual.
/etc/X11/XF86Config has nothing to with fbdev.
>
> I have another problem, I try to write a simple program that reads frame from framebuffer and then creates a Divx file of a few seconds.
> I map the framebuffer to a buffer, but the program crash with a segmentation fault:
>
> screen_buffer = (char *)malloc(DIM_BUFFER * sizeof(char));
you don't need this step.
> screen_buffer = (void *)mmap(0, DIM_BUFFER, PROT_READ, MAP_SHARED, fbd, 0);
check if mmap failed, (returns -1).
>
> encFrame.image = (void *)screen_buffer; <--- causes seg fault
memcpy(encFrame.image, screen_bufer, DIM_BUFFER) is a more appropriate
step to get the contents.
Tony
|
|
From: Lia M. <vol...@ti...> - 2003-07-07 23:33:23
|
When I start the system with YWRAP activated I have scrolling problems , in fact when I make the screen scrolling for a while (for example during the examination of a document with "less" or during the compilation of a software) , on the screen starts appear colored lines on the screen and these starts scrolling . When the screen is full of this lines these disappear and the text is back , but after few scroll again these lines appears. With 2.4.21-ac4 kernel the problem is more evident than the 2.4.21 "vanilla" . If I reboot the system doesn't appears lines anymore, but instead of the lines appears words of the precedent boot of the system, seems like that the video memory have not been reset , and that the FB takes parts of the Video data Junk remained after the reboot and visualize these on the screen. Seems like an error in addressing the video memory . With 2.4.20 and precedent this doesn't happen . Please help me :cry: Bye marcello |
|
From: Lia M. <vol...@ti...> - 2003-07-07 23:41:40
|
Marted=EC, luglio 8, 2003, alle 01:37 , Lia Maggioni ha scritto: > > When I start the system with YWRAP activated I have scrolling=20 > problems , in fact when I make the screen scrolling for a while (for=20= > example during the examination of a document with "less" or during the=20= > compilation of a software) , on the screen starts appear colored lines=20= > on the screen and these starts scrolling . When the screen is full of=20= > this lines these disappear and the text is back , but after few scroll=20= > again these lines appears. With 2.4.21-ac4 kernel the problem is more=20= > evident than the 2.4.21 "vanilla" . If I reboot the system doesn't=20 > appears lines anymore, but instead of the lines appears words of the=20= > precedent boot of the system, seems like that the video memory have = not=20 > been reset , and that the FB takes parts of the Video data Junk=20 > remained after the reboot and visualize these on the screen. Seems = like=20 > an error in addressing the video memory . > > With 2.4.20 and precedent this doesn't happen . > > Please help me :cry: > > Bye > > marcello > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > = http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > Linux-fbdev-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel > |
|
From: Nitin M. <Ni...@so...> - 2003-07-17 12:25:33
|
Hello ! I have written a driver for 69030 card and was able to program the = BitBLT engine . Now I want to play MPEG4 video on the card.I will get input as RGB not = the YUV data initially. I need a very high frame rate of around 25-30fps. What part of hardware = I need to program additionally other than BitBLT engine and how to = achieve this rate? Will the way of using fbmem into pages help inthis = regard? Will utilisation of double buffering helpin this regard???=20 Thanking u in advance Regards, =20 Nitin Mahajan mail:ni...@so... Ph:51101667. Mobile : 9886099925 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Lord gave us two ends -- one to sit on and the other to think with. = Success depends on which one we use the most. =20 |
|
From: <ki...@ma...> - 2005-02-11 18:24:24
|
Hello, my name is Kirill. I already wrote to you concerning my own Cyberblade/i1 framebuffer driver. I got new problem ;) When switching from VGA text console mode to graphics one, $COLUMNS steel have 80 and $LINES is 24 while kernel report: "Console: switching to colour framebuffer device 100x37" And text line wider than 80 chars is wrapped. But if i logout and then login back, all is OK. What's wrong? I use kernel-2.4.28. Thanks. Sorry for my bad English. Please mail to ki...@ma... |
|
From: Javier R. <jav...@es...> - 2006-04-14 15:03:03
|
hi. i have this problem. kernel 2.6.16.2 intelfb: Framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G/915GM chipsets intelfb: Version 0.9.2 intelfb: 00:02.0: Intel(R) 855GME, aperture size 128MB, stolen memory 892kB intelfb: Non-CRT device is enabled ( LVDS port ). Disabling mode switching. intelfb: Video mode must be programmed at boot time. the driver (*) is inside kernel. Thanks |
|
From: Jan-Benedict G. <jb...@lu...> - 2006-04-14 15:28:42
|
On Fri, 2006-04-14 15:02:56 +0000, Javier Ruano <jav...@es...= m.es> wrote: > i have this problem. > kernel 2.6.16.2 >=20 > intelfb: Framebuffer driver for Intel(R) > 830M/845G/852GM/855GM/865G/915G/915GM chipsets > intelfb: Version 0.9.2 > intelfb: 00:02.0: Intel(R) 855GME, aperture size 128MB, stolen memory 892= kB > intelfb: Non-CRT device is enabled ( LVDS port ). Disabling mode switchi= ng. > intelfb: Video mode must be programmed at boot time. So where is the problem? MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... . +49-172-7608481 = _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg = _ _ O f=C3=BCr einen Freien Staat voll Freier B=C3=BCrger" | im Internet! | i= m Irak! O O O ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)= ); |
|
From: Knut P. <Knu...@t-...> - 2006-04-15 05:55:23
|
>intelfb: Framebuffer driver for Intel(R) >830M/845G/852GM/855GM/865G/915G/915GM chipsets >intelfb: Version 0.9.2 >intelfb: 00:02.0: Intel(R) 855GME, aperture size 128MB, stolen memory 892kB >intelfb: Non-CRT device is enabled ( LVDS port ). Disabling mode switching. >intelfb: Video mode must be programmed at boot time. > > >the driver (*) is inside kernel. > > Yes - of course, why not? It should be possible to compile a framebuffer driver into the kernel without problems, and it should be possible to load it as a module ... even from within xterm ;-) Why do you believe that this is related to any of the problems? cu, knut |
|
From: Krzysztof H. <krz...@wp...> - 2007-08-17 16:47:22
Attachments:
cirrus-cleanup.diff
|
From: Krzysztof Helt <krz...@wp...>
This patch fixes over 850 errors and warnings pointed
out by the checkpatch.pl script.
Signed-off-by: Krzysztof Helt <krz...@wp...>
---
I run the checkpatch.pl script on the whole drivers/video
directory. The most errors are in drivers which share code
with X11 (sis, nvidia). The cirrus driver had the most errors
as a non-X11 driver.
--- linux-2.6.23.old/drivers/video/cirrusfb.c 2007-07-09 01:
32:16.000000000 +0200
+++ linux-2.6.23/drivers/video/cirrusfb.c 2007-08-16 19:43:
03.000000000 +0200
@@ -59,7 +59,7 @@
#endif
#ifdef CONFIG_PPC_PREP
#include <asm/machdep.h>
-#define isPReP (machine_is(prep))
+#define isPReP(machine_is(prep))
#else
#define isPReP 0
#endif
@@ -67,7 +67,6 @@
#include "video/vga.h"
#include "video/cirrus.h"
-
/****************************************************************
*
*
* debugging and utility macros
@@ -82,7 +81,8 @@
/* debug output */
#ifdef CIRRUSFB_DEBUG
-#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt,
__FUNCTION__ , ## args)
+#define DPRINTK(fmt, args...) \
+ printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
#else
#define DPRINTK(fmt, args...)
#endif
@@ -90,20 +90,19 @@
/* debugging assertions */
#ifndef CIRRUSFB_NDEBUG
#define assert(expr) \
- if(!(expr)) { \
- printk( "Assertion failed! %s,%s,%s,line=%d\n",\
- #expr,__FILE__,__FUNCTION__,__LINE__); \
- }
+ if (!(expr)) { \
+ printk("Assertion failed! %s,%s,%s,line=%d\n", \
+ #expr, __FILE__, __FUNCTION__, __LINE__); \
+ }
#else
#define assert(expr)
#endif
-#define MB_ (1024*1024)
+#define MB_ (1024 * 1024)
#define KB_ (1024)
#define MAX_NUM_BOARDS 7
-
/****************************************************************
*
*
* chipset information
@@ -123,7 +122,6 @@ typedef enum {
BT_LAGUNA, /* GD546x */
} cirrusfb_board_t;
-
/*
* per-board-type information, used for enumerating and
abstracting
* chip-specific information
@@ -139,7 +137,8 @@ static const struct cirrusfb_board_info_
/* for 1/4bpp, 8bpp 15/16bpp, 24bpp, 32bpp - numbers from
xorg code */
bool init_sr07 : 1; /* init SR07 during init_vgachip() */
bool init_sr1f : 1; /* write SR1F during init_vgachip() */
- bool scrn_start_bit19 : 1; /* construct bit 19 of screen
start address */
+ /* construct bit 19 of screen start address */
+ bool scrn_start_bit19 : 1;
/* initial SR07 value, then for each mode */
unsigned char sr07;
@@ -261,30 +260,28 @@ static const struct cirrusfb_board_info_
}
};
-
#ifdef CONFIG_PCI
#define CHIP(id, btype) \
{ PCI_VENDOR_ID_CIRRUS, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
(btype) }
static struct pci_device_id cirrusfb_pci_table[] = {
- CHIP( PCI_DEVICE_ID_CIRRUS_5436, BT_ALPINE ),
- CHIP( PCI_DEVICE_ID_CIRRUS_5434_8, BT_ALPINE ),
- CHIP( PCI_DEVICE_ID_CIRRUS_5434_4, BT_ALPINE ),
- CHIP( PCI_DEVICE_ID_CIRRUS_5430, BT_ALPINE ), /* GD-5440 is
same id */
- CHIP( PCI_DEVICE_ID_CIRRUS_7543, BT_ALPINE ),
- CHIP( PCI_DEVICE_ID_CIRRUS_7548, BT_ALPINE ),
- CHIP( PCI_DEVICE_ID_CIRRUS_5480, BT_GD5480 ), /* MacPicasso
likely */
- CHIP( PCI_DEVICE_ID_CIRRUS_5446, BT_PICASSO4 ), /* Picasso
4 is 5446 */
- CHIP( PCI_DEVICE_ID_CIRRUS_5462, BT_LAGUNA ), /* CL Laguna
*/
- CHIP( PCI_DEVICE_ID_CIRRUS_5464, BT_LAGUNA ), /* CL Laguna
3D */
- CHIP( PCI_DEVICE_ID_CIRRUS_5465, BT_LAGUNA ), /* CL Laguna
3DA*/
+ CHIP(PCI_DEVICE_ID_CIRRUS_5436, BT_ALPINE),
+ CHIP(PCI_DEVICE_ID_CIRRUS_5434_8, BT_ALPINE),
+ CHIP(PCI_DEVICE_ID_CIRRUS_5434_4, BT_ALPINE),
+ CHIP(PCI_DEVICE_ID_CIRRUS_5430, BT_ALPINE), /* GD-5440 is
same id */
+ CHIP(PCI_DEVICE_ID_CIRRUS_7543, BT_ALPINE),
+ CHIP(PCI_DEVICE_ID_CIRRUS_7548, BT_ALPINE),
+ CHIP(PCI_DEVICE_ID_CIRRUS_5480, BT_GD5480), /* MacPicasso
likely */
+ CHIP(PCI_DEVICE_ID_CIRRUS_5446, BT_PICASSO4), /* Picasso 4
is 5446 */
+ CHIP(PCI_DEVICE_ID_CIRRUS_5462, BT_LAGUNA), /* CL Laguna */
+ CHIP(PCI_DEVICE_ID_CIRRUS_5464, BT_LAGUNA), /* CL Laguna 3D
*/
+ CHIP(PCI_DEVICE_ID_CIRRUS_5465, BT_LAGUNA), /* CL Laguna
3DA*/
{ 0, }
};
MODULE_DEVICE_TABLE(pci, cirrusfb_pci_table);
#undef CHIP
#endif /* CONFIG_PCI */
-
#ifdef CONFIG_ZORRO
static const struct zorro_device_id cirrusfb_zorro_table[] = {
{
@@ -294,7 +291,7 @@ static const struct zorro_device_id cirr
.id = ZORRO_PROD_HELFRICH_PICCOLO_RAM,
.driver_data = BT_PICCOLO,
}, {
- .id =
ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM,
+ .id =
ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM,
.driver_data = BT_PICASSO,
}, {
.id = ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM,
@@ -333,7 +330,6 @@ static const struct {
};
#endif /* CONFIG_ZORRO */
-
struct cirrusfb_regs {
__u32 line_length; /* in BYTES! */
__u32 visual;
@@ -364,17 +360,12 @@ struct cirrusfb_regs {
long VertBlankEnd;
};
-
-
#ifdef CIRRUSFB_DEBUG
typedef enum {
- CRT,
- SEQ
+ CRT,
+ SEQ
} cirrusfb_dbg_reg_class_t;
-#endif /* CIRRUSFB_DEBUG */
-
-
-
+#endif /* CIRRUSFB_DEBUG */
/* info about board */
struct cirrusfb_info {
@@ -405,9 +396,8 @@ struct cirrusfb_info {
void (*unmap)(struct cirrusfb_info *cinfo);
};
-
static unsigned cirrusfb_def_mode = 1;
-static int noaccel = 0;
+static int noaccel;
/*
* Predefined Video Modes
@@ -441,7 +431,7 @@ static const struct {
.lower_margin = 8,
.hsync_len = 96,
.vsync_len = 4,
- .sync = FB_SYNC_HOR_HIGH_ACT |
FB_SYNC_VERT_HIGH_ACT,
+ .sync = FB_SYNC_HOR_HIGH_ACT |
FB_SYNC_VERT_HIGH_ACT,
.vmode = FB_VMODE_NONINTERLACED
}
}, {
@@ -502,27 +492,29 @@ static const struct {
/****************************************************************
************/
/**** BEGIN PROTOTYPES
******************************************************/
-
/*--- Interface used by the world
------------------------------------------*/
-static int cirrusfb_init (void);
+static int cirrusfb_init(void);
#ifndef MODULE
-static int cirrusfb_setup (char *options);
+static int cirrusfb_setup(char *options);
#endif
-static int cirrusfb_open (struct fb_info *info, int user);
-static int cirrusfb_release (struct fb_info *info, int user);
-static int cirrusfb_setcolreg (unsigned regno, unsigned red,
unsigned green,
- unsigned blue, unsigned transp,
- struct fb_info *info);
-static int cirrusfb_check_var (struct fb_var_screeninfo *var,
- struct fb_info *info);
-static int cirrusfb_set_par (struct fb_info *info);
-static int cirrusfb_pan_display (struct fb_var_screeninfo *var,
- struct fb_info *info);
-static int cirrusfb_blank (int blank_mode, struct fb_info *info)
;
-static void cirrusfb_fillrect (struct fb_info *info, const
struct fb_fillrect *region);
-static void cirrusfb_copyarea(struct fb_info *info, const struct
fb_copyarea *area);
-static void cirrusfb_imageblit(struct fb_info *info, const
struct fb_image *image);
+static int cirrusfb_open(struct fb_info *info, int user);
+static int cirrusfb_release(struct fb_info *info, int user);
+static int cirrusfb_setcolreg(unsigned regno, unsigned red,
unsigned green,
+ unsigned blue, unsigned transp,
+ struct fb_info *info);
+static int cirrusfb_check_var(struct fb_var_screeninfo *var,
+ struct fb_info *info);
+static int cirrusfb_set_par(struct fb_info *info);
+static int cirrusfb_pan_display(struct fb_var_screeninfo *var,
+ struct fb_info *info);
+static int cirrusfb_blank(int blank_mode, struct fb_info *info);
+static void cirrusfb_fillrect(struct fb_info *info,
+ const struct fb_fillrect *region);
+static void cirrusfb_copyarea(struct fb_info *info,
+ const struct fb_copyarea *area);
+static void cirrusfb_imageblit(struct fb_info *info,
+ const struct fb_image *image);
/* function table of the above functions */
static struct fb_ops cirrusfb_ops = {
@@ -540,68 +532,68 @@ static struct fb_ops cirrusfb_ops = {
};
/*--- Hardware Specific Routines
-------------------------------------------*/
-static int cirrusfb_decode_var (const struct fb_var_screeninfo
*var,
+static int cirrusfb_decode_var(const struct fb_var_screeninfo
*var,
struct cirrusfb_regs *regs,
const struct fb_info *info);
/*--- Internal routines
----------------------------------------------------*/
-static void init_vgachip (struct cirrusfb_info *cinfo);
-static void switch_monitor (struct cirrusfb_info *cinfo, int on)
;
-static void WGen (const struct cirrusfb_info *cinfo,
- int regnum, unsigned char val);
-static unsigned char RGen (const struct cirrusfb_info *cinfo,
int regnum);
-static void AttrOn (const struct cirrusfb_info *cinfo);
-static void WHDR (const struct cirrusfb_info *cinfo, unsigned
char val);
-static void WSFR (struct cirrusfb_info *cinfo, unsigned char
val);
-static void WSFR2 (struct cirrusfb_info *cinfo, unsigned char
val);
-static void WClut (struct cirrusfb_info *cinfo, unsigned char
regnum, unsigned char red,
- unsigned char green,
- unsigned char blue);
+static void init_vgachip(struct cirrusfb_info *cinfo);
+static void switch_monitor(struct cirrusfb_info *cinfo, int on);
+static void WGen(const struct cirrusfb_info *cinfo,
+ int regnum, unsigned char val);
+static unsigned char RGen(const struct cirrusfb_info *cinfo, int
regnum);
+static void AttrOn(const struct cirrusfb_info *cinfo);
+static void WHDR(const struct cirrusfb_info *cinfo, unsigned
char val);
+static void WSFR(struct cirrusfb_info *cinfo, unsigned char val)
;
+static void WSFR2(struct cirrusfb_info *cinfo, unsigned char
val);
+static void WClut(struct cirrusfb_info *cinfo, unsigned char
regnum,
+ unsigned char red, unsigned char green, unsigned char
blue);
#if 0
-static void RClut (struct cirrusfb_info *cinfo, unsigned char
regnum, unsigned char *red,
- unsigned char *green,
- unsigned char *blue);
-#endif
-static void cirrusfb_WaitBLT (u8 __iomem *regbase);
-static void cirrusfb_BitBLT (u8 __iomem *regbase, int
bits_per_pixel,
- u_short curx, u_short cury,
- u_short destx, u_short desty,
- u_short width, u_short height,
- u_short line_length);
-static void cirrusfb_RectFill (u8 __iomem *regbase, int
bits_per_pixel,
- u_short x, u_short y,
- u_short width, u_short height,
- u_char color, u_short line_length);
-
-static void bestclock (long freq, long *best,
- long *nom, long *den,
- long *div, long maxfreq);
+static void RClut(struct cirrusfb_info *cinfo, unsigned char
regnum,
+ unsigned char *red, unsigned char *green,
+ unsigned char *blue);
+#endif
+static void cirrusfb_WaitBLT(u8 __iomem *regbase);
+static void cirrusfb_BitBLT(u8 __iomem *regbase, int
bits_per_pixel,
+ u_short curx, u_short cury,
+ u_short destx, u_short desty,
+ u_short width, u_short height,
+ u_short line_length);
+static void cirrusfb_RectFill(u8 __iomem *regbase, int
bits_per_pixel,
+ u_short x, u_short y,
+ u_short width, u_short height,
+ u_char color, u_short line_length);
+
+static void bestclock(long freq, long *best,
+ long *nom, long *den,
+ long *div, long maxfreq);
#ifdef CIRRUSFB_DEBUG
-static void cirrusfb_dump (void);
-static void cirrusfb_dbg_reg_dump (caddr_t regbase);
-static void cirrusfb_dbg_print_regs (caddr_t regbase,
cirrusfb_dbg_reg_class_t reg_class,...);
-static void cirrusfb_dbg_print_byte (const char *name, unsigned
char val);
+static void cirrusfb_dump(void);
+static void cirrusfb_dbg_reg_dump(caddr_t regbase);
+static void cirrusfb_dbg_print_regs(caddr_t regbase,
+ cirrusfb_dbg_reg_class_t reg_class, ...);
+static void cirrusfb_dbg_print_byte(const char *name, unsigned
char val);
#endif /* CIRRUSFB_DEBUG */
/*** END PROTOTYPES
********************************************************/
/****************************************************************
*************/
/*** BEGIN Interface Used by the World
***************************************/
-static int opencount = 0;
+static int opencount;
/*--- Open /dev/fbx
---------------------------------------------------------*/
-static int cirrusfb_open (struct fb_info *info, int user)
+static int cirrusfb_open(struct fb_info *info, int user)
{
if (opencount++ == 0)
- switch_monitor (info->par, 1);
+ switch_monitor(info->par, 1);
return 0;
}
/*--- Close /dev/fbx
--------------------------------------------------------*/
-static int cirrusfb_release (struct fb_info *info, int user)
+static int cirrusfb_release(struct fb_info *info, int user)
{
if (--opencount == 0)
- switch_monitor (info->par, 0);
+ switch_monitor(info->par, 0);
return 0;
}
@@ -610,11 +602,11 @@ static int cirrusfb_release (struct fb_i
/**** BEGIN Hardware specific Routines
**************************************/
/* Get a good MCLK value */
-static long cirrusfb_get_mclk (long freq, int bpp, long *div)
+static long cirrusfb_get_mclk(long freq, int bpp, long *div)
{
long mclk;
- assert (div != NULL);
+ assert(div != NULL);
/* Calculate MCLK, in case VCLK is high enough to require >
50MHz.
* Assume a 64-bit data path for now. The formula is:
@@ -624,23 +616,23 @@ static long cirrusfb_get_mclk (long freq
mclk = (mclk * 12) / 10;
if (mclk < 50000)
mclk = 50000;
- DPRINTK ("Use MCLK of %ld kHz\n", mclk);
+ DPRINTK("Use MCLK of %ld kHz\n", mclk);
/* Calculate value for SR1F. Multiply by 2 so we can round
up. */
mclk = ((mclk * 16) / 14318);
mclk = (mclk + 1) / 2;
- DPRINTK ("Set SR1F[5:0] to 0x%lx\n", mclk);
+ DPRINTK("Set SR1F[5:0] to 0x%lx\n", mclk);
/* Determine if we should use MCLK instead of VCLK, and if
so, what we
* should divide it by to get VCLK */
switch (freq) {
case 24751 ... 25249:
*div = 2;
- DPRINTK ("Using VCLK = MCLK/2\n");
+ DPRINTK("Using VCLK = MCLK/2\n");
break;
case 49501 ... 50499:
*div = 1;
- DPRINTK ("Using VCLK = MCLK\n");
+ DPRINTK("Using VCLK = MCLK\n");
break;
default:
*div = 0;
@@ -691,37 +683,42 @@ static int cirrusfb_check_var(struct fb_
den = 1;
break; /* 4 bytes per pixel */
default:
- printk ("cirrusfb: mode %dx%dx%d rejected...color depth
not supported.\n",
+ printk(KERN_ERR "cirrusfb: mode %dx%dx%d rejected..."
+ "color depth not supported.\n",
var->xres, var->yres, var->bits_per_pixel);
- DPRINTK ("EXIT - EINVAL error\n");
+ DPRINTK("EXIT - EINVAL error\n");
return -EINVAL;
}
if (var->xres * nom / den * var->yres > cinfo->size) {
- printk ("cirrusfb: mode %dx%dx%d rejected...resolution
too high to fit into video memory!\n",
+ printk(KERN_ERR "cirrusfb: mode %dx%dx%d rejected..."
+ "resolution too high to fit into video memory!\n",
var->xres, var->yres, var->bits_per_pixel);
- DPRINTK ("EXIT - EINVAL error\n");
+ DPRINTK("EXIT - EINVAL error\n");
return -EINVAL;
}
/* use highest possible virtual resolution */
if (var->xres_virtual == -1 &&
var->yres_virtual == -1) {
- printk ("cirrusfb: using maximum available virtual
resolution\n");
+ printk(KERN_INFO
+ "cirrusfb: using maximum available virtual
resolution\n");
for (i = 0; modes[i].xres != -1; i++) {
if (modes[i].xres * nom / den * modes[i].yres <
cinfo->size / 2)
break;
}
if (modes[i].xres == -1) {
- printk ("cirrusfb: could not find a virtual
resolution that fits into video memory!!\n");
- DPRINTK ("EXIT - EINVAL error\n");
+ printk(KERN_ERR "cirrusfb: could not find a virtual "
+ "resolution that fits into video memory!!\n");
+ DPRINTK("EXIT - EINVAL error\n");
return -EINVAL;
}
var->xres_virtual = modes[i].xres;
var->yres_virtual = modes[i].yres;
- printk ("cirrusfb: virtual resolution set to maximum of
%dx%d\n",
- var->xres_virtual, var->yres_virtual);
+ printk(KERN_INFO "cirrusfb: virtual resolution set to "
+ "maximum of %dx%d\n", var->xres_virtual,
+ var->yres_virtual);
}
if (var->xres_virtual < var->xres)
@@ -760,7 +757,7 @@ static int cirrusfb_check_var(struct fb_
break;
case 16:
- if(isPReP) {
+ if (isPReP) {
var->red.offset = 2;
var->green.offset = -3;
var->blue.offset = 8;
@@ -775,7 +772,7 @@ static int cirrusfb_check_var(struct fb_
break;
case 24:
- if(isPReP) {
+ if (isPReP) {
var->red.offset = 8;
var->green.offset = 16;
var->blue.offset = 24;
@@ -790,7 +787,7 @@ static int cirrusfb_check_var(struct fb_
break;
case 32:
- if(isPReP) {
+ if (isPReP) {
var->red.offset = 8;
var->green.offset = 16;
var->blue.offset = 24;
@@ -825,15 +822,16 @@ static int cirrusfb_check_var(struct fb_
yres = (yres + 1) / 2;
if (yres >= 1280) {
- printk (KERN_WARNING "cirrusfb: ERROR: VerticalTotal >=
1280; special treatment required! (TODO)\n");
- DPRINTK ("EXIT - EINVAL error\n");
+ printk(KERN_ERR "cirrusfb: ERROR: VerticalTotal >= 1280;
"
+ "special treatment required! (TODO)\n");
+ DPRINTK("EXIT - EINVAL error\n");
return -EINVAL;
}
return 0;
}
-static int cirrusfb_decode_var (const struct fb_var_screeninfo
*var,
+static int cirrusfb_decode_var(const struct fb_var_screeninfo
*var,
struct cirrusfb_regs *regs,
const struct fb_info *info)
{
@@ -844,7 +842,7 @@ static int cirrusfb_decode_var (const st
int xres, hfront, hsync, hback;
int yres, vfront, vsync, vback;
- switch(var->bits_per_pixel) {
+ switch (var->bits_per_pixel) {
case 1:
regs->line_length = var->xres_virtual / 8;
regs->visual = FB_VISUAL_MONO10;
@@ -887,7 +885,7 @@ static int cirrusfb_decode_var (const st
/* convert from ps to kHz */
freq = 1000000000 / var->pixclock;
- DPRINTK ("desired pixclock: %ld kHz\n", freq);
+ DPRINTK("desired pixclock: %ld kHz\n", freq);
maxclock = cirrusfb_board_info[cinfo->btype].
maxclock[maxclockidx];
regs->multiplexing = 0;
@@ -902,8 +900,9 @@ static int cirrusfb_decode_var (const st
break;
default:
- printk (KERN_WARNING "cirrusfb: ERROR: Frequency
greater than maxclock (%ld kHz)\n", maxclock);
- DPRINTK ("EXIT - return -EINVAL\n");
+ printk(KERN_ERR "cirrusfb: Frequency greater "
+ "than maxclock (%ld kHz)\n", maxclock);
+ DPRINTK("EXIT - return -EINVAL\n");
return -EINVAL;
}
}
@@ -914,14 +913,16 @@ static int cirrusfb_decode_var (const st
case 16:
case 32:
if (regs->HorizRes <= 800)
- freq /= 2; /* Xbh has this type of clock for
32-bit */
+ /* Xbh has this type of clock for 32-bit */
+ freq /= 2;
break;
}
#endif
- bestclock (freq, ®s->freq, ®s->nom, ®s->den,
®s->div,
- maxclock);
- regs->mclk = cirrusfb_get_mclk (freq, var->bits_per_pixel,
®s->divMCLK);
+ bestclock(freq, ®s->freq, ®s->nom, ®s->den,
®s->div,
+ maxclock);
+ regs->mclk = cirrusfb_get_mclk(freq, var->bits_per_pixel,
+ ®s->divMCLK);
xres = var->xres;
hfront = var->right_margin;
@@ -948,7 +949,8 @@ static int cirrusfb_decode_var (const st
regs->HorizTotal = (xres + hfront + hsync + hback) / 8 - 5;
regs->HorizDispEnd = xres / 8 - 1;
regs->HorizBlankStart = xres / 8;
- regs->HorizBlankEnd = regs->HorizTotal + 5; /* does not
count with "-5" */
+ /* does not count with "-5" */
+ regs->HorizBlankEnd = regs->HorizTotal + 5;
regs->HorizSyncStart = (xres + hfront) / 8 + 1;
regs->HorizSyncEnd = (xres + hfront + hsync) / 8 + 1;
@@ -976,23 +978,23 @@ static int cirrusfb_decode_var (const st
return 0;
}
-
-static void cirrusfb_set_mclk (const struct cirrusfb_info
*cinfo, int val, int div)
+static void cirrusfb_set_mclk(const struct cirrusfb_info *cinfo,
int val,
+ int div)
{
- assert (cinfo != NULL);
+ assert(cinfo != NULL);
if (div == 2) {
/* VCLK = MCLK/2 */
- unsigned char old = vga_rseq (cinfo->regbase, CL_SEQR1E)
;
- vga_wseq (cinfo->regbase, CL_SEQR1E, old | 0x1);
- vga_wseq (cinfo->regbase, CL_SEQR1F, 0x40 | (val & 0x3f)
);
+ unsigned char old = vga_rseq(cinfo->regbase, CL_SEQR1E);
+ vga_wseq(cinfo->regbase, CL_SEQR1E, old | 0x1);
+ vga_wseq(cinfo->regbase, CL_SEQR1F, 0x40 | (val & 0x3f))
;
} else if (div == 1) {
/* VCLK = MCLK */
- unsigned char old = vga_rseq (cinfo->regbase, CL_SEQR1E)
;
- vga_wseq (cinfo->regbase, CL_SEQR1E, old & ~0x1);
- vga_wseq (cinfo->regbase, CL_SEQR1F, 0x40 | (val & 0x3f)
);
+ unsigned char old = vga_rseq(cinfo->regbase, CL_SEQR1E);
+ vga_wseq(cinfo->regbase, CL_SEQR1E, old & ~0x1);
+ vga_wseq(cinfo->regbase, CL_SEQR1F, 0x40 | (val & 0x3f))
;
} else {
- vga_wseq (cinfo->regbase, CL_SEQR1F, val & 0x3f);
+ vga_wseq(cinfo->regbase, CL_SEQR1F, val & 0x3f);
}
}
@@ -1001,7 +1003,7 @@ static void cirrusfb_set_mclk (const str
actually writes the values for a new video mode into the
hardware,
*****************************************************************
*********/
-static int cirrusfb_set_par_foo (struct fb_info *info)
+static int cirrusfb_set_par_foo(struct fb_info *info)
{
struct cirrusfb_info *cinfo = info->par;
struct fb_var_screeninfo *var = &info->var;
@@ -1011,15 +1013,15 @@ static int cirrusfb_set_par_foo (struct
int offset = 0, err;
const struct cirrusfb_board_info_rec *bi;
- DPRINTK ("ENTER\n");
- DPRINTK ("Requested mode: %dx%dx%d\n",
+ DPRINTK("ENTER\n");
+ DPRINTK("Requested mode: %dx%dx%d\n",
var->xres, var->yres, var->bits_per_pixel);
- DPRINTK ("pixclock: %d\n", var->pixclock);
+ DPRINTK("pixclock: %d\n", var->pixclock);
- init_vgachip (cinfo);
+ init_vgachip(cinfo);
err = cirrusfb_decode_var(var, ®s, info);
- if(err) {
+ if (err) {
/* should never happen */
DPRINTK("mode change aborted. invalid var.\n");
return -EINVAL;
@@ -1027,34 +1029,35 @@ static int cirrusfb_set_par_foo (struct
bi = &cirrusfb_board_info[cinfo->btype];
-
/* unlock register VGA_CRTC_H_TOTAL..CRT7 */
- vga_wcrt (regbase, VGA_CRTC_V_SYNC_END, 0x20); /*
previously: 0x00) */
+ vga_wcrt(regbase, VGA_CRTC_V_SYNC_END, 0x20); /*
previously: 0x00) */
/* if debugging is enabled, all parameters get output
before writing */
- DPRINTK ("CRT0: %ld\n", regs.HorizTotal);
- vga_wcrt (regbase, VGA_CRTC_H_TOTAL, regs.HorizTotal);
+ DPRINTK("CRT0: %ld\n", regs.HorizTotal);
+ vga_wcrt(regbase, VGA_CRTC_H_TOTAL, regs.HorizTotal);
- DPRINTK ("CRT1: %ld\n", regs.HorizDispEnd);
- vga_wcrt (regbase, VGA_CRTC_H_DISP, regs.HorizDispEnd);
+ DPRINTK("CRT1: %ld\n", regs.HorizDispEnd);
+ vga_wcrt(regbase, VGA_CRTC_H_DISP, regs.HorizDispEnd);
- DPRINTK ("CRT2: %ld\n", regs.HorizBlankStart);
- vga_wcrt (regbase, VGA_CRTC_H_BLANK_START, regs.
HorizBlankStart);
+ DPRINTK("CRT2: %ld\n", regs.HorizBlankStart);
+ vga_wcrt(regbase, VGA_CRTC_H_BLANK_START, regs.
HorizBlankStart);
- DPRINTK ("CRT3: 128+%ld\n", regs.HorizBlankEnd % 32);
/* + 128: Compatible read */
- vga_wcrt (regbase, VGA_CRTC_H_BLANK_END, 128 + (regs.
HorizBlankEnd % 32));
+ /* + 128: Compatible read */
+ DPRINTK("CRT3: 128+%ld\n", regs.HorizBlankEnd % 32);
+ vga_wcrt(regbase, VGA_CRTC_H_BLANK_END,
+ 128 + (regs.HorizBlankEnd % 32));
- DPRINTK ("CRT4: %ld\n", regs.HorizSyncStart);
- vga_wcrt (regbase, VGA_CRTC_H_SYNC_START, regs.
HorizSyncStart);
+ DPRINTK("CRT4: %ld\n", regs.HorizSyncStart);
+ vga_wcrt(regbase, VGA_CRTC_H_SYNC_START, regs.
HorizSyncStart);
tmp = regs.HorizSyncEnd % 32;
if (regs.HorizBlankEnd & 32)
tmp += 128;
- DPRINTK ("CRT5: %d\n", tmp);
- vga_wcrt (regbase, VGA_CRTC_H_SYNC_END, tmp);
+ DPRINTK("CRT5: %d\n", tmp);
+ vga_wcrt(regbase, VGA_CRTC_H_SYNC_END, tmp);
- DPRINTK ("CRT6: %ld\n", regs.VertTotal & 0xff);
- vga_wcrt (regbase, VGA_CRTC_V_TOTAL, (regs.VertTotal &
0xff));
+ DPRINTK("CRT6: %ld\n", regs.VertTotal & 0xff);
+ vga_wcrt(regbase, VGA_CRTC_V_TOTAL, (regs.VertTotal & 0xff)
);
tmp = 16; /* LineCompare bit #9 */
if (regs.VertTotal & 256)
@@ -1071,34 +1074,34 @@ static int cirrusfb_set_par_foo (struct
tmp |= 64;
if (regs.VertSyncStart & 512)
tmp |= 128;
- DPRINTK ("CRT7: %d\n", tmp);
- vga_wcrt (regbase, VGA_CRTC_OVERFLOW, tmp);
+ DPRINTK("CRT7: %d\n", tmp);
+ vga_wcrt(regbase, VGA_CRTC_OVERFLOW, tmp);
tmp = 0x40; /* LineCompare bit #8 */
if (regs.VertBlankStart & 512)
tmp |= 0x20;
if (var->vmode & FB_VMODE_DOUBLE)
tmp |= 0x80;
- DPRINTK ("CRT9: %d\n", tmp);
- vga_wcrt (regbase, VGA_CRTC_MAX_SCAN, tmp);
+ DPRINTK("CRT9: %d\n", tmp);
+ vga_wcrt(regbase, VGA_CRTC_MAX_SCAN, tmp);
- DPRINTK ("CRT10: %ld\n", regs.VertSyncStart & 0xff);
- vga_wcrt (regbase, VGA_CRTC_V_SYNC_START, (regs.
VertSyncStart & 0xff));
+ DPRINTK("CRT10: %ld\n", regs.VertSyncStart & 0xff);
+ vga_wcrt(regbase, VGA_CRTC_V_SYNC_START, regs.VertSyncStart
& 0xff);
- DPRINTK ("CRT11: 64+32+%ld\n", regs.VertSyncEnd % 16);
- vga_wcrt (regbase, VGA_CRTC_V_SYNC_END, (regs.VertSyncEnd %
16 + 64 + 32));
+ DPRINTK("CRT11: 64+32+%ld\n", regs.VertSyncEnd % 16);
+ vga_wcrt(regbase, VGA_CRTC_V_SYNC_END, regs.VertSyncEnd %
16 + 64 + 32);
- DPRINTK ("CRT12: %ld\n", regs.VertDispEnd & 0xff);
- vga_wcrt (regbase, VGA_CRTC_V_DISP_END, (regs.VertDispEnd &
0xff));
+ DPRINTK("CRT12: %ld\n", regs.VertDispEnd & 0xff);
+ vga_wcrt(regbase, VGA_CRTC_V_DISP_END, regs.VertDispEnd &
0xff);
- DPRINTK ("CRT15: %ld\n", regs.VertBlankStart & 0xff);
- vga_wcrt (regbase, VGA_CRTC_V_BLANK_START, (regs.
VertBlankStart & 0xff));
+ DPRINTK("CRT15: %ld\n", regs.VertBlankStart & 0xff);
+ vga_wcrt(regbase, VGA_CRTC_V_BLANK_START, regs.
VertBlankStart & 0xff);
- DPRINTK ("CRT16: %ld\n", regs.VertBlankEnd & 0xff);
- vga_wcrt (regbase, VGA_CRTC_V_BLANK_END, (regs.VertBlankEnd
& 0xff));
+ DPRINTK("CRT16: %ld\n", regs.VertBlankEnd & 0xff);
+ vga_wcrt(regbase, VGA_CRTC_V_BLANK_END, regs.VertBlankEnd &
0xff);
- DPRINTK ("CRT18: 0xff\n");
- vga_wcrt (regbase, VGA_CRTC_LINE_COMPARE, 0xff);
+ DPRINTK("CRT18: 0xff\n");
+ vga_wcrt(regbase, VGA_CRTC_LINE_COMPARE, 0xff);
tmp = 0;
if (var->vmode & FB_VMODE_INTERLACED)
@@ -1112,57 +1115,63 @@ static int cirrusfb_set_par_foo (struct
if (regs.VertBlankEnd & 512)
tmp |= 128;
- DPRINTK ("CRT1a: %d\n", tmp);
- vga_wcrt (regbase, CL_CRT1A, tmp);
+ DPRINTK("CRT1a: %d\n", tmp);
+ vga_wcrt(regbase, CL_CRT1A, tmp);
/* set VCLK0 */
/* hardware RefClock: 14.31818 MHz */
/* formula: VClk = (OSC * N) / (D * (1+P)) */
/* Example: VClk = (14.31818 * 91) / (23 * (1+1)) = 28.325
MHz */
- vga_wseq (regbase, CL_SEQRB, regs.nom);
+ vga_wseq(regbase, CL_SEQRB, regs.nom);
tmp = regs.den << 1;
if (regs.div != 0)
tmp |= 1;
+ /* 6 bit denom; ONLY 5434!!! (bugged me 10 days) */
if ((cinfo->btype == BT_SD64) ||
(cinfo->btype == BT_ALPINE) ||
(cinfo->btype == BT_GD5480))
- tmp |= 0x80; /* 6 bit denom; ONLY 5434!!! (bugged me
10 days) */
+ tmp |= 0x80;
- DPRINTK ("CL_SEQR1B: %ld\n", (long) tmp);
- vga_wseq (regbase, CL_SEQR1B, tmp);
+ DPRINTK("CL_SEQR1B: %ld\n", (long) tmp);
+ vga_wseq(regbase, CL_SEQR1B, tmp);
if (regs.VertRes >= 1024)
/* 1280x1024 */
- vga_wcrt (regbase, VGA_CRTC_MODE, 0xc7);
+ vga_wcrt(regbase, VGA_CRTC_MODE, 0xc7);
else
/* mode control: VGA_CRTC_START_HI enable, ROTATE(?),
16bit
* address wrap, no compat. */
- vga_wcrt (regbase, VGA_CRTC_MODE, 0xc3);
+ vga_wcrt(regbase, VGA_CRTC_MODE, 0xc3);
-/* HAEH? vga_wcrt (regbase, VGA_CRTC_V_SYNC_END, 0x20);
* previously: 0x00 unlock VGA_CRTC_H_TOTAL..CRT7 */
+/* HAEH? vga_wcrt(regbase, VGA_CRTC_V_SYNC_END, 0x20);
+ * previously: 0x00 unlock VGA_CRTC_H_TOTAL..CRT7 */
/* don't know if it would hurt to also program this if no
interlaced */
/* mode is used, but I feel better this way.. :-) */
if (var->vmode & FB_VMODE_INTERLACED)
- vga_wcrt (regbase, VGA_CRTC_REGS, regs.HorizTotal / 2);
+ vga_wcrt(regbase, VGA_CRTC_REGS, regs.HorizTotal / 2);
else
- vga_wcrt (regbase, VGA_CRTC_REGS, 0x00); /*
interlace control */
+ vga_wcrt(regbase, VGA_CRTC_REGS, 0x00); /* interlace
control */
- vga_wseq (regbase, VGA_SEQ_CHARACTER_MAP, 0);
+ vga_wseq(regbase, VGA_SEQ_CHARACTER_MAP, 0);
/* adjust horizontal/vertical sync type (low/high) */
- tmp = 0x03; /* enable display memory & CRTC I/O
address for color mode */
+ /* enable display memory & CRTC I/O address for color mode
*/
+ tmp = 0x03;
if (var->sync & FB_SYNC_HOR_HIGH_ACT)
tmp |= 0x40;
if (var->sync & FB_SYNC_VERT_HIGH_ACT)
tmp |= 0x80;
- WGen (cinfo, VGA_MIS_W, tmp);
+ WGen(cinfo, VGA_MIS_W, tmp);
- vga_wcrt (regbase, VGA_CRTC_PRESET_ROW, 0); /* Screen A
Preset Row-Scan register */
- vga_wcrt (regbase, VGA_CRTC_CURSOR_START, 0); /* text
cursor on and start line */
- vga_wcrt (regbase, VGA_CRTC_CURSOR_END, 31); /* text
cursor end line */
+ /* Screen A Preset Row-Scan register */
+ vga_wcrt(regbase, VGA_CRTC_PRESET_ROW, 0);
+ /* text cursor on and start line */
+ vga_wcrt(regbase, VGA_CRTC_CURSOR_START, 0);
+ /* text cursor end line */
+ vga_wcrt(regbase, VGA_CRTC_CURSOR_END, 31);
/******************************************************
*
@@ -1172,8 +1181,8 @@ static int cirrusfb_set_par_foo (struct
/* programming for different color depths */
if (var->bits_per_pixel == 1) {
- DPRINTK ("cirrusfb: preparing for 1 bit deep display\n")
;
- vga_wgfx (regbase, VGA_GFX_MODE, 0); /* mode
register */
+ DPRINTK("cirrusfb: preparing for 1 bit deep display\n");
+ vga_wgfx(regbase, VGA_GFX_MODE, 0); /* mode register
*/
/* SR07 */
switch (cinfo->btype) {
@@ -1184,71 +1193,85 @@ static int cirrusfb_set_par_foo (struct
case BT_PICASSO4:
case BT_ALPINE:
case BT_GD5480:
- DPRINTK (" (for GD54xx)\n");
- vga_wseq (regbase, CL_SEQR7,
+ DPRINTK(" (for GD54xx)\n");
+ vga_wseq(regbase, CL_SEQR7,
regs.multiplexing ?
bi->sr07_1bpp_mux : bi->sr07_1bpp);
break;
case BT_LAGUNA:
- DPRINTK (" (for GD546x)\n");
- vga_wseq (regbase, CL_SEQR7,
- vga_rseq (regbase, CL_SEQR7) & ~0x01);
+ DPRINTK(" (for GD546x)\n");
+ vga_wseq(regbase, CL_SEQR7,
+ vga_rseq(regbase, CL_SEQR7) & ~0x01);
break;
default:
- printk (KERN_WARNING "cirrusfb: unknown Board\n");
+ printk(KERN_WARNING "cirrusfb: unknown Board\n");
break;
}
/* Extended Sequencer Mode */
switch (cinfo->btype) {
case BT_SD64:
- /* setting the SEQRF on SD64 is not necessary (only
during init) */
- DPRINTK ("(for SD64)\n");
- vga_wseq (regbase, CL_SEQR1F, 0x1a); /* MCLK
select */
+ /* setting the SEQRF on SD64 is not necessary
+ * (only during init)
+ */
+ DPRINTK("(for SD64)\n");
+ /* MCLK select */
+ vga_wseq(regbase, CL_SEQR1F, 0x1a);
...
[truncated message content] |
|
From: Bryan Wu <coo...@ke...> - 2008-04-25 03:29:31
|
|
From: Bryan Wu <coo...@ke...> - 2008-04-25 03:29:32
|
From: Mike Frysinger <vap...@gm...> Signed-off-by: Mike Frysinger <vap...@gm...> Signed-off-by: Bryan Wu <coo...@ke...> --- drivers/video/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 1bd5fb3..682eb61 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -546,7 +546,7 @@ config FB_VGA16 config FB_BF54X_LQ043 tristate "SHARP LQ043 TFT LCD (BF548 EZKIT)" - depends on FB && (BF54x) + depends on FB && (BF54x) && !BF542 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT -- 1.5.5 |