aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-12-29DMI: add dmi_matchJiri Slaby
Add a wrapper for testing system_info which will handle also NULL system infos. This will be used by the ata PIIX driver. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk> Cc: Tejun Heo <tj@kernel.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-29libata: blacklist NCQ on OCZ CORE 2 SSD (resend)Lubomir Bulej
The patchlet below blacklists NCQ on OCZ CORE v2 SSD drive(s). Even though the drive advertises NCQ support with queue depth 1, it responds with all-zeroes FIS to NCQ commands which triggers ata error handling several times before the kernel decides to disable NCQ on the drive. Signed-off-by: Lubomir Bulej <lubomir.bulej@dsrg.mff.cuni.cz> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-29[ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devicesEric Miao
PXA27x and later processors support overlay1 and overlay2 on-top of the base framebuffer (although under-neath the base is also possible). They support palette and no-palette RGB formats, as well as YUV formats (only available on overlay2). These overlays have dedicated DMA channels and behave in a similar way as a framebuffer. This heavily simplified and re-structured work is based on the original pxafb_overlay.c (which is pending for mainline merge for a long time). The major problems with this pxafb_overlay.c are (if you are interested in the history): 1. heavily redundant (the control logics for overlay1 and overlay2 are actually identical except for some small operations, which are now abstracted into a 'pxafb_layer_ops' structure) 2. a lot of useless and un-tested code (two workarounds which are now fixed on mature silicons) 3. cursorfb is actually useless, hardware cursor should not be used this way, and the code was actually un-tested for a long time. The code in this patch should be self-explanatory, I tried to add minimum comments. As said, this is basically simplified, there are several things still on the pending list: 1. palette mode is un-supported and un-tested (although re-using the palette code of the base framebuffer is actually very easy now with previous clean-up patches) 2. fb_pan_display for overlay(s) is un-supported 3. the base framebuffer can actually be abstracted by 'pxafb_layer' as well, which will help further re-use of the code and keep a better and consistent structure. (This is the reason I named it 'pxafb_layer' instead of 'pxafb_overlay' or something alike) See Documentation/fb/pxafb.txt for additional usage information. Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
2008-12-29[ARM] pxafb: cleanup of the timing checking codeEric Miao
Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
2008-12-29[ARM] pxafb: cleanup of the color format manipulation codeEric Miao
1. introduce var_to_depth() to calculate the color depth including the transparency bit 2. the conversion from 'fb_var_screeninfo' to LCCR3 BPP bits can be re- used by overlays (in OVLxC1), thus an individual pxafb_var_to_bpp() has been separated out. 3. pxafb_setmode() should really set the color bitfields correctly at begining, introduce a pxafb_set_pixfmt() for this 4. allow user apps to specify color formats within fb_var_screeninfo, and checking of this in pxafb_check_var() has been simplified as below: a) pxafb_var_to_bpp() should pass - which means a basically correct bits_per_pixel and color depth setting b) the RGBT bitfields are then forced into supported values by pxafb_set_pixfmt() Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
2008-12-29[ARM] pxafb: add palette format support for LCCR4_PAL_FOR_3Eric Miao
Add the palette format support for LCCR4_PAL_FOR_3, and fix the issue of LCCR4 being never assigned. Also remove the useless pxafb_set_truecolor(). Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
2008-12-29[ARM] pxafb: add support for FBIOPAN_DISPLAY by dma brachingEric Miao
dma branching is enabled by extending the current setup_frame_dma() function to allow a 2nd set of frame/palette dma descriptors to be used. As a result, pxafb_dma_buff.dma_desc[], pxafb_dma_buff.pal_desc[] and pxafb_info.fdadr[] are doubled. This allows maximum re-use of the current dma setup code, although the pxafb_info.fdadr[xx] for FBRx register values looks a bit odd. Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
2008-12-29[ARM] pxafb: allow pxafb_set_par() to start from arbitrary yoffsetEric Miao
Note the var->yres_virtual is only re-calculated from the fix.smem_len when text mode acceleration is enabled (which is default), this is due to the issue as Russell suggested below: Previous experience of doing this with the X server and acornfb is that it causes all sorts of problems - it seems to force the X server into assuming that the framebuffer should be panned no matter what settings you ask it for. The recommended workaround (implemented in acornfb) is to only do these kinds of adjustments if text mode acceleration is enabled. IIRC, the X server should be disabling text mode acceleration when it maps the framebuffer. I seem to remember that there are X servers which forget to do that though. Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
2008-12-29[ARM] pxafb: allow video memory size to be configurableEric Miao
The amount of video memory size is decided according to the following order: 1. <xres> x <yres> x <bits_per_pixel> by default, which is the backward compatible way 2. size specified in platform data 3. size specified in module parameter 'options' string or specified in kernel boot command line (see updated Documentation/fb/pxafb.txt) And now since the memory is allocated from system memory, the pxafb_mmap can be removed and the default fb_mmap() should be working all right. Also, since we now have introduced the 'struct pxafb_dma_buff' for DMA descriptors and palettes, the allocation can be separated cleanly. NOTE: the LCD DMA actually supports chained transfer (i.e. page-based transfers), to simplify the logic and keep the performance (with less TLB misses when accessing from memory mapped user space), the memory is allocated by alloc_pages_*() to ensures it's physical contiguous. Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
2008-12-29[ARM] pxa: add document on the MFP design and how to use itEric Miao
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-29[ARM] sa1100_wdt: don't assume CLOCK_TICK_RATE to be a constantEric Miao
See description of commit: [ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constant for additional information. Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-29[ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constantEric Miao
As Nicolas and Russell pointed out, CLOCK_TICK_RATE is no more a constant on PXA when multiple processors and platforms are selected, change TIMER_FREQ in rtc-sa1100.c into a variable. Since the code to decide the clock tick rate is re-used from timer.c, introduce a common get_clock_tick_rate() for this. Signed-off-by: Eric Miao <eric.miao@marvell.com> Acked-by: Nicolas Pitre <nico@marvell.com>
2008-12-29[ARM] pxa/tavorevb: update board support (smartpanel LCD + keypad)Eric Miao
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-29Merge branch 'topic/failslab' into for-linusPekka Enberg
Conflicts: mm/slub.c Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2008-12-29Merge branches 'topic/fixes', 'topic/cleanups' and 'topic/documentation' ↵Pekka Enberg
into for-linus
2008-12-29slub: avoid leaking caches or refcounts on sysfs errorDavid Rientjes
If a slab cache is mergeable and the sysfs alias cannot be added, the target cache shall have its refcount decremented. kmem_cache_create() will return NULL, so if kmem_cache_destroy() is ever called on the target cache, it will never be freed if the refcount has been leaked. Likewise, if a slab cache is not mergeable and the sysfs link cannot be added, the new cache shall be removed from the slab_caches list. kmem_cache_create() will return NULL, so it will be impossible to call kmem_cache_destroy() on it. Both of these operations require slub_lock since refcount of all slab caches and slab_caches are protected by the lock. In the mergeable case, it would be better to restore objsize and offset back to their original values, but this could race with another merge since slub_lock was dropped. Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2008-12-29slab: Fix comment on #endifPascal Terjan
This #endif in slab.h is described as closing the inner block while it's for the big CONFIG_NUMA one. That makes reading the code a bit harder. This trivial patch fixes the comment. Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2008-12-29slab: remove GFP_THISNODE clearing from alloc_slabmgmt()Pekka Enberg
Commit 6cb062296f73e74768cca2f3eaf90deac54de02d ("Categorize GFP flags") left one call-site in alloc_slabmgmt() to clear GFP_THISNODE instead of GFP_CONSTRAINT_MASK. Unfortunately, that ends up clearing __GFP_NOWARN and __GFP_NORETRY as well which is not what we want. As the only caller of alloc_slabmgmt() already clears GFP_CONSTRAINT_MASK before passing local_flags to it, we can just remove the clearing of GFP_THISNODE. This patch should fix spurious page allocation failure warnings on the mempool_alloc() path. See the following URL for the original discussion of the bug: http://lkml.org/lkml/2008/10/27/100 Acked-by: Christoph Lameter <cl@linux-foundation.org> Reported-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2008-12-29slub: Add might_sleep_if() to slab_alloc()OGAWA Hirofumi
Currently SLUB doesn't warn about __GFP_WAIT. Add it into slab_alloc(). Acked-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2008-12-29SLUB: failslab supportAkinobu Mita
Currently fault-injection capability for SLAB allocator is only available to SLAB. This patch makes it available to SLUB, too. [penberg@cs.helsinki.fi: unify slab and slub implementations] Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2008-12-29drm/i915: fix modeset devname allocation + agp init return check.Dave Airlie
devname needs to be allocated before the irq is installed, so the irq routines get the correct name in /proc. Also check the return value from the AGP init function, and fixup the exit points. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm/i915: Remove redundant test in error path.Julia Lawall
The error path for object list being null is in the second goto target. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm: Add a debug node for vblank state.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm: Avoid use-before-null-test on dev in drm_cleanup().Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: Don't print to dmesg when taking signal during object_pin.Eric Anholt
This showed up in logs where people had a hung chip, so pinning was blocked on the chip unpinning other buffers, and the X Server took its scheduler signal during that time. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm: pin new and unpin old buffer when setting a mode.Kristian Høgsberg
This removes the requirement for user space to pin a buffer before setting a mode that is backed by the pixels from that buffer. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: un-EXPORT and make 'intelfb_panic' staticHannes Eder
Fix this sparse warning: drivers/gpu/drm/i915/intel_fb.c:417:5: warning: symbol 'intelfb_panic' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: Delete unused, pointless i915_driver_firstopen.Eric Anholt
Thanks to Hannes Eder for pointing out that this code was dead according to sparse. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: fix sparse warnings: returning void-valued expressionHannes Eder
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: fix sparse warnings: move 'extern' decls to header fileHannes Eder
Move 'extern'-decls from "intel_dvo.c" to "dvo.h", as "dvo.h" is included by and only by files where the symbols are either defined or used. Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: fix sparse warnings: make symbols staticHannes Eder
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: fix sparse warnings: declare one-bit bitfield as unsignedHannes Eder
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: Don't double-unpin buffers if we take a signal in evict_everything().Eric Anholt
We haven't seen this in practice, but it was visible when looking at a bug report from when i915_gem_evict_everything() was broken and would always return error. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-12-29drm/i915: Fix fbcon setup to align display pitch to 64b.Eric Anholt
This is required by the display plane, and fixes 1400x1050 laptop displays. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm/i915: Add missing userland definitions for gem init/execbuffer.Eric Anholt
fdo bug #19132. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29i915/drm: provide compat defines for userspace for certain struct members.Dave Airlie
Painfully userspace started using new names that were never actually to be used from the external repo. Also fill out the gaps in the structure for old/new userspace compat Add compat defines for these structs. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm: drop DRM_IOCTL_MODE_REPLACEFB, add+remove works just as well.Kristian H�gsberg
The replace fb ioctl replaces the backing buffer object for a modesetting framebuffer object. This can be acheived by just creating a new framebuffer backed by the new buffer object, setting that for the crtcs in question and then removing the old framebuffer object. Signed-off-by: Kristian Hogsberg <krh@redhat.com> Acked-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm: sanitise drm modesetting API + remove unused hotplugJakob Bornecrantz
The initially merged modesetting API has some uglies in it, this cleans up the struct members and ioctl ordering for initial submission. It also removes the unneeded hotplug infrastructure. airlied:- I've pulled this patch in from git modesetting-gem tree. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm: fix allowing master ioctls on non-master fds.Dave Airlie
The multi-master patches changed master to a pointer, and this fell out, change to use is_master. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm/radeon: use locked rmmap to remove sarea mapping.Dave Airlie
this exports the locked version of the symbol as struct_mutex locks it all. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm/radeon: fix missing hunk from the master changes.Dave Airlie
Thanks to Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> for reporting this. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm: fix useless gcc unused variable warningDave Airlie
the calling function doesn't call this function unless one of the two states that sets the value is true. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm/radeon: fix warning due to PAGE_SIZE maxDave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm: kconfig have drm core select i2c for kmsDave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm: PAGE_CACHE_WC is x86 only so farDave Airlie
The page protections need to be checked whether they need to be more flexible. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm: pick an 800x600@60HZ mode by default for unknown CRT.Dave Airlie
This is what X picks now, so we should do the same. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm/i915: Fix stolen memory detection on G45 and GM45.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29drm/i915: Register module dependencies for the modesetting code.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29DRM: i915: add mode setting supportJesse Barnes
This commit adds i915 driver support for the DRM mode setting APIs. Currently, VGA, LVDS, SDVO DVI & VGA, TV and DVO LVDS outputs are supported. HDMI, DisplayPort and additional SDVO output support will follow. Support for the mode setting code is controlled by the new 'modeset' module option. A new config option, CONFIG_DRM_I915_KMS controls the default behavior, and whether a PCI ID list is built into the module for use by user level module utilities. Note that if mode setting is enabled, user level drivers that access display registers directly or that don't use the kernel graphics memory manager will likely corrupt kernel graphics memory, disrupt output configuration (possibly leading to hangs and/or blank displays), and prevent panic/oops messages from appearing. So use caution when enabling this code; be sure your user level code supports the new interfaces. A new SysRq key, 'g', provides emergency support for switching back to the kernel's framebuffer console; which is useful for testing. Co-authors: Dave Airlie <airlied@linux.ie>, Hong Liu <hong.liu@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29DRM: add mode setting supportDave Airlie
Add mode setting support to the DRM layer. This is a fairly big chunk of work that allows DRM drivers to provide full output control and configuration capabilities to userspace. It was motivated by several factors: - the fb layer's APIs aren't suited for anything but simple configurations - coordination between the fb layer, DRM layer, and various userspace drivers is poor to non-existent (radeonfb excepted) - user level mode setting drivers makes displaying panic & oops messages more difficult - suspend/resume of graphics state is possible in many more configurations with kernel level support This commit just adds the core DRM part of the mode setting APIs. Driver specific commits using these new structure and APIs will follow. Co-authors: Jesse Barnes <jbarnes@virtuousgeek.org>, Jakob Bornecrantz <jakob@tungstengraphics.com> Contributors: Alan Hourihane <alanh@tungstengraphics.com>, Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>