safe/jmp/linux-2.6
16 years agotgafb: remove a redundant non-mono test in mono imageblit
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:57 +0000 (01:29 -0700)]
tgafb: remove a redundant non-mono test in mono imageblit

There is a test in tgafb_mono_imageblit() for a colour image with a fall-back
to cfb_imageblit().  The test is not necessary as the only caller, which is
tgafb_imageblit(), checks it too and only invokes this function for monochrome
images.  It looks like a left-over from before some changes to
tgafb_imageblit().

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Jay Estabrook <Jay.Estabrook@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotgafb: fix an out-of-range shift in mono imageblit
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:56 +0000 (01:29 -0700)]
tgafb: fix an out-of-range shift in mono imageblit

The pixel mask calculation in tgafb_mono_imageblit() uses a variable
left-shift on a 32-bit data type by up to 32.  Shifting by the width of a data
type or more produces an unpredictable result according to the C standard.

Rather than widening the data type this fix makes sure the count is between 0
and 31.  The reason is not to penalise 32-bit platforms with operation on a
"long long" type for a marginal case that is meant not to happen (blitting an
image of a zero width).

The reason it has escaped for so long is the Alpha, being purely 64-bit, :-)
does not mask the shift out to 32 bits.  This is a valid implementation --
producing the correct result certainly falls within "unpredictable behaviour".
 It does trigger on MIPS though and it is the recent merge of the TC support
which only enabled the driver for use on anything other than the Alpha.  For
MIPS when the width is 32 the mask ends up being 0 rather than 0xffffffff as
it should be and the frame buffer is not updated.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Jay Estabrook <Jay.Estabrook@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbcon: delay the start of the cursor timer until a con_switch()
Antonino Daplas [Tue, 16 Oct 2007 08:29:55 +0000 (01:29 -0700)]
fbcon: delay the start of the cursor timer until a con_switch()

As reported in Bugzilla Bug 9093, upon switching to X, a small rectangular
cursor can still be seen blinking in the upper left part of the screen.  It is
fbcon's text cursor.  This is caused by a strange ioctl(..., KDSETMODE,
KD_TEXT) call done by something in userspace, perhaps by X itself, while the
tty is still in graphics mode.  And when the tty is in KD_TEXT mode, the
cursor timer is restarted.

Although this is a userspace problem, we can work around it by delaying the
restart of the cursor timer until an fbcon_switch() is called.  In other
words, the cursor timer will not be restarted even if a KD_TEXT mode switch is
requested.

Regression potential: Present but low

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>
16 years agofbdev: copyarea function taught to fully support swapped pixel order in byte
Pavel Pisa [Tue, 16 Oct 2007 08:29:55 +0000 (01:29 -0700)]
fbdev: copyarea function taught to fully support swapped pixel order in byte

This correct case, when source and destination X coordinates difference is n
multiple of pixels in byte.  This is probably rare case, but this case should
supported for completeness.

Reorganization of FB_READL and FB_WRITEL calls results in code size decrease
for normal build without swapping support and size with support enabled is
reasonable too.

[adaplas]
Add missing fb_rev_pixels_in_long() prototype.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agos3fb: do not allow incorrect pixclock settings
Krzysztof Helt [Tue, 16 Oct 2007 08:29:54 +0000 (01:29 -0700)]
s3fb: do not allow incorrect pixclock settings

This patch adds check if selected pixclock is valid (is in the PLL range).

Previously, if the pixclock could not be set, the new mode resolution was set
but pixclock was not set which led to incorrect timings sent to monitor.

[adaplas]
Fixed a few misplaced curly braces.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agosvgalib: mode selection updates
Ondrej Zajicek [Tue, 16 Oct 2007 08:29:52 +0000 (01:29 -0700)]
svgalib: mode selection updates

This patch changes mode selection matching algorithm.  It allows to choose
mode with matching depth even when requested color lengths are greater than
color lengths of every mode with requested color depth.

It also fixes bug in s3fb - wrong error value returned when format is not
supported by chip.

Signed-off-by: Ondrej Zajicek <santiago@crfreenet.org>
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>
16 years agops3fb: default to 480p on DVI-D/HDMI if video=safe
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:52 +0000 (01:29 -0700)]
ps3fb: default to 480p on DVI-D/HDMI if video=safe

Default to the 480p video mode on DVI-D and HDMI displays if `video=safe' is
passed on the kernel command line.

This is intended to be used by `kboot'-style boot loaders (i.e. first-stage
kernels) for the PS3, to provide a failsafe video mode.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agofb: move and rename extern declaration for global_mode_option
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:51 +0000 (01:29 -0700)]
fb: move and rename extern declaration for global_mode_option

Move the extern declaration for global_mode_option to <linux/fb.h> and rename
the variable to fb_mode_option.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: enhance horizontal panning on firmware 1.90 and up
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:51 +0000 (01:29 -0700)]
ps3fb: enhance horizontal panning on firmware 1.90 and up

