Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
A recent modification to the runtime PM code on mach-shmobile made a wrong
RTPM implementation in the sh_mobile_hdmi driver apparent, which broke
HDMI hotplug detection support on ap4evb. This patch does not implement a
proper dynamic RTPM support for sh_mobile_hdmi, instead it restores the
previous working state by statically enabling it. A more power-efficient
solution should be implemented for the next kernel version.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
If CONFIG_FB_ATY_BACKLIGHT=y but CONFIG_PCI=n:
drivers/video/aty/atyfb_base.c:2272: warning: ‘aty_bl_exit’ defined but not used
If CONFIG_ATARI=y for a modular build:
drivers/video/aty/atyfb_base.c:2794: warning: ‘store_video_par’ defined but not
used
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
platform_device_unregister() needs to unregister the device, not the
driver.
Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Acked-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This patch moves enabling channel for window, because there should
be enabling channel before enabling window. If the sequence is
reversed, it makes the problem in displaying images to lcd panel.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This patch fixes mishandling in virtual resolution checking.
Previously, virtual resolution is changed to virtual_x and virtual_y
which mean the size for buffer allocation, when s3c_fb_check_var is
called by fb_check_var. However, it is meaningless, since virtual_x
and virtual_y are fixed and user cannot change virtual resolution.
Therefore, virtual resolution should be more than resolution
such as xres and yres.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Since fb_info is now refcounted and thus may get freed at any time it
gets unregistered module unloading will try to unregister framebuffer
as stored in platform data on probe though this pointer may
be stale.
Cleanup platform data on framebuffer release.
CC: stable@kernel.org
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Both were buggy: bind would happily scribble over a real graphics
device and unbind wouldn't destroy the framebuffer. Hotplugging
efifb makes no sense anyway, so just disable it.
As an added benefit, we save some runtime memory.
Signed-off-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Running fbcon on an uncached framebuffer is remarkably slow. So try
to enable write combining in efifb.
Without this patch, it takes 5.8 seconds from efifb probe to i915
probe (default options; no plymouth or quiet mode). With this patch,
it only takes 1.7 seconds. That means we wasted over 4 seconds just
writing to UC memory.
Signed-off-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Add a label for error-handling code in the case where only clk_get has
succeeded. Rename the label failed to be consistent with the rest.
A simplified version of the semantic match that finds the missing clk_put
is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
expression e1,e2;
statement S;
@@
e1 = clk_get@p1(...);
... when != e1 = e2
when != clk_put(e1)
when any
if (...) { ... when != clk_put(e1)
when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
} else S
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Reorder the labels at the end of the function to correspond to the order in
which the resources are allocated.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
expression e1,e2;
statement S;
@@
e1 = clk_get@p1(...);
... when != e1 = e2
when != clk_put(e1)
when any
if (...) { ... when != clk_put(e1)
when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
} else S
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Seems this new field was missed, probably due to this driver being merged
around the time this new backlight field was being added. At any rate,
initial the type field to avoid ugly WARN() dumps.
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
If there is no EDID but an LCD panel is detected, generate a CVT
mode from the panel resolution (at 60 Hz), and use this as a
default mode instead of the hardcoded 800x600x8 mode.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The LCDC driver does no longer compile:
CC drivers/video/sh_mobile_meram.o
CC drivers/video/sh_mobile_lcdcfb.o
drivers/video/sh_mobile_lcdcfb.c: In function 'sh_mobile_lcdc_start':
drivers/video/sh_mobile_lcdcfb.c:640:4: error: 'ret' undeclared (first use in this function)
drivers/video/sh_mobile_lcdcfb.c:640:4: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [drivers/video/sh_mobile_lcdcfb.o] Error 1
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
Reported-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
alpha allmodconfig:
drivers/video/mb862xx/mb862xxfbdrv.c: In function 'mb862xxfb_ioctl':
drivers/video/mb862xx/mb862xxfbdrv.c:323: error: implicit declaration of function 'copy_to_user'
drivers/video/mb862xx/mb862xxfbdrv.c:327: error: implicit declaration of function 'copy_from_user'
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6:
gpio/via: rename VIA local config struct
basic_mmio_gpio: split into a gpio library and platform device
gpio: remove some legacy comments in build files
gpio: add trace events for setting direction and value
gpio/pca953x: Use handle_simple_irq instead of handle_edge_irq
gpiolib: export gpiochip_find
gpio: remove redundant Kconfig depends on GPIOLIB
basic_mmio_gpio: convert to non-__raw* accessors
basic_mmio_gpio: support direction registers
basic_mmio_gpio: support different input/output registers
basic_mmio_gpio: detect output method at probe time
basic_mmio_gpio: request register regions
basic_mmio_gpio: allow overriding number of gpio
basic_mmio_gpio: convert to platform_{get,set}_drvdata()
basic_mmio_gpio: remove runtime width/endianness evaluation
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (57 commits)
regulator: Fix 88pm8607.c printk format warning
input: Add support for Qualcomm PMIC8XXX power key
input: Add Qualcomm pm8xxx keypad controller driver
mfd: Add omap-usbhs runtime PM support
mfd: Fix ASIC3 SD Host Controller Configuration size
mfd: Fix omap_usbhs_alloc_children error handling
mfd: Fix omap usbhs crash when rmmoding ehci or ohci
mfd: Add ASIC3 LED support
leds: Add ASIC3 LED support
mfd: Update twl4030-code maintainer e-mail address
mfd: Correct the name and bitmask for ab8500-gpadc BTempPullUp
mfd: Add manual ab8500-gpadc batt temp activation for AB8500 3.0
mfd: Provide ab8500-core enumerators for chip cuts
mfd: Check twl4030-power remove script error condition after i2cwrite
mfd: Fix twl6030 irq definitions
mfd: Add phoenix lite (twl6025) support to twl6030
mfd: Avoid to use constraint name in 88pm860x regulator driver
mfd: Remove checking on max8925 regulator[0]
mfd: Remove unused parameter from 88pm860x API
mfd: Avoid to allocate 88pm860x static platform data
...
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (33 commits)
OMAP3: PM: Boot message is not an error, and not helpful, remove it
OMAP3: cpuidle: change the power domains modes determination logic
OMAP3: cpuidle: code rework for improved readability
OMAP3: cpuidle: re-organize the C-states data
OMAP3: clean-up mach specific cpuidle data structures
OMAP3 cpuidle: remove useless SDP specific timings
usb: otg: OMAP4430: Powerdown the internal PHY when USB is disabled
usb: otg: OMAP4430: Fixing the omap4430_phy_init function
usb: musb: am35x: fix compile error when building am35x
usb: musb: OMAP4430: Power down the PHY during board init
omap: drop board-igep0030.c
omap: igep0020: add support for IGEP3
omap: igep0020: minor refactoring
omap: igep0020: name refactoring for future merge with IGEP3
omap: Remove support for omap2evm
arm: omap2plus: GPIO cleanup
omap: musb: introduce default board config
omap: move detection of NAND CS to common-board-devices
omap: use common initialization for PMIC i2c bus
omap: consolidate touch screen initialization among different boards
...
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
With the addition of the platform device mfd_cell pointer, we can now
cleanly pass the sub device drivers platform data pointers through the
regular device platform_data one, and get rid of mfd_get_data().
Cc: Ian Molton <spyro@f2s.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Fix this:
drivers/video/mb862xx/mb862xx-i2c.c: In function 'mb862xx_i2c_wait_event':
drivers/video/mb862xx/mb862xx-i2c.c:25: error: implicit declaration of function 'udelay'
caused by commit f8a6b1f448 ("video: mb862xx: add support for
controller's I2C bus adapter").
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (126 commits)
sh_mobile_meram: Safely disable MERAM operation when not initialized
video: mb862xxfb: add support for L1 displaying
video: mb862xx: add support for controller's I2C bus adapter
video: mb862xxfb: relocate register space to get contiguous vram
video: mb862xxfb: use pre-initialized configuration for PCI GDCs
video: mb862xxfb: correct fix.smem_len field initialization
video: s3c-fb: correct transparency checking in 32bpp
video: s3c-fb: add gpio setup function to resume function
fbdev/amifb: Remove superfluous alignment of frame buffer memory
fbdev/amifb: Do not call panic() if there's not enough Chip RAM
fbdev/amifb: Correct check for video memory size
video: mb862xxfb: Require either FB_MB862XX_PCI_GDC or FB_MB862XX_LIME
video: s3c-fb: add window variant information for S5P
video: s3c-fb: add additional validate bpps
video: s3c-fb: correct window osd size offset values
udlfb: include prefetch.h explicitly
drivers/video/s3c2410fb.c: Convert release_resource to release_mem_region
drivers/video/sm501fb.c: Convert release_resource to release_mem_region
drivers/video: Convert release_resource to release_mem_region
video, udlfb: Fix two build warnings about 'ignoring return value'
...
It should check if strict_strtoul() succeeds.
[akpm@linux-foundation.org: don't override strict_strtoul() return value]
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
If the MERAM platform data is defined, but the MERAM has not been
properly initaliazed we need to safely fall back to non-MERAM operation.
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Allow displaying L1 video data on top of the primary L0 layer.
The L1 layer position and dimensions can be configured and the
layer enabled/disabled by using the appropriate L1 controls
added by this patch.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Add adapter driver for I2C adapter in Coral-P(A)/Lime GDCs.
So we can easily access devices on controller's I2C bus using
i2c-dev interface.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
By default the GDC registers are located in the middle of the 64MiB
area for video RAM and registers. When 32MiB VRAM or more is used,
relocate the register space to the top of the 64MiB space so that
we get the contiguous VRAM for GDC frame buffer layers, drawing
frames, capture and cursor buffers.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
If the bootloader has already initialized the display
controller, do not re-initialize it in the driver. Take over
the bootloader's configuration instead. This is already supported
for non PCI GDCs Lime and Mint. Add this functionality for PCI
GDCs Coral-P and Coral-PA. It is useful to avoid flicker and
also avoids unneeded init delays while booting.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Initialize smem_len field to the actual frame buffer size and
not to the whole video RAM size. This prevents overwriting
other video memory (which could be used by other layers, cursors
or accelerated drivers) by frame buffer applications relying on
fix.smem_len.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
32bpp means ARGB 8888 in the driver, therfore the transparency length
and offset should be 8 and 24 respectively. However, the transparency
length and offset were previously 0, which means that the driver supports
RGB 888 without alpha blending when 32bpp is used.
So, the transparency checking in 32bpp is corrected so that the
transparency length and offset are 8 and 24 respectively.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This patch adds gpio setup function to resume function to ensure
gpio used by FIMD IP and LCD panel during a resume.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
amiga_chip_alloc() already aligns to the PAGE_SIZE
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The check should compare the available memory size with the highest allocation
value (VIDEOMEMSIZE_*_2M), not with the lowest value (VIDEOMEMSIZE_*_1M).
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The driver can be built as either a PCI or platform (OF) driver. It
might make sense to built it as both (though that is not currently
possible) but it certainly doesn't make sense to build it as neither!
Add dependencies and add a choice group to ensure that exactly one of
FB_MB862XX_PCI_GDC and FB_MB862XX_LIME is selected.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Compared to s3c64xx, S5P series such as S5PC100 and S5PV210 have
the different window features including valid bpp, palette size
and palette bpp. Therefore, window variant information for S5P
should be added.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Additional validate bpps are added to windows as follows:
window0: 18 bpp for RGB666
window1, 2 and 3: 28 bpp for ARGB4888
window4: 19 bpp for ARGB1666, 28 bpp for ARGB4888
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Offset values for OSD size registers of window 1 and 2 are corrected.
The offset values of OSD size registers are as follows:
window0: VIDOSDC (0x8)
window1 and 2: VIDOSDD (0xc)
window3 and 4: not present
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Commit e66eed651f ("list: remove prefetching from
regular list iterators") removed the include of prefetch.h from list.h,
so we need to include it explicitly, now.
fixes this build error on powerpc:
drivers/video/udlfb.c: In function 'dlfb_compress_hline':
drivers/video/udlfb.c:421: error: implicit declaration of function 'prefetch_range'
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Request_mem_region should be used with release_mem_region, not
release_resource.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@s exists@
expression e1,e2,e3,e4,e;
@@
*e4 = request_mem_region(e1,e2,e3)
... when != e4 = e
*release_resource(e4);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Request_mem_region should be used with release_mem_region, not
release_resource.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@s exists@
expression e1,e2,e3,e4,e;
@@
*e4 = request_mem_region(e1,e2,e3)
... when != e4 = e
*release_resource(e4);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Request_mem_region should be used with release_mem_region, not
release_resource.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@s exists@
expression e1,e2,e3,e4,e;
@@
*e4 = request_mem_region(e1,e2,e3)
... when != e4 = e
*release_resource(e4);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
build warning:
...
drivers/video/udlfb.c:1590: warning: ignoring return value of ‘device_create_file’, declared with attribute warn_unused_result
drivers/video/udlfb.c:1592: warning: ignoring return value of ‘device_create_bin_file’, declared with attribute warn_unused_result
...
So add two checks to get rid of 'em.
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>