aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2014-09-11drm/msm: don't crash if no msm.vram paramRob Clark1-1/+1
If VRAM carveout is used, due to no IOMMU, we should have a default value for msm.vram so that we don't simply crash. Reported-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2014-09-11drm/msm/hdmi: fix build break on non-CCF platformsRob Clark1-2/+13
Reported-by: Russell King <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2014-09-11drm/msm: Change nested function to static functionMark Charlebois1-22/+24
There is currently a nested function in Russel King's tree for the msm HDMI driver. The last nested function was removed from the Linux kernel when the Thinkpad driver was fixed. I believe nested functions are not desired upstream, and it also breaks compilation with clang so here is a patch to change the nested function into static function. The patch works with both clang and gcc. Signed-off-by: Mark Charlebois <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2014-09-11Merge tag 'drm-intel-fixes-2014-09-10' of ↵Dave Airlie7-221/+300
git://anongit.freedesktop.org/drm-intel into drm-fixes more fixes for 3.17, almost all Cc: stable material. * tag 'drm-intel-fixes-2014-09-10' of git://anongit.freedesktop.org/drm-intel: drm/i915: Wait for vblank before enabling the TV encoder drm/i915: Evict CS TLBs between batches drm/i915: Fix irq enable tracking in driver load drm/i915: Fix EIO/wedged handling in gem fault handler drm/i915: Prevent recursive deadlock on releasing a busy userptr
2014-09-11Merge branch 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie4-15/+31
into drm-fixes Just a few fixes for radeon for 3.17. * 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux: drm/radeon/dpm: set the thermal type properly for special configs drm/radeon: reduce memory footprint for debugging drm/radeon: add connector quirk for fujitsu board drm/radeon: fix semaphore value init drm/radeon: only use me/pfp sync on evergreen+
2014-09-11dmaengine: jz4740: Fix non-cyclic descriptor completionLars-Peter Clausen1-1/+2
We need to make sure to deqeueue the descriptor from the active list before we call vchan_cookie_complete(). Also we need obviously only set chan->desc to NULL after we stopped using it. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2014-09-10usb: chipidea: msm: Initialize PHY on reset eventIvan T. Ivanov1-0/+1
Initialize USB PHY after every Link controller reset Cc: 3.16+ <[email protected]> Cc: Tim Bird <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Ivan T. Ivanov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-10usb: chipidea: msm: Use USB PHY API to control PHY stateIvan T. Ivanov1-5/+1
PHY drivers keep track of the current state of the hardware, so don't change PHY settings under it. Cc: 3.16+ <[email protected]> Cc: Tim Bird <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Ivan T. Ivanov <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-10usb: hub: take hub->hdev reference when processing from eventlistJoe Lawrence1-1/+3
During surprise device hotplug removal tests, it was observed that hub_events may try to call usb_lock_device on a device that has already been freed. Protect the usb_device by taking out a reference (under the hub_event_lock) when hub_events pulls it off the list, returning the reference after hub_events is finished using it. Signed-off-by: Joe Lawrence <[email protected]> Suggested-by: David Bulkow <[email protected]> for using kref Suggested-by: Alan Stern <[email protected]> for placement Acked-by: Alan Stern <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-10uas: Disable uas on ASM1051 devicesHans de Goede1-4/+23
There are a large numbers of issues with ASM1051 devices in uas mode: 1) They do not support REPORT SUPPORTED OPERATION CODES 2) They use out of spec 8 byte status iu-s when they have no sense data, switching to normal 16 byte status iu-s when they do have sense data. 3) They hang / crash when combined with some disks, e.g. a Crucial M500 ssd. 4) They hang / crash when stressed (through e.g. sg_reset --bus) with disks with which then normally do work (once 1 & 2 are worked around). Where as in BOT mode they appear to work fine, so the best way forward with these devices is to just blacklist them for uas usage. Unfortunately this is easier said then done. as older versions of the ASM1053 (which works fine) use the same usb-id as the ASM1051. When connected over USB-3 the 2 can be told apart by the number of streams they support. So this patch adds some less then pretty code to disable uas for the ASM1051. When connected over USB-2, simply disable uas alltogether for devices with the shared usb-id. Cc: [email protected] # 3.16 Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-10Input: serport - add compat handling for SPIOCSTYPE ioctlJohn Sung1-7/+38
When running a 32-bit inputattach utility in a 64-bit system, there will be error code "inputattach: can't set device type". This is caused by the serport device driver not supporting compat_ioctl, so that SPIOCSTYPE ioctl fails. Cc: [email protected] Signed-off-by: John Sung <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-09-10Input: atmel_mxt_ts - fix double free of input deviceStephen Warren1-5/+13
[Nick Dyer: reworked to move free of input device into separate function and only call in paths that require it.] Signed-off-by: Nick Dyer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-09-10drm/radeon: add RADEON_GEM_NO_CPU_ACCESS BO creation flag (v4)Alex Deucher1-0/+1
Allows pinning of buffers in the non-CPU visible portion of vram. v2: incorporate Michel's comments. v3: rebase on Michel's patch v4: rebase on Michel's v2 patch Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
2014-09-10drm/radeon: Clean up assignment of TTM placement lpfn member for pinningMichel Dänzer1-9/+5
This sets the lpfn member to 0 instead of the full domain size. TTM uses the full domain size when lpfn is 0. Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-09-10drm/radeon: Add RADEON_GEM_CPU_ACCESS BO creation flagMichel Dänzer1-2/+9
This flag is a hint that userspace expects the BO to be accessed by the CPU. We can use that hint to prevent such BOs from ever being stored in the CPU inaccessible part of VRAM. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-09-10dm cache: fix race causing dirty blocks to be marked as cleanAnssi Hannula1-2/+2
When a writeback or a promotion of a block is completed, the cell of that block is removed from the prison, the block is marked as clean, and the clear_dirty() callback of the cache policy is called. Unfortunately, performing those actions in this order allows an incoming new write bio for that block to come in before clearing the dirty status is completed and therefore possibly causing one of these two scenarios: Scenario A: Thread 1 Thread 2 cell_defer() . - cell removed from prison . - detained bios queued . . incoming write bio . remapped to cache . set_dirty() called, . but block already dirty . => it does nothing clear_dirty() . - block marked clean . - policy clear_dirty() called . Result: Block is marked clean even though it is actually dirty. No writeback will occur. Scenario B: Thread 1 Thread 2 cell_defer() . - cell removed from prison . - detained bios queued . clear_dirty() . - block marked clean . . incoming write bio . remapped to cache . set_dirty() called . - block marked dirty . - policy set_dirty() called - policy clear_dirty() called . Result: Block is properly marked as dirty, but policy thinks it is clean and therefore never asks us to writeback it. This case is visible in "dmsetup status" dirty block count (which normally decreases to 0 on a quiet device). Fix these issues by calling clear_dirty() before calling cell_defer(). Incoming bios for that block will then be detained in the cell and released only after clear_dirty() has completed, so the race will not occur. Found by inspecting the code after noticing spurious dirty counts (scenario B). Signed-off-by: Anssi Hannula <[email protected]> Acked-by: Joe Thornber <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Cc: [email protected]
2014-09-10drm/msm/adreno: push dump/show stuff to base classRob Clark3-35/+39
Add ptr to list of interesting registers to 'struct adreno_gpu' and use that to move most of the debugfs show and register dump bits down into adreno_gpu. This will avoid duplication as support for additional adreno generations is added. Signed-off-by: Rob Clark <[email protected]>
2014-09-10drm/msm/adreno: bit of init refactoringRob Clark4-41/+40
Push a few bits down into adreno_gpu so they won't have to be duplicated as support for additional adreno generations is added. Signed-off-by: Rob Clark <[email protected]>
2014-09-10drm/msm/adreno: move decision about what gpu to to loadRob Clark5-99/+128
Move this into into adreno_device, and decide based on gpu revision rather than just assuming a3xx. Signed-off-by: Rob Clark <[email protected]>
2014-09-10drm/msm/adreno: split adreno device out into it's own fileRob Clark5-159/+174
We'd rather not duplicate these parts as support for additional gpu generations is added. Signed-off-by: Rob Clark <[email protected]>
2014-09-10drm/panel/simple: add optronics B101XTN01.0 (v3)Rob Clark1-0/+27
LVDS panel, make/model described as: AU Optronics Corporation - B101XTN01.0 (H/W:0A) See: http://www.encore-electronic.com/media/B101XTN01.0.pdf Tested with panel attached to an Inforce IFC6410 board. Signed-off-by: Rob Clark <[email protected]>
2014-09-10drm/msm/mdp4: add LVDS panel supportRob Clark8-10/+933
LVDS panel support uses the LCDC (parallel) encoder. Unlike with HDMI, there is not a separate LVDS block, so no need to split things into a bridge+connector. Nor is there is anything re-used with mdp5. Note that there can be some regulators shared between HDMI and LVDS (in particular, on apq8064, ext_3v3p), so we should not use the _exclusive() variants of devm_regulator_get(). The drm_panel framework is used for panel-specific driver. Signed-off-by: Rob Clark <[email protected]>
2014-09-10drm/msm/mdp4: fix blend setup with multiple crtcsRob Clark5-23/+46
In particular, blend_setup() should not overwrite the other crtc's mixer settings. Also, the encoder needs to be able to specify the mixer-id explicitly, since both LVDS and DTV use 'INTF_LVDC_DTV', so we cannot guess the mixer-id from the interface. Signed-off-by: Rob Clark <[email protected]>
2014-09-10drm/msm: update generated headersRob Clark11-48/+153
In particular, pick up the definitions for a handful of LVDS related registers. Signed-off-by: Rob Clark <[email protected]>
2014-09-10pinctrl: baytrail: resolve unbalanced IRQ wake disable warningMathias Nyman1-0/+1
Add the IRQCHIP_SKIP_SET_WAKE flag to baytrail gpio irq_chip to resolve unbalaced IRQ wake disable warnings. Suggested-by: Borun Fu <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-09-10Merge tag 'ipu-3.18' of git://git.pengutronix.de/git/pza/linux into drm-nextDave Airlie8-516/+2902
IPUv3 preparations for capture support * tag 'ipu-3.18' of git://git.pengutronix.de/git/pza/linux: (26 commits) gpu: ipu-v3: Add ipu_dump() gpu: ipu-cpmem: Add ipu_cpmem_dump() gpu: ipu-v3: Add more planar formats support gpu: ipu-cpmem: Add second buffer support to ipu_cpmem_set_image() gpu: ipu-cpmem: Add ipu_cpmem_set_rotation() gpu: ipu-cpmem: Add ipu_cpmem_set_axi_id() gpu: ipu-cpmem: Add ipu_cpmem_set_block_mode() gpu: ipu-v3: Add ipu_idmac_lock_enable() gpu: ipu-v3: Add ipu_idmac_enable_watermark() gpu: ipu-v3: Add ipu_stride_to_bytes() gpu: ipu-v3: Add __ipu_idmac_reset_current_buffer() gpu: ipu-v3: Add ipu_idmac_clear_buffer() gpu: ipu-v3: Add ipu_idmac_buffer_is_ready() gpu: ipu-v3: Move IDMAC channel names to imx-ipu-v3.h gpu: ipu-v3: Add helper function checking if pixfmt is planar gpu: ipu-v3: Add rotation mode conversion utilities gpu: ipu-v3: Add ipu_mbus_code_to_colorspace() gpu: ipu-v3: smfc: Add ipu_smfc_set_watermark() gpu: ipu-v3: smfc: Convert to per-channel gpu: ipu-v3: smfc: Move enable/disable to ipu-smfc.c ...
2014-09-10rbd: fix error return code in rbd_dev_device_setup()Wei Yongjun1-1/+3
Fix to return -ENOMEM from the workqueue alloc error handling case instead of 0, as done elsewhere in this function. Reviewed-by: Alex Elder <[email protected]> Signed-off-by: Wei Yongjun <[email protected]>
2014-09-10rbd: avoid format-security warning inside alloc_workqueue()Ilya Dryomov1-1/+1
drivers/block/rbd.c: In function ‘rbd_dev_device_setup’: drivers/block/rbd.c:5090:19: warning: format not a string literal and no format arguments [-Wformat-security] Reported-by: kbuild test robot <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
2014-09-10drm: move drm-lock API to drm_legacy.hDavid Herrmann8-24/+35
Same as the other legacy APIs, most of this is internal, so prefix it with drm_legacy_* and move into drm_legacy.h. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: merge drm_usb into udlDavid Herrmann8-134/+69
This merges all the remains of drm_usb into its only user, udl. We can then drop all the drm_usb stuff, including dev->usbdev. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: Goody bye, drm_bus!David Herrmann4-30/+1
..we will not miss you.. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: add driver->set_busid() callbackDavid Herrmann29-9/+56
One step closer to dropping all the drm_bus_* code: Add a driver->set_busid() callback and make all drivers use the generic helpers. Nouveau is the only driver that uses two different bus-types with the same drm_driver. This is totally broken if both buses are available on the same machine (unlikely, but lets be safe). Therefore, we create two different drivers for each platform during module_init() and set the set_busid() callback respectively. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: drop unused drm_master->unique_sizeDavid Herrmann3-5/+1
This field is unused and there is really no reason to optimize unique-allocations. Drop it. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: simplify drm_*_set_unique()David Herrmann2-45/+16
Lets use kasprintf() to avoid pre-allocating the buffer. This is really nothing to optimize for speed and the input is trusted, so kasprintf() is just fine. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: inline "struct drm_sigdata"David Herrmann1-7/+8
The sigdata structure is only used to group two fields in drm_device. Inline it and make it an unnamed object. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: Use vblank_disable_and_save in drm_vblank_cleanup()Mario Kleiner1-1/+5
Calling vblank_disable_fn() will cause that function to no-op if !dev->vblank_disable_allowed for some kms drivers, e.g., on nouveau-kms. This can cause the gpu vblank irq's to not get disabled before freeing the dev->vblank array, so if a vblank irq fires and calls into drm_handle_vblank() after drm_vblank_cleanup() completes, it will cause use-after-free access to dev->vblank array. Call vblank_disable_and_save unconditionally, so vblank irqs are guaranteed to be off, before we delete the data structures on which they operate. Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> [danvet: Fix subsystem name in patch subject.] Signed-off-by: Daniel Vetter <[email protected]>
2014-09-10drm: drop DRM_DEBUG_CODEDavid Herrmann4-32/+12
DRM_DEBUG_CODE is currently always set, so distributions enable it. The only reason to keep support in code is if developers wanted to disable debug support. Sounds unlikely. All the DRM_DEBUG() printks are still guarded by a drm_debug read. So if its cacheline is read once, they're discarded pretty fast.. There should hardly be any performance penalty, it's even guarded by unlikely(). Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: merge drm_memory.h into drm_memory.cDavid Herrmann1-0/+11
The drm_memory.h header is only used to define PAGE_AGP, which is only used in drm_memory.c. Fold the header into drm_memory.c and drop it. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: replace weird conditional includesDavid Herrmann1-0/+1
pte_wrprotect() is only used by drm_vm.c, so move the include there. Also include it unconditionally, all architectures provide this header! Furthermore, replace asm/current.h with sched.h, which includes asm/current.h unconditionally. This way we get the same effect and avoid direct asm/ includes. Furthermore, drop the weird __alpha__ protection. It's safe to include sched.h everywhere (and the wait.h comment doesn't apply, anyway). Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: move AGP definitions harderDavid Herrmann4-0/+18
Move drm_agp_head to drm_agpsupport.h and drm_agp_mem into drm_legacy.h. Unfortunately, drivers still heavily access drm_agp_head so we cannot move it to drm_legacy.h. However, at least it's no longer visible in drmP.h now (it's directly included from it, though). Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: move "struct drm_magic_entry" to drm_auth.cDavid Herrmann2-7/+6
In drm_release(), we currently call drm_remove_magic() if the drm_file has a drm-magic attached. Therefore, once drm_master_release() is called, the magic-list _must_ be empty. By dropping the no-op cleanup, we can move "struct drm_magic_entry" to drm_auth.c and avoid exposing it to all of DRM. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: move "struct drm_vma_entry" to drm_vm.cDavid Herrmann3-68/+77
Make all the drm_vma_entry handling local to drm_vm.c and hide it from global headers. This requires to extract the inlined legacy drm_vma_entry cleanup into a small helper and also move a weirdly placed drm_vma_info helper into drm_vm.c. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: mark drm_buf and drm_map as legacyDavid Herrmann11-104/+124
Move internal declarations to drm_legacy.h and add drm_legacy_*() prefix to all legacy functions. [airlied: add a bit of an explaination to drm_legacy.h] Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm/radeon: move drm_buffer to drm/radeon/David Herrmann6-9/+153
Radeon UMS is the last user of drm_buffer. Move it out of sight so radeon can drop it together with UMS. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-09Input: synaptics - add support for ForcePadsDmitry Torokhov2-16/+63
ForcePads are found on HP EliteBook 1040 laptops. They lack any kind of physical buttons, instead they generate primary button click when user presses somewhat hard on the surface of the touchpad. Unfortunately they also report primary button click whenever there are 2 or more contacts on the pad, messing up all multi-finger gestures (2-finger scrolling, multi-finger tapping, etc). To cope with this behavior we introduce a delay (currently 50 msecs) in reporting primary press in case more contacts appear. Cc: [email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-09-09Input: matrix_keypad - use request_any_context_irq()Lothar Waßmann1-4/+5
When trying to use the matrix-keypad driver with GPIO drivers that require nested irq handlers (e.g. I2C GPIO adapters like PCA9554), request_irq() fails because the GPIO driver requires a threaded interrupt handler. Use request_any_context_irq() to be able to use any GPIO driver as keypad driver. Signed-off-by: Lothar Waßmann <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-09-09Input: atmel_mxt_ts - downgrade warning about empty interruptsNick Dyer1-1/+6
In the case where the CHG/interrupt line mode is not configured correctly, this warning is output to dmesg output for each interrupt. Downgrade the message to debug. Signed-off-by: Nick Dyer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-09-09Input: wm971x - fix typo in module parameter descriptionMasanari Iida2-2/+2
Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-09-09usb: dwc2/gadget: avoid disabling ep0Robert Baldyga1-1/+1
Endpoint 0 should not be disabled, so we start loop counter from number 1. Signed-off-by: Robert Baldyga <[email protected]> Cc: stable <[email protected]> # 3.16 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-09usb: dwc2/gadget: delay enabling irq once hardware is configured properlyMarek Szyprowski1-7/+11
This patch fixes kernel panic/interrupt storm/etc issues if bootloader left s3c-hsotg module in enabled state. Now interrupt handler is enabled only after proper configuration of hardware registers. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Robert Baldyga <[email protected]> Cc: stable <[email protected]> # 3.16 Signed-off-by: Greg Kroah-Hartman <[email protected]>