ps3fb: Enhance horizontal panning on firmware 1.90 and up:
  - On firmware 1.90 and up, L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT supports copying
    rectangles from XDR to DDR memory with different source and destination
    line lengths. Hence larger horizontal virtual resolutions can be supported
    (up to 16368 pixels).
  - As the actual frame buffer memory layout no longer matches the entries in
    ps3fb_res[], create fake struct ps3fb_ioctl_res data for the
    PS3FB_IOCTL_SCREENINFO ioctl, so user space applications that depend on it
    keep on working.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: add virtual screen and panning support
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:50 +0000 (01:29 -0700)]
ps3fb: add virtual screen and panning support

ps3fb: Add virtual screen and panning support:
  - The vertical virtual screen size is limited by the amount of memory
    reserved for ps3fb,
  - The horizontal virtual screen size is limited to the fullscreen width,
  - Advertise that we support panning, so fbcon will use it if the virtual
    screen is enabled.
    Enabling a virtual screen (using `fbset -vyres nnn') can speed up text
    console scrolling by a factor of 10-15, depending on the video mode.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: don't keep the borders for non-fullscreen modes in XDR memory
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:49 +0000 (01:29 -0700)]
ps3fb: don't keep the borders for non-fullscreen modes in XDR memory

Don't keep the borders for non-fullscreen modes in XDR memory:
  - Extract ps3fb_sync_image()
  - Work around the alignment restrictions of L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT
    by using an offset with L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP
  - Only copy the visible part of the screen on every vblank
  - Always put the real frame buffer at the start of video memory
  - Clear fullscreen DDR memory on mode change

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: use fb_info.par properly
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:48 +0000 (01:29 -0700)]
ps3fb: use fb_info.par properly

ps3fb: Use fb_info.par properly:
  o Move mode-specific fields into struct ps3fb_par
  o Allocate struct ps3fb_par using framebuffer_alloc()
  o Protect access to ps3fb_par in ps3fb_sync() using the console semaphore
    (this semaphore is already held when ps3fb_set_par() is called)
  o Avoid calling ps3av_set_video_mode() if the actual video mode hasn't
    changed

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: fix possible overlap of GPU command buffer and frame buffer
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:48 +0000 (01:29 -0700)]
ps3fb: fix possible overlap of GPU command buffer and frame buffer

ps3fb: In the case of non-fullscreen video modes, there was a partial overlap
of the GPU command buffer and the frame buffer. Fix and cleanup various issues
with overlap and alignment:
  - Move the GPU command buffer from the beginning to the end of video memory
  - Exclude the GPU command buffer from the actual frame buffer memory
  - Align the start of the virtual frame buffer to PAGE_SIZE instead of to 64
    KiB, and don't waste memory if it's already aligned (for fullscreen modes)
  - Take into account the alignment when checking memory requirements and
    maximum number of frames
  - Make sure fb_fix_screeninfo.smem_start always points to the virtual frame
    buffer start, so we don't have to compensate for that in ps3fb_mmap()

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: make ps3fb_wait_for_vsync() and ps3fb_flip_ctl() static
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:47 +0000 (01:29 -0700)]
ps3fb: make ps3fb_wait_for_vsync() and ps3fb_flip_ctl() static

Make ps3fb_wait_for_vsync() and ps3fb_flip_ctl() static, as they're no
(longer) used outside ps3fb.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: clean up includes
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:46 +0000 (01:29 -0700)]
ps3fb: clean up includes

Clean up includes

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: do not print warnings on invalid frame numbers
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:46 +0000 (01:29 -0700)]
ps3fb: do not print warnings on invalid frame numbers

Do not print warnings on invalid frame numbers, as this can be triggered from
user space.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3fb: convert from printk()/DPRINTK() to dev_*()/pr_*()
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:45 +0000 (01:29 -0700)]
ps3fb: convert from printk()/DPRINTK() to dev_*()/pr_*()

Convert ps3fb from printk()/DPRINTK() to dev_*()/pr_*()

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agoimxfb: fast read flag and nonstandard field configurable
Pavel Pisa [Tue, 16 Oct 2007 08:29:44 +0000 (01:29 -0700)]
imxfb: fast read flag and nonstandard field configurable

The i.MX frame-buffer read operation should be faster for all configurations
then drawing each individual character again in response to scroll events.

The nonstandard fields allows to configure frame-buffer special options flags
for different display configurations by board specific initialization code.

One of such specific options is reversed order of pixels in each individual
byte.  i.MX frame-buffer seems to be designed for big-endian use first.  The
byte order is correctly configured for little-endian ordering, but if 1, 2 or
4 bits per pixel are used, pixels ordering is incompatible to Linux generic
frame-buffer drawing functions.

The patch "Allow generic BitBLT functions to work with swapped pixel order in
bytes" introduces required functionality into FBDEV core.  The pixels ordering
selection has to be enabled at compile time CONFIG_FB_CFB_REV_PIXELS_IN_BYTE
and for each display configuration which requires it by flag
FB_NONSTD_REV_PIX_IN_B in "nonstd" field of info structure.

This patch provides way for board specific code to select this option.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
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>
16 years agops3av: dont distinguish between `boot' and `non-boot' autodetection
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:44 +0000 (01:29 -0700)]
ps3av: dont distinguish between `boot' and `non-boot' autodetection

