Commit graph

3779 commits

Author SHA1 Message Date
Tejun Heo 181b74ef79 video: don't use flush_scheduled_work() in fb_defio
flush_scheduled_work() in on the way out.  fb_deferred_io_cleanup()
can simply sync-cancel info->deferred_work instead of cancel +
flush_scheduled_work().  Drop flush_scheduled_work() usage.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jaya Kumar <jayalk@intworks.biz>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-16 15:36:52 +09:00
Manuel Lauss 1630d85a83 au1200fb: fix hardcoded IRQ
Use the IRQ provided by platform resource information.
Required for Au1300 support.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:49:17 +09:00
Manuel Lauss 4ee5846151 au1200fb: switch to FB_SYS helpers
Since all video memory is in system ram, use FB_SYS helpers.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:49:10 +09:00
Manuel Lauss 8be90b07ac au1200fb: make number of windows configurable at load time.
Make the number of framebuffer windows and the window configuration
selectable at the kernel commandline instead of hardcoding it
in the kernel config.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:49:03 +09:00
Manuel Lauss 98707fcc04 au1200fb: fixup PM
Remove last traces of the unused custom Alchemy PM code, implement
suspend/resume callbacks.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:48:59 +09:00
Manuel Lauss c329f606a2 au1200fb: use framebuffer_alloc()
Convert to use framebuffer_alloc() instead of using fb_info embedded
into device context (which broke the driver in the past due to un-
initialized elements).

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:48:54 +09:00
Paul Mundt fc90ec8629 Merge branch 'fbdev/panning-fixes' 2011-06-15 15:48:40 +09:00
Laurent Pinchart e6c4d3d43d fbdev: da8xx: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Martin Ambrose <martin@ti.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:49 +09:00
Laurent Pinchart 3478b1cd43 vt8500lcdfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:45 +09:00
Laurent Pinchart 83f0e27c25 vt8623fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ondrej Zajicek <santiago@crfreenet.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:40 +09:00
Laurent Pinchart c6990b775d 68328fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:36 +09:00
Laurent Pinchart 7b8067f202 arkfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:32 +09:00
Laurent Pinchart 3b30f9f437 g364fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:27 +09:00
Laurent Pinchart f316fe726a mb862xxfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:23 +09:00
Laurent Pinchart 3362903cad s3c-fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:19 +09:00
Laurent Pinchart aa7984cf51 fbdev: unicore32: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:15 +09:00
Laurent Pinchart 1dbe8514fd acornfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:10 +09:00
Laurent Pinchart 1fdb518f9f pm3fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:06 +09:00
Laurent Pinchart df2d798109 hgafb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ferenc Bakonyi <fero@drama.obuda.kando.hu>
Cc: Brent Cook <busterb@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:04:02 +09:00
Laurent Pinchart ff55fe9ac1 radeonfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it. Also use the
aligned fix.line_length and not the (possible) unaligned xres_virtual.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:58 +09:00
Laurent Pinchart 4d3c68a1b4 vga16fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Antonino A. Daplas <adaplas@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:54 +09:00
Laurent Pinchart e4c735af00 tridentfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:50 +09:00
Laurent Pinchart 635e9620e8 intelfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Maik Broemme <mbroemme@plusserver.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:45 +09:00
Laurent Pinchart 895607ec5c atmel_lcdfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:41 +09:00
Laurent Pinchart 5dac151837 sisfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Fix checkpatch.pl warnings in the surrounding code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:37 +09:00
Laurent Pinchart df9306de45 pm2fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:33 +09:00
Laurent Pinchart c2d340a403 gxt4500: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:29 +09:00
Laurent Pinchart c12665ffcf imsttfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:24 +09:00
Laurent Pinchart eca7370bd2 sm501fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:20 +09:00
Laurent Pinchart 1388f6a772 savagefb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it. Also use the
aligned fix.line_length and not the (possible) unaligned xres_virtual.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tormod Volden <debian.tormod@gmail.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:16 +09:00
Laurent Pinchart 2bdb0278ee neofb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:12 +09:00
Laurent Pinchart 4ee99f7e2e mx3fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it. Also use the
aligned fix.line_length and not the (possible) unaligned xres_virtual.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:08 +09:00
Laurent Pinchart a4aadc9311 s3fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:03:03 +09:00
Laurent Pinchart a1bb7010d4 acornfb: Dont BUG() on invalid pan parameters
The driver currently BUG()s if the pan parameters passed directly from
userspace are invalid. Return -EINVAL instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:02:59 +09:00
Laurent Pinchart 0cf9cd026a vfb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 15:02:51 +09:00
Guennadi Liakhovetski d521dd944e fbdev: sh_mobile_hdmi: fix regression: statically enable RTPM
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>
2011-06-15 14:51:46 +09:00
Geert Uytterhoeven d64c132ffe fbdev/atyfb: Fix 2 defined-but-not-used warnings
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>
2011-06-14 16:37:49 +09:00
Wanlong Gao e6b8480cdf efifb: Fix call to wrong unregister function
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>
2011-06-14 16:37:46 +09:00
Jingoo Han fab7c5b778 video: s3c-fb: move enabling channel for window
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>
2011-06-09 14:59:56 +09:00
Jingoo Han 13e6af8886 video: s3c-fb: fix virtual resolution checking
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>
2011-06-09 14:59:52 +09:00
Jingoo Han 72ba4cb608 video: s3c-fb: fix misleading kfree in remove function
This patch fixes misleading kfree in remove function.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-09 14:59:48 +09:00
Bruno Prémont a50d28de8d video: Fix use-after-free by vga16fb on rmmod
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>
2011-06-06 18:14:45 +09:00
Joe Perches 1b86d775dd video: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-02 17:25:35 +09:00
Andy Lutomirski bb8b266272 efifb: Disallow manual bind and unbind
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>
2011-06-02 17:18:07 +09:00
Andy Lutomirski da0241f12b efifb: Fix mismatched request/release_mem_region
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>
2011-06-02 17:18:05 +09:00
Andy Lutomirski 3c004b4f7e efifb: Enable write-combining
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>
2011-06-02 17:18:04 +09:00
Julia Lawall 0057f1809d drivers/video/pxa168fb.c: add missing clk_put
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>
2011-06-02 17:07:46 +09:00
Julia Lawall 609d3bbf04 drivers/video/imxfb.c: add missing clk_put
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>
2011-06-02 17:07:41 +09:00
Steven Miao 70f289db31 fbdev: bf537-lq035: add missing blacklight properties type
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>
2011-06-02 17:07:35 +09:00
Tormod Volden 1bae852fb0 savagefb: Use panel CVT mode as default
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>
2011-06-02 17:05:18 +09:00