Commit Graph

2039 Commits

Author SHA1 Message Date
Linus Torvalds 01f675029d Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  radeonfb/aty128fb: Disable broken early resume hook for PowerBooks
  hvc_console: Remove tty->low_latency on pseries backends
  powerpc: fix linkstation and storcenter compilation breakage
  powerpc/4xx: Enable SERIAL_OF support by default for Virtex platforms
2009-03-11 12:14:04 -07:00
Benjamin Herrenschmidt d801cec70d radeonfb/aty128fb: Disable broken early resume hook for PowerBooks
radeonfb and aty128fb have a special hook called by the PowerMac platform
code very very early on resume from sleep to bring the screen back. This
is useful for debugging wakup problems, but unfortunately, this also became
a source of problems of its own.

The hook is called extremely early, with interrupts still off, and the code
path involved with that code nowadays rely on things like taking mutexes,
GFP_KERNEL allocations, etc...

In addition, the driver now relies on the PCI core to restore the standard
config space before calling resume which doesn't happen with this early
code path.

I'm keeping the code in but commented out along with a fixup call to
pci_restore_state(). The reason is that I still want to make it easy to
re-enable temporarily to track wake up problems, and it's possible that
I can revive it at some stage if we make sleeping things save to call
in early resume using a system state.

In the meantime, this should fix several reported regressions.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-03-11 10:48:56 +11:00
Samuel CUELLA 16b71fdf97 i810: fix kernel crash fix when struct fb_var_screeninfo is supplied
Prevent the kernel from being crashed by a divide-by-zero operation when
supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.

Previously i810_main.c:1005 (i810_check_params) was using the global
'yres' symbol previously defined at i810_main.c:145 as a module parameter
value holder (i810_main.c:2174).  If i810fb is compiled-in or if this
param doesn't get a default value, this direct usage leads to a
divide-by-zero at i810_main.c:1005 (i810_check_params).  The patch simply
replace the 'yres' global, perhaps undefined symbol usage by a given
parameter structure lookup.

This problem occurs with directfb, mplayer -vo fbdev, SDL library.
It was also reported ( but non solved ) at:

	http://mail.directfb.org/pipermail/directfb-dev/2008-March/004050.html

Signed-off-by: Samuel CUELLA <samuel.cuella@supinfo.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:12 -07:00
Magnus Damm 467fc49889 video: deferred io cleanup fix for sh_mobile_lcdcfb
Fix deferred io cleanup patch in the sh_mobile_lcdcfb driver.

If probe() fails early the sh_mobile_lcdc_stop() function will
be called to clean up deferred io. This patch modifies the
code to only call fb_deferred_io_cleanup() after deferred io
has been initialized.

With this patch applied we no longer hit BUG_ON() inside
fb_deferred_io_cleanup(). Triggers on a Migo-R with the
SYS QVGA panel board unmounted.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 15:23:01 +09:00
Linus Torvalds f41bf2ab99 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] fix lots of ARM __devexit sillyness
  [ARM] 5417/1: Set the correct cacheid for ARMv6 CPUs with ARMv7 style MMU
  [ARM] 5416/1: Use unused address in v6_early_abort
  [ARM] 5411/1: S3C64XX: Fix EINT unmask
  [ARM] at91: fix for Atmel AT91 powersaving
  [ARM] RiscPC: Fix etherh oops
2009-03-03 14:12:41 -08:00
Russell King bdf602bd73 [ARM] fix lots of ARM __devexit sillyness
`iop_adma_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`mv_xor_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`mv64xxx_i2c_unmap_regs' referenced in section `.devinit.text' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`mv64xxx_i2c_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`orion_nand_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`pxafb_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-03 21:04:04 +00:00
Geert Uytterhoeven 3d92e8f3ae m68k: atari - Rename "mfp" to "st_mfp"
http://kisskb.ellerman.id.au/kisskb/buildresult/72115/:
| net/mac80211/ieee80211_i.h:327: error: syntax error before 'volatile'
| net/mac80211/ieee80211_i.h:350: error: syntax error before '}' token
| net/mac80211/ieee80211_i.h:455: error: field 'sta' has incomplete type
| distcc[19430] ERROR: compile net/mac80211/main.c on sprygo/32 failed