don't distinguish between `boot' and `non-boot' autodetection now the
autodetection code has been improved

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3av: remove unused ps3av_set_mode()
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:43 +0000 (01:29 -0700)]
ps3av: remove unused ps3av_set_mode()

remove unused ps3av_set_mode()

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3av: add quirk database for broken monitors
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:42 +0000 (01:29 -0700)]
ps3av: add quirk database for broken monitors

add a quirk database for broken monitors where the `best' advertised
video mode doesn't work

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3av: add autodetection for VESA modes
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:42 +0000 (01:29 -0700)]
ps3av: add autodetection for VESA modes

add autodetection for VESA modes

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3av: treat DVI-D like HDMI in autodetect
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:41 +0000 (01:29 -0700)]
ps3av: treat DVI-D like HDMI in autodetect

treat DVI-D monitors like HDMI monitors when autodetecting the best video mode

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3av: use PS3 video mode ids in autodetect code
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:41 +0000 (01:29 -0700)]
ps3av: use PS3 video mode ids in autodetect code

It doesn't make much sense to use the PS3AV_CMD_VIDEO_VID_* values in the
autodetection code, just to convert them to PS3 video mode ids afterwards.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3av: eliminate PS3AV_DEBUG
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:40 +0000 (01:29 -0700)]
ps3av: eliminate PS3AV_DEBUG

ps3av: eliminate PS3AV_DEBUG
  - Move ps3av_cmd_av_monitor_info_dump from ps3av_cmd.c to ps3av.c, as
it's
    used there only
  - Integrate ps3av_cmd_av_hw_conf_dump() into its sole user
  - Use pr_debug() for printing debug info

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agops3av: eliminate unneeded temporary variables
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:40 +0000 (01:29 -0700)]
ps3av: eliminate unneeded temporary variables

ps3av: eliminate unneeded temporary variables

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agovideo gfx: merge kconfig menus
Randy Dunlap [Tue, 16 Oct 2007 08:29:39 +0000 (01:29 -0700)]
video gfx: merge kconfig menus

Move AGP and DRM menus into the video graphics support menu.
  They use 'menuconfig' so that they can all be disabled with
  one selection.
Make the console menu use 'menuconfig' so that it can all be
  disabled with one selection.
Make the frame buffer menu use 'menuconfig' so that it can all be
  disabled with one selection.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dave Airlie <airlied@linux.ie>
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>
16 years agobf54x-lq043fb: framebuffer driver for Blackfin BF54x framebuffer device driver
Michael Hennerich [Tue, 16 Oct 2007 08:29:38 +0000 (01:29 -0700)]
bf54x-lq043fb: framebuffer driver for Blackfin BF54x framebuffer device driver

Blackfin BF54x framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD

[adaplas]
Add 'fb' suffix to driver name.
Move Makefile entry under platform device section

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.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>
16 years agofbcon: logo: disable logo at boot
Randy Dunlap [Tue, 16 Oct 2007 08:29:37 +0000 (01:29 -0700)]
fbcon: logo: disable logo at boot

Add logo.nologo kernel boot option to disable the logo in order to provide
more screen space for kernel messages; especially useful when debugging and
screen space is more critical.

newport_con driver changes are untested.

[akpm@linux-foundation.org: cleanups, coding-style fixes]
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
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>
16 years agopmagb-b-fb: improve diagnostics
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:36 +0000 (01:29 -0700)]
pmagb-b-fb: improve diagnostics

Add error messages to the probe call.

[adaplas]
On failure, return actual error value instead of -ENXIO.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
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>
16 years agonvidiafb: Correctly assign the i2c class with the port reversal
Antonino A. Daplas [Tue, 16 Oct 2007 08:29:36 +0000 (01:29 -0700)]
nvidiafb: Correctly assign the i2c class with the port reversal

If the i2c ports are to be reversed, I2C_CLASS_HWMON assignment must also be
reversed.

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>
16 years agovt/vgacon: Check if screen resize request comes from userspace
Antonino A. Daplas [Tue, 16 Oct 2007 08:29:35 +0000 (01:29 -0700)]
vt/vgacon: Check if screen resize request comes from userspace

Various console drivers are able to resize the screen via the con_resize()
hook.  This hook is also visible in userspace via the TIOCWINSZ, VT_RESIZE and
VT_RESIZEX ioctl's.  One particular utility, SVGATextMode, expects that
con_resize() of the VGA console will always return success even if the
resulting screen is not compatible with the hardware.  However, this
particular behavior of the VGA console, as reported in Kernel Bugzilla Bug
7513, can cause undefined behavior if the user starts with a console size
larger than 80x25.

To work around this problem, add an extra parameter to con_resize().  This
parameter is ignored by drivers except for vgacon.  If this parameter is
non-zero, then the resize request came from a VT_RESIZE or VT_RESIZEX ioctl
and vgacon will always return success.  If this parameter is zero, vgacon will
return -EINVAL if the requested size is not compatible with the hardware.  The
latter is the more correct behavior.

With this change, SVGATextMode should still work correctly while in-kernel and
stty resize calls can expect correct behavior from vgacon.

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>
16 years agovideo gfx: fix menu ordering
Randy Dunlap [Tue, 16 Oct 2007 08:29:35 +0000 (01:29 -0700)]
video gfx: fix menu ordering

Move video graphics driver configs to fix menus:

Fix FB_PMAGB_B to depend on FB so that the FB menus remain
  listed in order and indented correctly.
