Jan Kara [Mon, 28 Apr 2008 09:16:14 +0000 (02:16 -0700)]
ext3: fix mount messages when quota disabled
When quota is disabled, we should not print 'journaled quota not supported'
when user tried to mount non-journaled quota. Also fix typo in the message.
Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ext3: retry block allocation if new blocks are allocated from system zone
If the block allocator gets blocks out of system zone ext3 calls ext3_error.
But if the file system is mounted with errors=continue retry block allocation.
We need to mark the system zone blocks as in use to make sure retry don't
pick them again
System zone is the block range mapping block bitmap, inode bitmap and inode
table.
[akpm@linux-foundation.org: fix typo in comment] Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara [Mon, 28 Apr 2008 09:16:13 +0000 (02:16 -0700)]
ext3: fix hang on umount with quotas when journal is aborted
Call dquot_drop() from ext3_dquot_drop() even if we fail to start a
transaction. Otherwise we never get to dropping references to quota
structures from the inode and umount will hang indefinitely. Thanks to
Payphone LIOU for spotting the problem.
Signed-off-by: Jan Kara <jack@suse.cz> Cc: Payphone LIOU <lioupayphone@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara [Mon, 28 Apr 2008 09:16:12 +0000 (02:16 -0700)]
ext3: fix update of mtime and ctime on rename
Make ext3 update mtime and ctime of the directory into which we move file even
if the directory entry already exists.
Signed-off-by: Jan Kara <jack@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Josef Bacik [Mon, 28 Apr 2008 09:16:12 +0000 (02:16 -0700)]
jbd: fix possible journal overflow issues
There are several cases where the running transaction can get buffers added to
its BJ_Metadata list which it never dirtied, which makes its t_nr_buffers
counter end up larger than its t_outstanding_credits counter.
This will cause issues when starting new transactions as while we are logging
buffers we decrement t_outstanding_buffers, so when t_outstanding_buffers goes
negative, we will report that we need less space in the journal than we
actually need, so transactions will be started even though there may not be
enough room for them. In the worst case scenario (which admittedly is almost
impossible to reproduce) this will result in the journal running out of space.
The fix is to only
refile buffers from the committing transaction to the running transactions
BJ_Modified list when b_modified is set on that journal, which is the only way
to be sure if the running transaction has modified that buffer.
This patch also fixes an accounting error in journal_forget, it is possible
that we can call journal_forget on a buffer without having modified it, only
gotten write access to it, so instead of freeing a credit, we only do so if
the buffer was modified. The assert will help catch if this problem occurs.
Without these two patches I could hit this assert within minutes of running
postmark, with them this issue no longer arises. Thank you,
Signed-off-by: Josef Bacik <jbacik@redhat.com> Cc: <linux-ext4@vger.kernel.org> Acked-by: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Josef Bacik [Mon, 28 Apr 2008 09:16:10 +0000 (02:16 -0700)]
jbd: fix the way the b_modified flag is cleared
Currently at the start of a journal commit we loop through all of the buffers
on the committing transaction and clear the b_modified flag (the flag that is
set when a transaction modifies the buffer) under the j_list_lock.
The problem is that everywhere else this flag is modified only under the jbd
lock buffer flag, so it will race with a running transaction who could
potentially set it, and have it unset by the committing transaction.
This is also a big waste, you can have several thousands of buffers that you
are clearing the modified flag on when you may not need to. This patch
removes this code and instead clears the b_modified flag upon entering
do_get_write_access/journal_get_create_access, so if that transaction does
indeed use the buffer then it will be accounted for properly, and if it does
not then we know we didn't use it.
That will be important for the next patch in this series. Tested thoroughly
by myself using postmark/iozone/bonnie++.
Signed-off-by: Josef Bacik <jbacik@redhat.com> Cc: <linux-ext4@vger.kernel.org> Acked-by: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ext3: fdatasync should skip metadata writeout when overwriting
Currently fdatasync is identical to fsync in ext3.
I think fdatasync should skip journal flush in data=ordered and
data=writeback mode when it overwrites to already-instantiated blocks on
HDD. When I_DIRTY_DATASYNC flag is not set, fdatasync should skip journal
writeout because this indicates only atime or/and mtime updates.
Following patch is the same approach of ext2's fsync code(ext2_sync_file).
I did a performance test using the sysbench.
#sysbench --num-threads=128 --max-requests=50000 --test=fileio --file-total-size=128G
--file-test-mode=rndwr --file-fsync-mode=fdatasync run
The result on ext3 was:
-2.6.24
Operations performed: 0 Read, 50080 Write, 59600 Other = 109680 Total
Read 0b Written 782.5Mb Total transferred 782.5Mb (12.116Mb/sec)
775.45 Requests/sec executed
Test execution summary:
total time: 64.5814s
total number of events: 50080
total time taken by event execution: 3713.9836
per-request statistics:
min: 0.0000s
avg: 0.0742s
max: 0.9375s
approx. 95 percentile: 0.2901s
Threads fairness:
events (avg/stddev): 391.2500/23.26
execution time (avg/stddev): 29.0155/1.99
-2.6.24-patched
Operations performed: 0 Read, 50009 Write, 61596 Other = 111605 Total
Read 0b Written 781.39Mb Total transferred 781.39Mb (16.419Mb/sec)
1050.83 Requests/sec executed
Test execution summary:
total time: 47.5900s
total number of events: 50009
total time taken by event execution: 2934.5768
per-request statistics:
min: 0.0000s
avg: 0.0587s
max: 0.8938s
approx. 95 percentile: 0.1993s
Threads fairness:
events (avg/stddev): 390.6953/22.64
execution time (avg/stddev): 22.9264/1.17
Filesystem I/O throughput was improved.
Signed-off-by :Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp> Acked-by: Jan Kara <jack@suse.cz> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ext2: retry block allocation if new blocks are allocated from system zone
If the block allocator gets blocks out of system zone ext2 calls ext2_error.
But if the file system is mounted with errors=continue retry block allocation.
We need to mark the system zone blocks as in use to make sure retry don't
pick them again
System zone is the block range mapping block bitmap, inode bitmap and inode
table.
[akpm@linux-foundation.org: fix typo in comment] Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Andrew [Mon, 28 Apr 2008 09:15:55 +0000 (02:15 -0700)]
raid: remove leading TAB on printk messages
MD drivers use one printk() call to print 2 log messages and the second line
may be prefixed by a TAB character. It may also output a trailing space
before newline. klogd (I think) turns the TAB character into the 2 characters
'^I' when logging to a file. This looks ugly.
Instead of a leading TAB to indicate continuation, prefix both output lines
with 'raid:' or similar. Also remove any trailing space in the vicinity of
the affected code and consistently end the sentences with a period.
Signed-off-by: Nick Andrew <nick@nick-andrew.net> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Williams [Mon, 28 Apr 2008 09:15:54 +0000 (02:15 -0700)]
md: raid5.c convert simple_strtoul to strict_strtoul
strict_strtoul handles the open-coded sanity checks in
raid5_store_stripe_cache_size and raid5_store_preread_threshold
Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Williams [Mon, 28 Apr 2008 09:15:53 +0000 (02:15 -0700)]
md: introduce get_priority_stripe() to improve raid456 write performance
Improve write performance by preventing the delayed_list from dumping all its
stripes onto the handle_list in one shot. Delayed stripes are now further
delayed by being held on the 'hold_list'. The 'hold_list' is bypassed when:
* a STRIPE_IO_STARTED stripe is found at the head of 'handle_list'
* 'handle_list' is empty and i/o is being done to satisfy full stripe-width
write requests
* 'bypass_count' is less than 'bypass_threshold'. By default the threshold
is 1, i.e. every other stripe handled is a preread stripe provided the
top two conditions are false.
Changes since v1:
* reduce bypass_threshold from (chunk_size / sectors_per_chunk) to (1) and
make it configurable. This defaults to fairness and modest performance
gains out of the box.
Changes since v2:
* [neilb@suse.de]: kill STRIPE_PRIO_HI and preread_needed as they are not
necessary, the important change was clearing STRIPE_DELAYED in
add_stripe_bio and this has been moved out to make_request for the hang
fix.
* [neilb@suse.de]: simplify get_priority_stripe
* [dan.j.williams@intel.com]: reset the bypass_count when ->hold_list is
sampled empty (+11%)
* [dan.j.williams@intel.com]: decrement the bypass_count at the detection
of stripes being naturally promoted off of hold_list +2%. Note, resetting
bypass_count instead of decrementing on these events yields +4% but that is
probably too aggressive.
Changes since v3:
* cosmetic fixups
Tested-by: James W. Laferriere <babydr@baby-dragons.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harvey Harrison [Mon, 28 Apr 2008 09:15:50 +0000 (02:15 -0700)]
md: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harvey Harrison [Mon, 28 Apr 2008 09:15:49 +0000 (02:15 -0700)]
md: fix integer as NULL pointer warnings in md.c
drivers/md/md.c:734:16: warning: Using plain integer as NULL pointer
drivers/md/md.c:1115:16: warning: Using plain integer as NULL pointer
Add some braces to match the else-block as well.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harvey Harrison [Mon, 28 Apr 2008 09:15:47 +0000 (02:15 -0700)]
video: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Antonino Daplas <adaplas@gmail.com> Cc: Antonino A. Daplas <adaplas@gmail.com> Cc: Antonino Daplas <adaplas@pol.net> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jean Delvare <khali@linux-fr.org> Cc: Adrian Bunk <bunk@stusta.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fbdev: intelfb: add support for the Intel Integrated Graphics Controller 965G/965GM
Add support for the 965G and 965GM graphic chipsets to the intelfb driver. I
have a notebook with an Intel Mobile GM965/GL960 Integrated Graphics
Controller and with the attached patch the framebuffer comes up. I have
tested it a bit with DirectFB to make sure it is working stable.
I also have an Intel Mobile GM945 and I compared the results, the programming
interface of the 9xx series from Intel is mostly the same, so I think the
patch should add all the functionality which the 945GM has.
Signed-off-by: Maik Broemme <mbroemme@plusserver.de> Cc: Dave Airlie <airlied@linux.ie> Cc: Antonino Daplas <adaplas@pol.net> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Note: looks like accesses to "registered_fb" are done without any exclusion
so there're none in new proc code, too. This should be fixed in separate
patch.
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.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>
This patch is a bugfix for the use of cfb_* functions instead of sys_*
functions. sys_* should be used with vmalloced framebuffers. the previous
cfb_ use would not work for callers of imageblit/etc.
York Sun [Mon, 28 Apr 2008 09:15:36 +0000 (02:15 -0700)]
powerpc: Add DIU platform code for MPC8610HPCD
Add platform code to support Freescale DIU. The platform code includes
framebuffer memory allocation, pixel format, monitor port, etc.
Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Timur Tabi <timur@freescale.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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>
York Sun [Mon, 28 Apr 2008 09:15:34 +0000 (02:15 -0700)]
fbdev: powerpc: driver for Freescale 8610 and 5121 DIU
The following features are supported:
plane 0 works as a regular frame buffer, can be accessed by /dev/fb0
plane 1 has two AOIs (area of interest), can be accessed by /dev/fb1 and /dev/fb2
plane 2 has two AOIs, can be accessed by /dev/fb3 and /dev/fb4
Special ioctls support AOIs
All /dev/fb* can be used as regular frame buffer devices, except hardware
change can only be made through /dev/fb0. Changing pixel clock has no effect
on other fbs.
Limitation of usage of AOIs:
AOIs on the same plane can not be horizonally overlapped
AOIs have horizonal order, i.e. AOI0 should be always on top of AOI1
AOIs can not beyond phisical display area. Application should check AOI geometry
before changing physical resolution on /dev/fb0
required command line parameters to preallocate memory for frame buffer diufb.
optional command line parameters to set modes and monitor
video=fslfb:[resolution][,bpp][,monitor]
Syntax:
Resolution
xres x yres-bpp@refresh_rate, the -bpp and @refresh_rate are optional
eg, 1024x768, 1280x1024, 1280x1024-32, 1280x1024@60, 1280x1024-32@60, 1280x480-32@60
Bpp
bpp=32, bpp=24, or bpp=16
Monitor
monitor=0, monitor=1, monitor=2
0 is DVI
1 is Single link LVDS
2 is Double link LVDS
Note: switching monitor is a board feather, not DIU feather. MPC8610HPCD has three
monitor ports to swtich to. MPC5121ADS doesn't have additional monitor port. So switching
monirot port for MPC5121ADS has no effect.
If compiled as a module, it takes pamameters mode, bpp, monitor with the same syntax above.
Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Timur Tabi <timur@freescale.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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>
Andres Salomon [Mon, 28 Apr 2008 09:15:31 +0000 (02:15 -0700)]
OLPC: gxfb/lxfb: add DCON panel modes to framebuffer drivers
Since there's no way to autodetect panel modes, we're forced to hardcode them
in the driver and add a big fat #ifdef. The OLPC DCON needs a specific mode
line (at 1200x900). This adds it to both gxfb and lxfb.
(Jordan said: We could probably detect the panel mode, but there isn't any
reason to since the panel timings are well known and won't change. While OFW
detection would be good computer science fu, it would be a wasted effort since
its so easy to hard code them into the table.)
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>
Andres Salomon [Mon, 28 Apr 2008 09:15:30 +0000 (02:15 -0700)]
gxfb/lxfb: detect framebuffer size using an MSR if VSA2 isn't available
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>
Andres Salomon [Mon, 28 Apr 2008 09:15:27 +0000 (02:15 -0700)]
lxfb: add power management functionality
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>
Andres Salomon [Mon, 28 Apr 2008 09:15:24 +0000 (02:15 -0700)]
lxfb: clean up register definitions
- 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>
Andres Salomon [Mon, 28 Apr 2008 09:15:24 +0000 (02:15 -0700)]
lxfb: create GP/DC/VP/FP-specific handlers rather than using readl/writel
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>
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.
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>
Nicolas Ferre [Mon, 28 Apr 2008 09:15:21 +0000 (02:15 -0700)]
atmel_lcdfb: adjust fifo size for at91sam9rl
AT91SAM9RL soc has a 2048 bytes deep FIFO, like AT91SAM9263.
[bn@niasdigital.com: fix build breakage in atmel_lcdfb] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Nicolas FERRE <nicolas.ferre@rfo.atmel.com> Cc: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nicolas Ferre [Mon, 28 Apr 2008 09:15:21 +0000 (02:15 -0700)]
atmel_lcdfb: wiring BGR to RGB color mode
Adds different wiring mode for the LCD screen.
The legacy atmel LCDC IP uses a non standard color mode, "BGR-555.1" instead
"RGB-565". The major part of graphic stacks for embedded systems uses only
"RGB-565". It is possible to swap LCD IOs instead of doing this bit swapping
by software (See application note AT91SAM9 LCD Controller
http://www.atmel.com/dyn/resources/prod_documents/doc6300.pdf)
This wire swapping is done on the at91sam9rl-ek board (board code
using this patch will come later).
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andrew Victor <avictor.za@gmail.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>
David Brownell [Mon, 28 Apr 2008 09:15:20 +0000 (02:15 -0700)]
atmel_lcdfb: suspend/resume support
Teach atmel_lcdfb driver how to suspend/resume.
Note that the backlight control should probably do more of the same stuff:
turning off display power (more than just the backlight) and stopping the
clocks (and dma to drive the no-longer-seen display). No point in wasting
power to generate images that can't be observed, after all...
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andrew Victor <avictor.za@gmail.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>
atmel_lcdfb: don't initialize a pre-allocated framebuffer
If the user specified a fixed framebuffer address on the command line, it may
have been initialized already with a splash image or something, so we
shouldn't clear it.
Therefore, we should only initialize the framebuffer if we allocated it
ourselves. This patch also updates the AVR32 setup code to clear the
framebuffer if it allocated it itself, i.e. the user didn't provide a fixed
address or the reservation failed.
I've updated the at91 platform code as well so that it initializes the
framebuffer if it is located in SRAM, but I haven't tested that it actually
works.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Nicolas FERRE <nicolas.ferre@rfo.atmel.com> Cc: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean Delvare [Mon, 28 Apr 2008 09:15:16 +0000 (02:15 -0700)]
savagefb: speed up the I2C bus
There is no reason to drive the savagefb I2C bus at such a low speed, so bump
it from 12.5 kbps to 50 kbps. The Intel (i810) and Matrox framebuffer drivers
already run their I2C bus at this speed, and so are the legacy i2c-savage4 and
i2c-prosavage drivers.
Signed-off-by: Jean Delvare <khali@linux-fr.org> 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>
uvesafb: don't treat valid modes returned byfb_find_mode() as errors
Don't treat valid modes returned by fb_find_mode() (best-fit modes, default
modes or the first valid mode) as errors.
Currently, when fb_find_mode() finds a valid mode belonging to one of the
above-mentioned classes, uvesafb will ignore it and will try to set a 640x480
video mode. The expected behaviour (introduced by this patch) would be to use
the valid mode returned by fb_find_mode() instead.
Signed-off-by: Michal Januszewski <spock@gentoo.org> 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>
Jean Delvare [Mon, 28 Apr 2008 09:15:14 +0000 (02:15 -0700)]
radeonfb: speed up the I2C buses
There is no reason to drive the radeon I2C buses at such a low speed, so bump
it from 12.5 kbps to 50 kbps. The Intel (i810) and Matrox framebuffer drivers
already run their I2C bus at this speed.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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>
Jean Delvare [Mon, 28 Apr 2008 09:15:12 +0000 (02:15 -0700)]
radeonfb: fix debug option
Fix CONFIG_FB_RADEON_DEBUG. DEBUG must be defined before including any kernel
header, otherwise dev_dbg() resolves to a no-op. Also, when debugging is
disabled, don't set DEBUG at all instead of setting it to 0, to comply with
what the kernel headers expect.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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>
Krzysztof Helt [Mon, 28 Apr 2008 09:15:10 +0000 (02:15 -0700)]
fbdev: add removed option "mode" to keep compatibility
Add removed option "mode" to keep compatibility with existing setups. The
option is back for pm2fb, tridentfb and vt8623fb drivers.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> 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>
Krzysztof Helt [Mon, 28 Apr 2008 09:15:09 +0000 (02:15 -0700)]
s3fb: add option mode_option
Add the option "mode_option". It also moves mtrr variable to devinitdata
section.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> 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>
Krzysztof Helt [Mon, 28 Apr 2008 09:15:08 +0000 (02:15 -0700)]
arkfb: add option mode_option
Add the option "mode_option". This is one step toward changing all fb
drivers to have common "mode_option" parameter.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> 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>
Krzysztof Helt [Mon, 28 Apr 2008 09:15:08 +0000 (02:15 -0700)]
vt8623fb: change option mode to mode_option
Change the option "mode" into "mode_option".
This is one step toward changing all fb drivers to have common "mode_option"
parameter.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> 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>
Krzysztof Helt [Mon, 28 Apr 2008 09:15:07 +0000 (02:15 -0700)]
update modedb.txt documentation about mode_option parameter change
Add names of drivers converted to "mode_option" parameter.
This is one step toward changing all fb drivers to have common "mode_option"
parameter.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> 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>
Krzysztof Helt [Mon, 28 Apr 2008 09:15:07 +0000 (02:15 -0700)]
pm3fb: change option mode to mode_option
Add the option "mode_option".
This is one step toward changing all fb drivers to have common "mode_option"
parameter.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> 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>
Andres Salomon [Mon, 28 Apr 2008 09:15:03 +0000 (02:15 -0700)]
PM/gxfb: add hook to PM console layer that allows disabling of suspend VT switch
Prior to suspend, we allocate and switch to a new VT; after suspend, we switch
back to the original VT. This can be slow, and is completely unnecessary if
the framebuffer we're using can restore video properly.
This adds a hook that allows drivers to select whether or not to do this vt
switch, and changes the gxfb driver to call this hook. It also adds a module
param to gxfb to allow controlling of the vt switch (defaulting to no switch).
(Note: I'm not convinced that console_sem is the best way to protect this, but
we should probably have some form of locking..)
[akpm@linux-foundation.org: build fix] Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andres Salomon [Mon, 28 Apr 2008 09:15:02 +0000 (02:15 -0700)]
gxfb: add power management functionality
This adds the ability to suspend/resume the gxfb driver, which includes:
- The addition of a Graphics Processor register table in gxfb.h, and
associated GP handling.
- Register and palette saving code; registers are stored in gxfb_par.
A few MSR values are saved as well.
- gx_powerup and gx_powerdown functions which restore/save registers and
enable/disable graphic engines.
- gxfb_suspend/gxfb_resume
Originally based on a patch by Jordan Crouse.
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>
Andres Salomon [Mon, 28 Apr 2008 09:15:01 +0000 (02:15 -0700)]
gxfb: stop sharing code with gx1fb
We want to stop sharing stuff with gx1fb; it makes little sense. There were
fields in geodefb_par that weren't being used, there was little point to the
DC/VP ops callbacks, etc. This implements the following:
- Create gxfb_par (based on geodefb_par), place it in gxfb.h
- Drop display_gx.h and video_gx.h. The last few patches moved most
stuff into gxfb.h anyways, so there was very little left.
- Drop the geode_{dc,vid}_ops stuff. Un-static functions, add
declarations to gxfb.h.
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>
Andres Salomon [Mon, 28 Apr 2008 09:14:59 +0000 (02:14 -0700)]
gxfb: clean up register definitions
This does the following in preparation for register saving:
- moves the register definitions from video_gx.h and display_gx.h into
gxfb.h.
- renames GX_* registers to match their section (ie, VP_).
- renames register bitfields to match the data sheet (ie,
DC_DCFG_TGEN -> DC_DISPLAY_CFG_TGEN).
- for 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_dc/write_dc).
- for VP and FP registers, use an enum and multiple by 8 (bytes). They're
64bit registers.
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>
Andres Salomon [Mon, 28 Apr 2008 09:14:57 +0000 (02:14 -0700)]
gxfb: replace FBSIZE config option with a module parameter
Use a command line option (vram) rather than hardcoding the vram size. LxFB
already does this; it's useful for machines that can't query the BIOS for fb
size. This patch originated from David Woodhouse, was modified by Jordan
Crouse, and was then modified further by me.
This also adds some gxfb documentation in Documentation/fb.
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>
Jordan Crouse [Mon, 28 Apr 2008 09:14:55 +0000 (02:14 -0700)]
gxfb: set the right registers to tweak the sync polarity
While running in flatpanel mode it is important to change the FP sync bits (VG
register 0x408) rather then the CRT sync bits (VG register 0x008). This patch
keeps the CRT sync bits at default when a flatpanel exists.
Note that this also fixes inverted logic; we want CRT_VSYNC_POL to be set (ie,
vsync is normally high) when FB_SYNC_VERT_HIGH_ACT is unset.
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andres Salomon <dilinger@debian.org> 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>
Andres Salomon [Mon, 28 Apr 2008 09:14:54 +0000 (02:14 -0700)]
x86: GEODE: add Virtual Systems Architecture detection
This is generic VSA2 detection. It's used by OLPC to determine whether or not
the BIOS contains VSA2, but since other BIOSes are coming out that don't use
the VSA (ie, tinybios), it might end up being useful for others.
Signed-off-by: Andres Salomon <dilinger@debian.org> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andres Salomon [Mon, 28 Apr 2008 09:14:53 +0000 (02:14 -0700)]
x86: geode: MSR cleanup
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>
Harvey Harrison [Mon, 28 Apr 2008 09:14:53 +0000 (02:14 -0700)]
fbcon: replace mono_col macro with static inline
Use __u32 for max_len to match the declaration of length in the struct
fb_bitfield.
Suppresses sparse shadowed variable warnings from the nested max()
macros:
drivers/video/console/fbcon.h:130:8: warning: symbol '_x' shadows an earlier one
drivers/video/console/fbcon.h:130:8: originally declared here
drivers/video/console/fbcon.h:130:8: warning: symbol '_x' shadows an earlier one
drivers/video/console/fbcon.h:130:8: originally declared here
drivers/video/console/fbcon.h:130:8: warning: symbol '_y' shadows an earlier one
drivers/video/console/fbcon.h:130:8: originally declared here
[akpm@linux-foundation.org: fix constness] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.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>
Krzysztof Helt [Mon, 28 Apr 2008 09:14:51 +0000 (02:14 -0700)]
pm2fb: correct error values returned from probe function
Fix error values returned in some code branches in the pm2fb_probe() function.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> 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>