This is caused by

| # define mfp ((*(volatile struct MFP*)MFP_BAS))

in arch/m68k/include/asm/atarihw.h, which conflicts with the new "mfp" enum in
net/mac80211/ieee80211_i.h.

Rename "mfp" to "st_mfp", as it's a way too generic name for a global #define.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-22 09:23:02 -08:00
Yang Hongyang 3cf311409d atyfb: remove unused local variable `pwr_command'
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-20 17:57:50 -08:00
Krzysztof Helt a1a5c3b923 fbdev/drm: fix Kconfig submenu mess in "Graphics support"
Submenus of the graphics support "Support for frame buffer devices" and
"Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" are
broken in half after latest changes for Intel 915 mode setting support.

The DRM subsection is broken because one option is put outside the choice
section it depends on.

The frame buffers part is broken then due to circular dependency.  Fix
this by make Intel frame buffers depend on CONFIG_INTEL_AGP.

Kconfigs are broken by d2f5935770
("drm/i915: select framebuffer support automatically").

This is probably not only way to fix this.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-18 15:37:56 -08:00
Uwe Kleine-Koenig d4097456cd video/framebuffer: move the probe func into .devinit.text in Blackfin LCD driver
Signed-off-by: Uwe Kleine-Koenig <ukleinek@strlen.de>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:35 -08:00
Andres Salomon 35887b1cf7 gx1fb: properly alloc cmap and plug cmap leak
We weren't properly allocating the cmap for depths greater than 8bpp,
which caused pain for things like DirectFB.  Also, we never freed the cmap
memory upon module unload..

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Marco La Porta <marco-laporta@tiscali.it>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:34 -08:00
Andres Salomon b14caecdbe gxfb: properly alloc cmap and plug cmap leak
We weren't properly allocating the cmap for depths greater than 8bpp,
which caused pain for things like DirectFB.  Also, we never freed the cmap
memory upon module unload..

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Marco La Porta <marco-laporta@tiscali.it>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:34 -08:00
Marco La Porta 067f1293cc lxfb: properly alloc cmap in all cases and don't leak the memory
We weren't properly allocating the cmap for depths greater than 8bpp,
which caused pain for things like DirectFB.  Also, we never freed the cmap
memory upon module unload..

[dilinger@debian.org: dropped unnecessary code and clean up patch]
[dilinger@debian.org: add error checking and handling]
Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:34 -08:00
Linus Torvalds ff7473300d Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: select framebuffer support automatically
  drm/i915: add get_vblank_counter function for GM45
  drm/i915: capture last_vblank count at IRQ uninstall time too
  drm/i915: Unlock mutex on i915_gem_fault() error path
  drm/i915: Quiet the message on get/setparam ioctl with an unknown value.
  drm/i915: skip LVDS initialization on Apple Mac Mini
  drm/i915: sync SDVO code with stable userland modesetting driver
  drm/i915: Unref the object after failing to set tiling mode.
  drm/i915: add fence register management to execbuf
  drm/i915: Return error from i915_gem_object_get_fence_reg() when failing.
  drm/i915: Set up an MTRR covering the GTT at driver load.
  drm/i915: Skip SDVO/HDMI init when the chipset tells us it's not present.
  drm/i915: Suppress GEM teardown on X Server exit in KMS mode.
  drm/radeon: fix ioremap conflict with AGP mappings
  i915: fix unneeded locking in i915 LVDS get modes code.
2009-02-09 08:52:28 -08:00
Benjamin Herrenschmidt 1fb25cb8b8 radeonfb: Fix resume from D3Cold on some platforms
For historical reason, this driver used its own saving/restoring
of the PCI config space, and used the state of it on resume as
an indication as to whether it needed to re-POST the chip or not.

This methods breaks with the later core changes since the core will
have restored things for us.

This patch fixes it by removing that custom code, using standard
core methods to save/restore state, and testing for the need to
re-POST by comparing the content of a few key PLL registers.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-08 10:48:57 -08:00
Benjamin Herrenschmidt b746bb7762 aty128fb: Properly save PCI state before changing PCI PM level
This fixes aty128fb to properly save the PCI config space -before- it
potentially switches the PM state of the chip. This avoids a
warning with the new PM core and is the right thing to do anyway.

I also replaced the hand-coded switch to D2 with a call to the
genericc pci_set_power_state() and removed the code that switches it
back to D0 since the generic code is doing that for us nowadays.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-08 10:48:56 -08:00
Benjamin Herrenschmidt b746816863 atyfb: Properly save PCI state before changing PCI PM level
This fixes atyfb to properly save the PCI config space -before- it
potentially switches the PM state of the chip. This avoids a
warning with the new PM core and is the right thing to do anyway.

I also slightly cleaned up the code that checks whether we are
running on a PowerMac to do a runtime check instead of a compile
check only, and replaced a deprecated number with the proper
symbolic constant.

Finally, I removed the useless switch to D0 from resume since
the core does it for us.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-08 10:48:56 -08:00
Ingo Molnar d2f5935770 drm/i915: select framebuffer support automatically
Migration helper.

The i915 driver recently added a 'depends on FB' rule to its
Kconfig entry - which silently turns off DRM_I915 if someone
has a working config but no CONFIG_FB selected, and upgrades
to the latest upstream kernel.

Norbert Preining reported this problem:

   Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=12599
   Subject     : dri /dev node disappeared with 2.6.29-rc1

So change it to "select FB", which auto-selects framebuffer
support. This way the driver keeps working, regardless of
whether FB was enabled before or not.

Kconfig select's of interactive options can be problematic to
dependencies and can cause build breakages - but in this case
it's safe because it's a leaf entry with no dependencies of its
own.

( There is some minor circular dependency fallout as FB_I810
  and FB_INTEL also used 'depends on FB' constructs - update
  those to "select FB" too. )

Reported-by: Norbert Preining <preining@logic.at>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-02-08 21:53:05 +10:00
Randy Dunlap fe86175bce atyfb: fix CONFIG_ namespace violations
Fix namespace violations by changing non-kconfig CONFIG_ names to CNFG_*.

Fixes breakage in staging/, which adds a real CONFIG_PANEL.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-05 12:56:48 -08:00
Mike Rapoport ce43ae538b drivers/video/backlight: rename da903x to da903x_bl
Currently both da903x backlight and voltage reulator drivers have the
same name. Rename the backlight driver to allow use of both drivers as
modules.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-05 12:56:48 -08:00
Andrea Righi 1f5e31d7e5 fbmem: don't call copy_from/to_user() with mutex held
Avoid calling copy_from/to_user() with fb_info->lock mutex held in fbmem
ioctl().

fb_mmap() is called under mm->mmap_sem (A) held, that also acquires
fb_info->lock (B); fb_ioctl() takes fb_info->lock (B) and does
copy_from/to_user() that might acquire mm->mmap_sem (A), causing a
deadlock.

NOTE: it doesn't push down the fb_info->lock in each own driver's
fb_ioctl(), so there are still potential deadlocks elsewhere.

Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Johannes Weiner <hannes@saeurebad.de>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-05 12:56:46 -08:00
Linus Torvalds 93bfbd71db Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
  powerpc: Fix oops on some machines due to incorrect pr_debug()
  powerpc/ps3: Printing fixups for l64 to ll64 convserion drivers/net
  powerpc/5200: update device tree binding documentation
  powerpc/5200: Bugfix for PCI mapping of memory and IMMR
  powerpc/5200: update defconfigs
2009-02-02 19:26:44 -08:00
Risto Suominen 7fbb7cadd0 fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
Since the complete re-write in 2.6.10, some PowerMacs (At least PowerMac 5500
and PowerMac G3 Beige rev A) with ATI Mach64 chip have suffered from unstable
columns in their framebuffer image. This seems to depend on a value (4) read
from PLL_EXT_CNTL register, which leads to incorrect DSP config parameters to
be written to the chip. This patch uses a value calculated by aty_init_pll_ct
instead, as a starting point.

There are questions as to whether this should be extended to other platforms
or maybe made dependent on specific chip types, but in the meantime, this has
been tested on various powermacs and works for them so let's commit it.

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Tested-by: Michael Pettersson <mike@it.uu.se>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-02-02 17:08:25 +11:00
Alex Buell 248ae0d43f fbdev: incorrect URL given in drivers/video/Kconfig
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-29 18:04:44 -08:00
Linus Torvalds 5376071069 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
  [ARM] fix section-based ioremap
  [NET] am79c961a: fix spin_lock usage
  [ARM] omap: usb: thou shalt not provide empty release functions
  [ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms
  [ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3
  [ARM] clkdev: fix clock matching
  [ARM] 5370/1: at91: fix rm9200 watchdog
  [ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix
  [ARM] 5365/1: s3cmci: Use new include path of dma.h
  [ARM] fix StrongARM-11x0 page copy implementation
  [ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
  ARM: OMAP: Fix compile for h3 MMC
  ARM: OMAP: Remove unused platform devices, v3
  ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers, v3
  ARM: OMAP: Fix OSK ASoC by registering I2C board info for tlvaic23
  ARM: OMAP: remove duplicated #include's
  ARM: OMAP: Fix DMA CCR programming for request line > 63, v3
  ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS
  ARM: OMAP: Fix compile for beagle
  ARM: OMAP: Fix gpio by switching to generic gpio calls, v2
  ...
2009-01-26 15:12:47 -08:00
Linus Torvalds cfb901bf84 Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Warn on deprecated binding model use
  eeprom: More consistent symbol names
  eeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom
  spi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom
  i2c: Move old eeprom driver to /drivers/misc/eeprom
  i2c: Move at24 to drivers/misc/eeprom
  i2c: Quilt tree has moved
  i2c: Delete many unused adapter IDs
  i2c: Delete 10 unused driver IDs
2009-01-26 15:11:41 -08:00
Jean Delvare 1745522ccb i2c: Delete many unused adapter IDs
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-01-26 21:19:52 +01:00
Linus Torvalds 7954d5cf39 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  i.MX31: framebuffer driver
  i.MX31: Image Processing Unit DMA and IRQ drivers
  dmaengine: add async_tx_clear_ack() macro
  dmaengine: dma_issue_pending_all == nop when CONFIG_DMA_ENGINE=n
  dmaengine: kill some dubious WARN_ONCEs
  fsldma: print correct IRQ on mpc83xx
  fsldma: check for NO_IRQ in fsl_dma_chan_remove()
  dmatest: Use custom map/unmap for destination buffer
  fsldma: use a valid 'device' for dma_pool_create
  dmaengine: fix dependency chaining
2009-01-26 10:13:08 -08:00
Russell King 953a7e8476 [ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-24 11:41:16 +00:00
Guennadi Liakhovetski 86528da229 i.MX31: framebuffer driver
This is a framebuffer driver for i.MX31 SoCs. It only supports synchronous
displays, vertical panning supported, no overlay support.

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-21 10:32:34 -07:00
Stephen Rothwell 5d9ee3ff3d powerpc/ps3: printing fixups for l64 to ll64 conversion drivers/video
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-16 16:15:15 +11:00
Michael Hennerich b46578ed09 video/framebuffer: fix bug: jpegview cannot work on framebuffer device other than 16BPP
Force fb_var_screeninfo color format on all Blackfin Framebuffer Drivers.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-15 16:39:35 -08:00
Geert Uytterhoeven 1fa0b29f3a fbdev: Kill Atari vblank cursor blinking
Kill the last remaining vblank cursor blinking user

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:43 +01:00
Geert Uytterhoeven 639274d810 m68k: atafb - Kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:40 +01:00
Geert Uytterhoeven 2eab7ff843 fbdev: c2p - Rename c2p to c2p_planar
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:32 +01:00
Geert Uytterhoeven 96f47d6105 fbdev: c2p/atafb - Add support for Atari interleaved bitplanes
The c2p() for normal bitplanes is not suitable for interleaved bitplanes with
2 bytes of interleave, causing a garbled penguin logo. Add c2p_iplan2().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:31 +01:00
Geert Uytterhoeven 2cd1de0a0f fbdev: c2p - Extract common c2p core to c2p_core.h
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:31 +01:00
Geert Uytterhoeven 1f034456c1 fbdev: c2p - Cleanups
- Improve comments and naming
  - Convert macros to static inline functions
  - Remove superfluous `break' after `return'
  - Make sure we get a build-time error (undefined reference to
    'c2p_unsupported') in case of future misuse
  - Replace `unsigned long' by `u32' in comp(), as that's what all callers use
  - Use {get,put}_unaligned_be32() in store_planar{,_masked}()
  - Use void * for arbitrary pointers
  - Use a union to represent pixels/words, to avoid casts

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:30 +01:00
Geert Uytterhoeven 8280eb8a33 fbdev: c2p - Correct indentation
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:30 +01:00
Geert Uytterhoeven 74511413dd fbdev: atafb - Fix 16 bpp console
- 16 bpp must use the cfb_*() ops
  - 16 bpp needs to set up info->pseudo_palette[] (was fbcon_cfb16_cmap[] in
    2.4.x)
  - Kill commented out 2.4.x fbcon remnants

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:29 +01:00
Geert Uytterhoeven 02603930da fbdev: atafb - Fix line length handling
- Make sure par->next_line is always set (this was done for Falcon only),
    as all the text console drawing operations need a valid par->next_line,
  - Make sure fix->line_length is always set, as some userspace applications
    need it because they don't have fallback code for the case where it's zero.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:29 +01:00