Fix FB_IBM_GXT4500 to depend on FB so that the FB menus remain
  listed in order and indented correctly.
The OMAP FB drivers still muck up the FB menu a bit, so I put
  OMAP drivers at the end of the FB menu.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.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>
16 years agoIntel FB: more interlaced mode support
Krzysztof Halasa [Tue, 16 Oct 2007 08:29:34 +0000 (01:29 -0700)]
Intel FB: more interlaced mode support

Intel FB: allow odd- and even-field-first in interlaced modes, and
proper sync to vertical retrace

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: <sylvain.meyer@worldonline.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoIntel FB: force even line count in interlaced mode
Krzysztof Halasa [Tue, 16 Oct 2007 08:29:33 +0000 (01:29 -0700)]
Intel FB: force even line count in interlaced mode

Intel FB: the chip adds two halflines automatically in interlaced mode,
force even line count for the right timings.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: <sylvain.meyer@worldonline.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoIntel FB: obvious changes and corrections
Krzysztof Halasa [Tue, 16 Oct 2007 08:29:33 +0000 (01:29 -0700)]
Intel FB: obvious changes and corrections

Intel FB: obvious changes and corrections

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: <sylvain.meyer@worldonline.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoIntel FB: whitespace, bracket and other clean-ups
Krzysztof Halasa [Tue, 16 Oct 2007 08:29:31 +0000 (01:29 -0700)]
Intel FB: whitespace, bracket and other clean-ups

Intel FB: whitespace, bracket and other clean-ups

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: <sylvain.meyer@worldonline.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/video/pmag-ba-fb.c: improve diagnostics
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:30 +0000 (01:29 -0700)]
drivers/video/pmag-ba-fb.c: improve diagnostics

Add error messages to the probe call.

While they may rarely trigger, they may be useful when something weird is
going on.  Also this is good style.

[akpm@linux-foundation.org: remove unneeded initialisation]
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Ralf Baechle <ralf@linux-mips.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>
16 years agoRadeonfb Xpress 200M RC410 support
Sellout Bessie [Tue, 16 Oct 2007 08:29:30 +0000 (01:29 -0700)]
Radeonfb Xpress 200M RC410 support

Make radeonfb work ith the 200m Xpress RC410.  In my tests it was terribly
unstable and would freeze until I set a refresh rate in the kernel argument
to 75.

e.g video=radeonfb:1280x800@75

Now it is rock solid.

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>
16 years agoexport font_vga_8x16
Andrew Morton [Tue, 16 Oct 2007 08:29:29 +0000 (01:29 -0700)]
export font_vga_8x16

mips allmodconfig:

ERROR: "font_vga_8x16" [drivers/video/console/newport_con.ko] undefined!

Cc: Ralf Baechle <ralf@linux-mips.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>
16 years agodrivers/video/Kconfig: Fix FB_PMAGB_B dependencies
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:28 +0000 (01:29 -0700)]
drivers/video/Kconfig: Fix FB_PMAGB_B dependencies

Add a missing FB dependency to FB_PMAGB_B.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.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>
16 years agotdfxfb: checkpatch fixes
Krzysztof Helt [Tue, 16 Oct 2007 08:29:28 +0000 (01:29 -0700)]
tdfxfb: checkpatch fixes

This patch fixes all errors pointed by the checkpatch.pl script.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopm3fb: replace busy waiting with cpu_relax
Krzysztof Helt [Tue, 16 Oct 2007 08:29:27 +0000 (01:29 -0700)]
pm3fb: replace busy waiting with cpu_relax

This patch replaces busy waiting with the cpu_relax() call.  This makes
scrolling faster.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopm2fb: replace busy waiting with cpu_relax
Krzysztof Helt [Tue, 16 Oct 2007 08:29:27 +0000 (01:29 -0700)]
pm2fb: replace busy waiting with cpu_relax

This patch replaces busy waiting with the cpu_relax() call.  This makes
scrolling faster.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agotdfxfb: replace busy waiting with cpu_relax
Krzysztof Helt [Tue, 16 Oct 2007 08:29:26 +0000 (01:29 -0700)]
tdfxfb: replace busy waiting with cpu_relax

This patch replaces busy waiting with cpu_relax() call.  This makes scrolling
faster.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agofbdev: Update Documentation/fb/00-INDEX
Jesper Juhl [Tue, 16 Oct 2007 08:29:26 +0000 (01:29 -0700)]
fbdev: Update Documentation/fb/00-INDEX

An update to Documentation/fb/00-INDEX is long overdue.  This patch adds
entries for new files in the directory and removes entries for files that no
longer exist.  The files are now also sorted alphabetically.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.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>
16 years agops3fb: Fix spurious mode change failures
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:25 +0000 (01:29 -0700)]
ps3fb: Fix spurious mode change failures

