summaryrefslogtreecommitdiff
path: root/drivers/video/geode/lxfb_ops.c
AgeCommit message (Collapse)Author
2010-12-01lxfb: Maintain video processor palette through suspend/resumeDaniel Drake
The Geode X driver uses both of the LX's palettes, one for gamma correction and one for colormaps. The kernel driver currently only backs up the one used for colormaps during suspend/resume. If you mess with gamma settings and do a suspend/resume, colors go funny. Fix this by backing up the video proc palette during suspend/resume, alongside the display controller one which is already handled. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-17lxfb: Program panel v/h sync output polarity correctlyDaniel Drake
Commit b5c26f97ec4a17c65 introduced some breakage for the OLPC XO-1 laptop, differences in the output video signal after the patch caused some problems with the XO's display controller chip. Reviewing of that commit against the AMD Geode LX Data Book, it seems that these bits were being set inversely. In both cases, active high output is denoted by a value of 0. See section 6.8.3.44 of the databook from February 2009 (Publication ID: 33234H) Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-24lxfb: set the H- and V-SYNC polarity of the flatpanel outputMichael Grzeschik
Fixup for the flatpanel output. The geode_modedb attribute flags are used to set the SYNC polarity of the flatpanel. Without this patch our flatpanel registers stayed unconfigured, so we just saw garbage output. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Cc: Andres Salomon <dilinger@collabora.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15cs5535: define lxfb/gxfb MSRs in linux/cs5535.hAndres Salomon
..and include them in the lxfb/gxfb drivers rather than asm/geode.h (where possible). Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Cc: Jordan Crouse <jordan@cosmicpenguin.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Chris Ball <cjb@laptop.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15cs5535: move VSA2 checks into linux/cs5535.hAndres Salomon
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Cc: Jordan Crouse <jordan@cosmicpenguin.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Chris Ball <cjb@laptop.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24lxfb: fix console blankingJordan Crouse
Simply enabling DAC blanking without turning off the CRT seems to be resulting in characters remaining on the screen when the monitor blanks. This patch turns off the CRT for all modes, and also powers down the DACs when vsync and/or hsync are disabled. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Acked-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-14fix "lxfb: extend PLL table to support dotclocks below 25 MHz"Jens Rottmann
The following patch caused a regression with OLPC panels: commit 3888d4639e78802c4ec1086127124e890461b9e4 lxfb: extend PLL table to support dotclocks below 25 MHz Extends the PLL frequency table of the AMD Geode-LX frame buffer driver to make use of the DIV4 bit, thus adding support for dotclocks between 6 and 25 MHz. These are needed for small LCDs (e.g. 320x240). Also inserts some intermediate steps between pre-existing frequencies. The problem was the insertion of intermediate steps into the frequency table; they would cause the wrong frequency to be matched. This patch drops those intermediate frequencies while keeping the sub-25MHz frequencies. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Jens Rottmann <JRottmann@LiPPERT-AT.de> Tested-by: Andres Salomon <dilinger@debian.org> Acked-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28gxfb/lxfb: detect framebuffer size using an MSR if VSA2 isn't availableAndres Salomon
If there's no VSA2 (ie, if we're using tinybios or OpenFirmware), use the GLIU's P2D Range Offset Descriptor to determine how much memory we have available for the framebuffer. Originally based on a patch by Jordan Crouse. Tested with OpenFirmware; Pascal informs me that tinybios has a stub that fills in P2D_RO0. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28gxfb/lxfb: use VSA definitions when fetching framebuffer sizeAndres Salomon
..Rather than using magic constants. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28lxfb/gxfb: when blanking with FB_BLANK_POWERDOWN, also turn off the CRTAndres Salomon
The Display Control's CRT_EN can be shut off when we enter FB_BLANK_POWERDOWN in an attempt to save additional power. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28lxfb: add power management functionalityAndres Salomon
This adds the ability to suspend/resume the lxfb driver, which includes: - Register and palette saving code; registers are stored in lxfb_par. A few MSR values are saved as well. - lx_powerup and lx_powerdown functions which restore/save registers and enable/disable graphic engines. - lxfb_suspend/lxfb_resume Originally based on a patch by Jordan Crouse. [akpm@linux-foundation.org: be conventional, save an ifdef] Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28lxfb: rearrange/rename MSR bitfieldsAndres Salomon
Finally, move the MSR bitfields around in lxfb.h, and rename them. Alas, most of that crap appears to be undocumented. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28lxfb: clean up register definitionsAndres Salomon
- Rename various bitfield defines to match the data sheet names. - Rename DF_ register definitions to VP_ to match the data sheet; ie, DF_PAR -> VP_PAR. - for GP/DC registers, rather than defining to specific addresses, use an enum to number them sequentially and just multiply by 4 (bytes) to access them (in read_*/write_* functions). - for VP/FP registers, use an enum and multiple by 8 (bytes). They're 64bit registers. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28lxfb: create GP/DC/VP/FP-specific handlers rather than using readl/writelAndres Salomon
This creates read_gp/write_gp, read_dc/write_dc, read_vp/write_vp, and read_fp/write_fp for reading and updating those registers. Note that we don't follow the 'DF' naming; those will be renamed to VP shortly. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28lxfb: extend PLL table to support dotclocks below 25 MHzJens Rottmann
Extends the PLL frequency table of the AMD Geode-LX frame buffer driver to make use of the DIV4 bit, thus adding support for dotclocks between 6 and 25 MHz. These are needed for small LCDs (e.g. 320x240). Also inserts some intermediate steps between pre-existing frequencies. Signed-off-by: Jens Rottmann <JRottmann@LiPPERT-AT.de> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28x86: geode: MSR cleanupAndres Salomon
This cleans up a few MSR-using drivers in the following manner: - Ensures MSRs are all defined in asm/geode.h, rather than in misc places - Makes the naming consistent; cs553[56] ones begin with MSR_, GX-specific ones start with MSR_GX_, and LX-specific ones start with MSR_LX_. Also, make the names match the data sheet. - Use MSR names rather than numbers in source code - Document the fact that the LX's MSR_PADSEL has the wrong value in the data sheet. That's, uh, good to note. Signed-off-by: Andres Salomon <dilinger@debian.org> Acked-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-31lxfb: GEODE: Add framebuffer support for the AMD Geode LXJordan Crouse
Add framebuffer support for the AMD Geode LX graphics engine. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>