Linus Torvalds b64dc5a484 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  backlight: Rename the corgi backlight driver to generic
  backlight: add support for Toppoly TDO35S series to tdo24m lcd driver
  backlight: Add suspend/resume support to the backlight core
  bd->props.brightness doesn't reflect the actual backlight level.
  backlight: Support VGA/QVGA mode switching in tosa_lcd
  backlight: Catch invalid input in sysfs attributes
  backlight: Value of ILI9320_RGB_IF2 register should not be hardcoded
  backlight: crbllcd_bl - Use platform_device_register_simple()
  backlight: progear_bl - Use platform_device_register_simple()
  backlight: hp680_bl - Use platform_device_register_simple()
2009-01-09 13:55:13 -08:00
Richard Purdie d00ba72672 backlight: Rename the corgi backlight driver to generic
The corgi backlight driver is really generic code. This rename makes
this a lot clearer and completes the partial rename made a while ago.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 20:52:37 +00:00
Mike Rapoport f4f6bda00f backlight: add support for Toppoly TDO35S series to tdo24m lcd driver
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 20:11:07 +00:00
Russell King 934848daa3 [ARM] Fix realview build
arch/arm/mach-realview/platsmp.c:140: error: 'jiffies' undeclared (first use in this function)
drivers/amba/bus.c:246: error: 'NO_IRQ' undeclared (first use in this function)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-08 16:29:41 +00:00
Richard Purdie c835ee7f41 backlight: Add suspend/resume support to the backlight core
Add suspend/resume support to the backlight core and enable use of it
by appropriate drivers.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 15:37:43 +00:00
Zhang Rui 9be1df98bc bd->props.brightness doesn't reflect the actual backlight level.
Always invoke backlight_update_status when users want to change
the backlight.

For setups where brightness change is an expensive operation,
this could be done in the driver rather than the core.

http://bugzilla.kernel.org/show_bug.cgi?id=12249

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 14:11:30 +00:00
Dmitry Baryshkov 0ec561f4b6 backlight: Support VGA/QVGA mode switching in tosa_lcd
LCD driver on tosa requires reprogramming TG after mode
switching. Add support for switching to QVGA mode.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 12:37:28 +00:00
Pavel Machek 9a2c61a921 backlight: Catch invalid input in sysfs attributes
Check input properly in backlight, echo > brightness should not turn off
the backlight.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix printk warning]
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 12:37:28 +00:00
Denis V. Lunev 866bbdba77 backlight: Value of ILI9320_RGB_IF2 register should not be hardcoded
It is stored in the board specific file
  ./arch/arm/mach-s3c2412/mach-jive.c
as .rgb_if2.

Actually, the value is correct, only semantic is wrong.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08 12:37:28 +00:00