ps3fb: Add a `mode' parameter to ps3fb_get_res_table(), as in some cases it
should check the full-screen flag of the _new_ video mode instead of the
current video mode.

This bug caused spurious mode change failures when switching between
fullscreen and non-fullscreen modes using fbset, while ps3-video-mode worked
fine.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
CC: Geoff Levand <geoffrey.levand@am.sony.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>
16 years agops3: Fix black and white stripes
Masashi Kimoto [Tue, 16 Oct 2007 08:29:22 +0000 (01:29 -0700)]
ps3: Fix black and white stripes

Fix the black and white stripes issue with WUXGA monitor via HDMI.

It seems that when we use a VESA resolution from boot up, the AV settings
driver could not be initialized correctly.  In that case we need a dummy
packet before VESA setting.

[Geert] Refactored to reduce code duplication.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
CC: Geoff Levand <geoffrey.levand@am.sony.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>
16 years agofbdev: Support for byte-reversed framebuffer formats
Pavel Pisa [Tue, 16 Oct 2007 08:29:21 +0000 (01:29 -0700)]
fbdev: Support for byte-reversed framebuffer formats

Allow generic frame-buffer code to correctly write texts and blit images for
1, 2 and 4 bit per pixel frame-buffer organizations when pixels in bytes are
organized to in opposite order than bytes in long type.

Overhead should be reasonable.  If option is not selected, than compiler
should eliminate completely all overhead.

The feature is disabled at compile time if CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is
not set.

[adaplas]
Convert helper functions to macros if feature is not enabled.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
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>
16 years agonvidiafb: Add boot option to reverse i2c port assignment
Antonino A. Daplas [Tue, 16 Oct 2007 08:29:20 +0000 (01:29 -0700)]
nvidiafb: Add boot option to reverse i2c port assignment

There are a few nvidia hardware where the i2c port assignments are reversed,
i.e., the 1st i2c port is assigned to the secondary display and the 2nd i2c
port to the primary display.  In most cases, if only 1 display is attached, or
if only 1 flatpanel and 1 analog display is attached, the port reversal is of
no consequence.  However if 2 flatpanels are attached, it can cause display
problems.

There is no sane way of determining if the hardware reversed the i2c port
assignment, so the simplest fix is to add a boot/module option, "reverse_i2c
to explicitly reverse the i2c port.

This also restores i2c ordering back to the pre-2.6.22 state.

Signed-off-by: Antonino Daplas <adaplas@gail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: find mode with the highest/safest refresh rate in fb_find_mode()
Michal Januszewski [Tue, 16 Oct 2007 08:29:19 +0000 (01:29 -0700)]
fbdev: find mode with the highest/safest refresh rate in fb_find_mode()

Currently, if the refresh rate is not specified, fb_find_mode() returns the
first known video mode with the requested resolution, which provides no
guarantees wrt the refresh rate.  Change this so that the mode with the
highest refresh rate is returned when the driver provides a custom video mode
database and the monitor limits, and a mode with the safe 60 Hz refresh rate
otherwise.

Signed-off-by: Michal Januszewski <spock@gentoo.org>
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>
16 years agoIntel FB: support for interlaced video modes
Krzysztof Halasa [Tue, 16 Oct 2007 08:29:18 +0000 (01:29 -0700)]
Intel FB: support for interlaced video modes

Intel framebuffer now supports interlaced video modes.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovfb: make virtual framebuffer mmapable
Ilya Yanok [Tue, 16 Oct 2007 08:29:17 +0000 (01:29 -0700)]
vfb: make virtual framebuffer mmapable

Changed things:

1. vmalloc()/vfree() replaced with rvmalloc()/rvfree() (taken from
   drivers/media/video/se401.c)

2. mmap method implemented (mostly taken from drivers/media/video/se401.c)

3. smem_start and smem_len fields of struct fb_fix_screeninfo initialized.
    (smem_start initialized with virtual address, don't know if it is really
   bad...)

[adaplas: sparse warning fix]
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>
16 years agopm2fb: panning and hardware cursor fixes
Krzysztof Helt [Tue, 16 Oct 2007 08:29:16 +0000 (01:29 -0700)]
pm2fb: panning and hardware cursor fixes

This patch:
- disallows setting of virtual height above 2048 as it does
  not work for accelerated copyarea and imageblit
- fixes blinking of pm2v cursor by pushing cursor outside
  the display (x=2047)
- fixes hardware cursor position on Permedia 2 chips with
  panning enabled
- enables hardware cursor by default

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopm2fb: hardware cursor support for the Permedia2
Krzysztof Helt [Tue, 16 Oct 2007 08:29:16 +0000 (01:29 -0700)]
pm2fb: hardware cursor support for the Permedia2

This patch adds hardware cursor support for the Permedia 2 chip.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopm3fb: header file cleanup
Krzysztof Helt [Tue, 16 Oct 2007 08:29:14 +0000 (01:29 -0700)]
pm3fb: header file cleanup

This patch fixes white spaces, redudant definitions and formating in the pm3fb
header file.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agocirrusfb: code improvement 2nd part
Krzysztof Helt [Tue, 16 Oct 2007 08:29:13 +0000 (01:29 -0700)]
cirrusfb: code improvement 2nd part

This patch removes:
- redundant fields from the cirrusfb_regs structure
- one redundant header
- fixes two includes ("" to <>)

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agocirrusfb: code improvements
Krzysztof Helt [Tue, 16 Oct 2007 08:29:13 +0000 (01:29 -0700)]
cirrusfb: code improvements

This patch does some "short-range" code improvements like merging identical
switch clauses, replacing conditional branches with calculation of values,
merging only once-used functions into place they are called from.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agocirrusfb: remove fields from cirrusfb_info
Krzysztof Helt [Tue, 16 Oct 2007 08:29:12 +0000 (01:29 -0700)]
cirrusfb: remove fields from cirrusfb_info

This patch removes unused or redundant fields from cirrusfb_info structure.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agocirrusfb: remove typedefs
Krzysztof Helt [Tue, 16 Oct 2007 08:29:11 +0000 (01:29 -0700)]
cirrusfb: remove typedefs

This patch replaces "typedef enum" with "enum type" constructs.  Using the
typedef is error for the checkpatch.pl script.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agocirrusfb: checkpatch.pl cleanup
Krzysztof Helt [Tue, 16 Oct 2007 08:29:08 +0000 (01:29 -0700)]
cirrusfb: checkpatch.pl cleanup

This patch fixes over 850 errors and warnings pointed out by the checkpatch.pl
script.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: make use of default_display settings
Krzysztof Helt [Tue, 16 Oct 2007 08:29:08 +0000 (01:29 -0700)]
s3c2410fb: make use of default_display settings

This patch changes mode selection to always prefer default mode if possible
and always honor type of display set by default mode settings.

This patch is required in case the same display modes were defined for
different panels (e.g.  STN and TFT).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: removes lcdcon1 register value from s3c2410fb_display
Krzysztof Helt [Tue, 16 Oct 2007 08:29:07 +0000 (01:29 -0700)]
s3c2410fb: removes lcdcon1 register value from s3c2410fb_display

This patch removes lcdcon1 register field from the s3c2410fb_display as all
bits are calculated from other fields.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: adds pixclock to s3c2410fb_display
Krzysztof Helt [Tue, 16 Oct 2007 08:29:06 +0000 (01:29 -0700)]
s3c2410fb: adds pixclock to s3c2410fb_display

This patch adds pixelclock field to the s3c2410fb_display structure and make
use of it in the driver.

The Bast machine defined 9 modes but pixclock and margin values are defined
only for the 640x480 modes so I removed other modes.

This patch also fixes wrong display type constant for the SMDK2440 board.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: source code improvements
Krzysztof Helt [Tue, 16 Oct 2007 08:29:05 +0000 (01:29 -0700)]
s3c2410fb: source code improvements

This patch:
- moves more display mode preparations to s3c2410fb_check_var()
- reduces number of fields in s3c2410fb_info
- removes redundant values setting in s3c2410fb_probe()
- removes static mach_info pointer
- releases fb_info structure in s3c2410fb_remove()
- changes s3c2410fb_init to __init from __devinit
- fixes few typos in comments and removes unused includes

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agofbdev: change asm/uaccess.h to linux/uaccess.h
Krzysztof Helt [Tue, 16 Oct 2007 08:29:04 +0000 (01:29 -0700)]
fbdev: change asm/uaccess.h to linux/uaccess.h

This patch replaces <asm/uaccess.h> with <linux/uaccess.h> after the
checkpatch.pl hint.  The include of <asm/uaccess.h> is removed if the driver
does not use it.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agovt: Fix warnings in selection.h
Ralf Baechle [Tue, 16 Oct 2007 08:29:04 +0000 (01:29 -0700)]
vt: Fix warnings in selection.h

<linux/selection.h> assumes that struct tty_struct has previously been
included.  If not, this pile of warnings will result:

  CC [M]  drivers/video/console/newport_con.o
In file included from drivers/video/console/newport_con.c:18:
include/linux/selection.h:16: warning: 'struct tty_struct' declared inside param
eter list
include/linux/selection.h:16: warning: its scope is only this definition or decl
aration, which is probably not what you want
include/linux/selection.h:17: warning: 'struct tty_struct' declared inside param
eter list
include/linux/selection.h:20: warning: 'struct tty_struct' declared inside param
eter list

Fixed by adding a forward declaration of struct tty_struct.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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>
16 years agofbcon: Convert struct font_desc to use ISO C initializers
Ralf Baechle [Tue, 16 Oct 2007 08:29:03 +0000 (01:29 -0700)]
fbcon: Convert struct font_desc to use ISO C initializers

Akpm's patch "newport_con warning fix" got me to look at the console drivers
again and one thing that I noticed was that none of the fonts was using ISO
initializers for it's fonts.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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>
16 years agoatyfb: atyfb: Unshare pseudo_palette
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:03 +0000 (01:29 -0700)]
atyfb: atyfb: Unshare pseudo_palette

atyfb: Move the pseudo palette into the card-specific atyfb_par, so it's no
longer shared among multiple cards

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
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>
16 years agos3c2410fb: byte ordering fixes
Krzysztof Helt [Tue, 16 Oct 2007 08:29:02 +0000 (01:29 -0700)]
s3c2410fb: byte ordering fixes

This patch sets correct bits related to the byte ordering of the
framebuffer.  This was tested on little endian kernel only.  The big endian
kernel may require different settings.

The patch also adds 32 bpp mode which is called 24 bpp by Samsung.  One
pixel takes 32 bits but only 24 bits are used in this mode.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: fix missing registers offset
Krzysztof Helt [Tue, 16 Oct 2007 08:29:01 +0000 (01:29 -0700)]
s3c2410fb: fix missing registers offset

This patch adds missing virtual register offsets where
appropriate. This fixes crashes in the driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl
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>
16 years agos3c2410fb: remove lcdcon2 and lcdcon3 register fields
Krzysztof Helt [Tue, 16 Oct 2007 08:29:01 +0000 (01:29 -0700)]
s3c2410fb: remove lcdcon2 and lcdcon3 register fields

This patch removes unused lcdcon2 and lcdcon3 register value
from the s3c2410fb_display structure.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: add pulse length fields to s3c2410fb_display
Krzysztof Helt [Tue, 16 Oct 2007 08:29:00 +0000 (01:29 -0700)]
s3c2410fb: add pulse length fields to s3c2410fb_display

This patch adds synchronization pulse lenght fields to
the s3c2410fb_display structure and makes use of them
in the driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: use vertical margins values
Krzysztof Helt [Tue, 16 Oct 2007 08:28:59 +0000 (01:28 -0700)]
s3c2410fb: use vertical margins values

This patch makes use of vertical margins fields in
the s3c2410fb_display structure.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: add vertical margins fields to s3c2410fb_display
Krzysztof Helt [Tue, 16 Oct 2007 08:28:59 +0000 (01:28 -0700)]
s3c2410fb: add vertical margins fields to s3c2410fb_display

This patch adds vertical margins values to all
s3c24xx platform.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: remove lcdcon3 register from s3c2410fb_display
Krzysztof Helt [Tue, 16 Oct 2007 08:28:58 +0000 (01:28 -0700)]
s3c2410fb: remove lcdcon3 register from s3c2410fb_display

This patch removes unused lcdcon3 register from the
s3c2410fb_display structure.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: use new margin fields
Krzysztof Helt [Tue, 16 Oct 2007 08:28:57 +0000 (01:28 -0700)]
s3c2410fb: use new margin fields

This patch makes use of margins fields in the s3c2410fb_display
structure.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: add margin fields to s3c2410fb_display
Krzysztof Helt [Tue, 16 Oct 2007 08:28:57 +0000 (01:28 -0700)]
s3c2410fb: add margin fields to s3c2410fb_display

This patch adds margins fields to the s3c2410fb_display
structure. It also sets display type and horizontal
margins in all platform files that use the s3c2410fb
driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: multi-display support
Krzysztof Helt [Tue, 16 Oct 2007 08:28:56 +0000 (01:28 -0700)]
s3c2410fb: multi-display support

This patch adds a new structure to describe and handle
more than one panel (display mode) for the s3c2410 framebuffer.
This structure is added after the pxafb driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: remove fb_info pointer from s3c2410fb_info
Krzysztof Helt [Tue, 16 Oct 2007 08:28:55 +0000 (01:28 -0700)]
s3c2410fb: remove fb_info pointer from s3c2410fb_info

This patch removes redundant fb field from
the s3c2410fb_info structure. This breaks circular
reference fb_info -> s3c2410fb_info -> fb_info again.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agos3c2410fb: code cleanup
Krzysztof Helt [Tue, 16 Oct 2007 08:28:54 +0000 (01:28 -0700)]
s3c2410fb: code cleanup

This patch cleans up the driver a bit. It contains
coding style fixes (pointed by Lindent and checkpatch),
white space clean ups and few minor code improvements.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopm3fb: hardware cursor support
Krzysztof Helt [Tue, 16 Oct 2007 08:28:54 +0000 (01:28 -0700)]
pm3fb: hardware cursor support

This patch adds hardware cursor support to the pm3fb driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopm2fb: Permedia 2V hardware cursor support
Krzysztof Helt [Tue, 16 Oct 2007 08:28:53 +0000 (01:28 -0700)]
pm2fb: Permedia 2V hardware cursor support

This patch adds hardware cursor support for Permedia 2V chips.
The hardware cursor is disabled by default. It does not blink - the
same issue is mentioned in the x11 driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agofbdev: fb_create_modedb() non-static `int first = 1;'
Geert Uytterhoeven [Tue, 16 Oct 2007 08:28:52 +0000 (01:28 -0700)]
fbdev: fb_create_modedb() non-static `int first = 1;'

Looking at the code flow, `int first' in fb_create_modedb() should be static.

[adaplas]
Better for 'int first' to be moved outside the loop.

[akpm@linux-foundation.org: kill stray semicolon]
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.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>
16 years agodrivers/video/geode/lxfb_core.c: fix lxfb_setup warning
Eugene Teo [Tue, 16 Oct 2007 08:28:51 +0000 (01:28 -0700)]
drivers/video/geode/lxfb_core.c: fix lxfb_setup warning

drivers/video/geode/lxfb_core.c: In function 'lxfb_setup':
drivers/video/geode/lxfb_core.c:564: warning: unused variable 'opt'

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
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>
16 years agopm3fb: checkpatch fixes
Krzysztof Helt [Tue, 16 Oct 2007 08:28:51 +0000 (01:28 -0700)]
pm3fb: checkpatch fixes

This patch fixes all errors detected by checkpatch.pl script in the pm3fb.c
file.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopm2fb: checkpatch fixes
Krzysztof Helt [Tue, 16 Oct 2007 08:28:50 +0000 (01:28 -0700)]
pm2fb: checkpatch fixes

This patch fixes all errors detected by checkpatch.pl script in the pm2fb.c
file.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agotdfxfb: mtrr support
Krzysztof Helt [Tue, 16 Oct 2007 08:28:49 +0000 (01:28 -0700)]
tdfxfb: mtrr support

This patch adds mtrr support to the tdfxfb driver.  It also kills one
redundant include and initialization value.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agotdfxfb: hardware cursor
Krzysztof Helt [Tue, 16 Oct 2007 08:28:48 +0000 (01:28 -0700)]
tdfxfb: hardware cursor

This patch adds hardware cursor support to the tdfxfb driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agotdfxfb: code improvements
Krzysztof Helt [Tue, 16 Oct 2007 08:28:48 +0000 (01:28 -0700)]
tdfxfb: code improvements

This patch improves source code mainly by killing redundant variable loads,
reducing number of variables, simplifying conditional branches, etc.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agofbdev: Fix incorrect timings in some modedb entries
Antonino A. Daplas [Tue, 16 Oct 2007 08:28:47 +0000 (01:28 -0700)]
fbdev: Fix incorrect timings in some modedb entries

Reported by: John Lumby <johnlumby@hotmail.com>

Some of the entries in the mode database does not match the comments and/or
the refresh field.  Adjust the timings so they match with both the comments
and the refresh rate.

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>
16 years agounexport fb_prepare_logo
Adrian Bunk [Tue, 16 Oct 2007 08:28:47 +0000 (01:28 -0700)]
unexport fb_prepare_logo

The logo code is not and should not be used by modules.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
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>
16 years agoradeon_driver_vblank_do_wait() static
Adrian Bunk [Tue, 16 Oct 2007 08:28:46 +0000 (01:28 -0700)]
radeon_driver_vblank_do_wait() static

radeon_driver_vblank_do_wait() can become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotdfxfb: palette fixes
Krzysztof Helt [Tue, 16 Oct 2007 08:28:46 +0000 (01:28 -0700)]
tdfxfb: palette fixes

This patch fixes:
- palette setting in 8-bit mode (aka 'funky penguin')
- grayscale handling
- adds proper barriers in xxx_inb/outb functions

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agotdfxfb: 3 fixes
Krzysztof Helt [Tue, 16 Oct 2007 08:28:45 +0000 (01:28 -0700)]
tdfxfb: 3 fixes

This patch fixes 3 issues:
- transparency handling in tdfxfb
- panning with more than 4096 virtual height and acceleration (acceleration
with x & y > 4096)
- exit paths on errors in tdfxfb_probe()

Additionally it sets a FBINFO_READS_FAST flag to use smart blitter scrolling
(speed up on tdfxfb).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agotdfxfb: coding style improvement
Krzysztof Helt [Tue, 16 Oct 2007 08:28:43 +0000 (01:28 -0700)]
tdfxfb: coding style improvement

This patch contains coding style improvements to the tdfxfb driver (white
spaces, indentations, long lines).

It also moves fb_ops structure to the end of file, so forward declarations of
ops functions are redundant.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agotridentfb: coding style improvement
Krzysztof Helt [Tue, 16 Oct 2007 08:28:42 +0000 (01:28 -0700)]
tridentfb: coding style improvement

This patch contains coding style improvements to the tridentfb driver (white
spaces, indentations, long lines).

It also moves fb_ops structure after fb api functions are defined.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
16 years agopxafb: Add support for other palette formats
Hans J. Koch [Tue, 16 Oct 2007 08:28:41 +0000 (01:28 -0700)]
pxafb: Add support for other palette formats

This patch adds support for the other three palette formats possible with
the PXA LCD controller. This is required on boards where an LCD is connected
with all its 18 bits. With this patch, it's possible to use an 8-bit mode
with 18-bit palette entries. This used to be possible in 2.4 kernels but
disappeared in 2.6. With current kernels, you can only get wrong colours
out of an LCD connected this way.

Users can choose the palette format by doing something like this
in their board definition:

static struct pxafb_mach_info my_fb_info = {
        [...]
        .lccr3          = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_PDFOR_3,
        .lccr4          = LCCR4_PAL_FOR_2,
        [...]
};

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
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>
16 years agombxfb: Improvements and new features
Raphael Assenat [Tue, 16 Oct 2007 08:28:40 +0000 (01:28 -0700)]
mbxfb: Improvements and new features

This contains the following changes:

* Overlay surface alpha is configured separately from the overlay. This
prevents display glitches (configure and fill the overlay first, set
alpha to a visible value next)

* Added an ioctl for configuring transparency of the Overlay and graphics
planes. Blend mode, colorkey mode and global alpha mode are supported.

* Added an ioctl for setting the plane order. The overlay plance can be placed
over or
under the graphics plane.

* Added an ioctl for setting and reading chip registers, with mask.

* Updated copyright for 2007

[adaplas]
* Coding style changes

Signed-off-by: Raphael Assenat <raph@8d.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>
16 years agosm501fb: Ensure panel interface is not tristated when setup
Ben Dooks [Tue, 16 Oct 2007 08:28:39 +0000 (01:28 -0700)]
sm501fb: Ensure panel interface is not tristated when setup

When we setup the panel interface whilst configuring the
framebuffer, we should ensure the panel interface is not
in tristate, in case the bootloader or previous setup has
not enabled it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>