aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2014-08-10drm/nouveau: remove (most) hardcoded object handle usageBen Skeggs9-58/+45
The PFIFO<->EVO sync buffers will be fixed up later when inter-channel sync in general is improved. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: port to nvif client/device/objectsBen Skeggs40-479/+522
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: initial pass at moving to struct nvif_deviceBen Skeggs41-388/+459
This is an attempt at isolating some of the changes necessary to port to NVIF in a separate commit. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: kill nouveau_dev() + wrap register macrosBen Skeggs17-219/+228
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: fix some usages of the wrong print functionBen Skeggs8-50/+54
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/nvif: import library functions for the ioctl/event interfacesBen Skeggs14-2/+1350
This is a wrapper around the interfaces defined in an earlier commit, and is also used by various userspace (either by a libdrm backend, or libpciaccess) tools/tests. In the future this will be extended to handle channels, replacing some long-unloved code we currently use, and allow fifo/display/mpeg (hi Ilia ;)) engines to all be exposed in the same way. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/client: add method to retrieve device listBen Skeggs4-0/+72
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: remove NV_D0 familyBen Skeggs6-34/+37
The one place where it mattered has been replaced with a class check, which is more appropriate anyway. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/device: add method to retrieve some basic device infoBen Skeggs4-37/+171
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: import ioctl/event interfacesBen Skeggs13-4/+831
This forms the basis for the new APIs that will be exposed to userspace, giving it access to: - Object method calls, the immediately useful of which is performance counters and the abiity to manipulate the ZBC tables. - Information on the child classes an object supports, in order to avoid having to try all supported classes until successful. - Notifications, which will be used in the future to inform the client if its channel was killed due to a lockup, etc. This commit imports the interfaces, but are not currently used. The DRM portion of the driver will be ported to speak to the core using these interfaces as much as possible. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: add function to return list of supported childrenBen Skeggs2-0/+34
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: rework event interfaceBen Skeggs52-517/+875
This is a lot of prep-work for being able to send event notifications back to userspace. Events now contain data, rather than a "something just happened" signal. Handler data is now embedded into a containing structure, rather than being kmalloc()'d, and can optionally have the notify routine handled in a workqueue. Various races between suspend/unload with display HPD/DP IRQ handlers automagically solved as a result. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: move handle-based object apis to handle.cBen Skeggs4-120/+135
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: fail creation of zero-argument objects, when arguments are ↵Ben Skeggs1-30/+6
passed Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: store a pointer to vm in nouveau_cliBen Skeggs5-19/+24
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: store vblank event handler data in nv_crtcBen Skeggs3-29/+29
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50/kms: create ctxdma objects for framebuffers as requiredBen Skeggs4-163/+126
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50/kms: move framebuffer wrangling out of common codeBen Skeggs3-47/+81
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: Bump version from 1.1.1 to 1.1.2Mario Kleiner1-1/+3
Linux 3.16 fixed multiple bugs in kms pageflip completion events and timestamping, which were originally introduced in Linux 3.13. These fixes have been backported to all stable kernels since 3.13. However, the userspace nouveau-ddx needs to be aware if it is running on a kernel on which these bugs are fixed, or not. Bump the patchlevel of the drm driver version to signal this, so backporting this patch to stable 3.13+ kernels will give the ddx the required info. Signed-off-by: Mario Kleiner <[email protected]> Cc: <[email protected]> #v3.13+ Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50-/sw: use nv50_software_context_dtor....Ben Skeggs2-2/+2
You would not believe the troubles this caused me... Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50-/fb: use dma_mapping_error() to check dma_map_page() resultBen Skeggs2-3/+3
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: Dis/Enable vblank irqs during suspend/resume.Mario Kleiner1-0/+11
Vblank irqs don't get disabled during suspend or driver unload, which causes irq delivery after "suspend" or driver unload, at least until the gpu is powered off. This could race with drm_vblank_cleanup() in the case of nouveau and cause a use-after-free bug if the driver is unloaded. More annoyingly during everyday use, at least on nv50 display engine (likely also others), vblank irqs are off after a resume from suspend, but the drm doesn't know this, so all vblank related functionality is dead after a resume. E.g., all windowed OpenGL clients will hang at swapbuffers time, as well as many fullscreen clients in many cases. This makes suspend/resume useless if one wants to use any OpenGL apps after the resume. In Linux 3.16, drm_vblank_on() was added, complementing the older drm_vblank_off() to solve these problems elegantly, so use those calls in nouveaus suspend/resume code. For kernels 3.8 - 3.15, we need to cherry-pick the drm_vblank_on() patch to support this patch. Signed-off-by: Mario Kleiner <[email protected]> Cc: <[email protected]> #v3.16 Cc: <[email protected]> #v3.8+: f275228: drm: Add drm_vblank_on() Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: platform: update moved Tegra headerAlexandre Courbot1-1/+1
Header for tegra_powergate functions has moved to soc/tegra/pmc.h. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/gk20a: reclocking supportAlexandre Courbot5-0/+669
Add support for reclocking on GK20A, using a statically-defined pstates table. The algorithms for calculating the coefficients and setting the clocks are directly taken from the ChromeOS kernel. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/clk: support for non-BIOS pstatesAlexandre Courbot9-20/+30
Make nouveau_clock_create() take new two optional arguments: an array of pstates and its size. When these are specified, nouveau_clock_create() will use the provided pstates instead of probing them using the BIOS. This is useful for platforms which do not provide a BIOS, like Tegra. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/clk: make therm and volt devices optionalAlexandre Courbot1-14/+22
Allow the clock subsystem to operate even if voltage and thermal devices are not set for the device (for people with watercooling! ;)) Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/perfmon: do not forget to destroy the engine contextSamuel Pitoiset1-0/+1
This fixes a crash when we reload Nouveau DRM. Signed-off-by: Samuel Pitoiset <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: map pages using DMA APIAlexandre Courbot5-41/+26
The DMA API is the recommended way to map pages no matter what the underlying bus is. Use the DMA functions for page mapping and remove currently existing wrappers. Signed-off-by: Alexandre Courbot <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/pwr/macros: Stop playing Russian roulette on data memoryRoy Spliet5-663/+663
Signed-off-by: Roy Spliet <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nve4/graph: do not crash if no power device presentAlexandre Courbot1-1/+2
Detect and workaround the absence of a power device so chips that do not feature one (e.g. GK20A) can still use this driver. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gk20a: add BAR instanceAlexandre Courbot6-4/+66
GK20A's BAR is functionally identical to NVC0's, but do not support being ioremapped write-combined. Create a BAR instance for GK20A that reflect that state. Signed-off-by: Alexandre Courbot <[email protected]>
2014-08-10drm/nouveau/bar: add noncached ioremap propertyAlexandre Courbot2-5/+15
Some BARs (like GK20A's) do not support being ioremapped write-combined. Add a boolean property to the BAR structure and handle that case in the Nouveau BO implementation. Signed-off-by: Alexandre Courbot <[email protected]>
2014-08-10drm/nouveau: support for probing platform devicesAlexandre Courbot6-16/+291
Add a platform driver for Nouveau devices declared using the device tree or platform data. This driver currently supports GK20A on Tegra platforms and is only compiled for these platforms if Nouveau is enabled. Nouveau will probe the chip type itself using the BOOT0 register, so all this driver really needs to do is to make sure the module is powered and its clocks active before calling nouveau_drm_platform_probe(). Heavily based on work done by Thierry Reding. Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/kms: restore acceleration before fb_set_suspend() resumesBen Skeggs1-3/+3
This *should* be safe these days. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/kms: take more care when pulling down accelerated fbconBen Skeggs3-39/+61
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: expose pstate selection per-power source in sysfsBen Skeggs3-18/+52
echo ac:id >> pstate # select mode when on mains power echo dc:id >> pstate # select mode when on battery echo id >> pstate # select mode for both Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/clk: allow selection of different power state for ac vs batteryBen Skeggs4-30/+96
v2: - s/init/fini/ typo, reported by Alex Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/clk: schedule pstate changes through a workqueueBen Skeggs2-11/+39
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/device: register for acpi eventsBen Skeggs5-2/+94
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gk208-/gr: stop touching 0x260 inappropriatelyBen Skeggs15-45/+113
As a side note.. It's a bit hard to figure out how to name this commit.. GK20A is NVEA, which is before NV108 (GK208).. Confusing. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gk110b/gr: initvals differ from gk110Ben Skeggs9-14/+244
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gk104/gr: disable PGOB at init timeBen Skeggs2-25/+7
This removes the previous hack that worked on some boards. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gk104/pwr: implement PGOB disable methodBen Skeggs6-3/+86
As documented at: ftp://download.nvidia.com/open-gpu-doc/gk104-disable-graphics-power-gating/1/gk104-disable-graphics-power-gating.txt NVIDIA were not able document the steps necessary to detect whether this is required or not at this time. However, they did confirm that this procedure is safe to perform unconditionally on GK104/6. GK107 does not have the power gating feature, and it was recommended that we do not perform these steps there as the effects were not verified. The disable path is from observing the binary driver, and not documented in the link above. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/pwr: tidyBen Skeggs12-193/+133
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-09Merge branch 'i2c/for-3.17' of ↵Linus Torvalds37-924/+810
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Highlights: - class based instantiation finally dropped for most embedded drivers bringing boot up performance gains - removed two drivers (one outdated, one a duplicate) - ACPI has now operation region support (thanks to Lan Tianyu) - the i2c-stub driver got overhauled and gained new features to become more useful when writing i2c client drivers (thanks to Guenter Roeck and Jean Delvare) The rest is driver bugfixes, added bindings/ids, cleanups..." * 'i2c/for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (43 commits) i2c: mpc: delete unneeded test before of_node_put i2c: rk3x: fix interrupt handling issue i2c: imx: Fix format warning for dev_dbg i2c: qup: disable clks and return instead of just returning error i2c: exynos5: always enable HSI2C i2c: designware: add new bindings i2c: gpio: Drop dead code in i2c_gpio_remove i2c: pca954x: put the mux to disconnected state after resume i2c: st: Update i2c timings drivers/i2c/busses: use correct type for dma_map/unmap i2c: i2c-st: Use %pa to print 'resource_size_t' type i2c: s3c2410: resume the I2C controller earlier i2c: stub: Avoid an array overrun on I2C block transfers i2c: i801: Add device ID for Intel Wildcat Point PCH i2c: i801: Fix the alignment of the device table i2c: stub: Add support for banked register ranges i2c: stub: Remember the number of emulated chips i2c: stub: Add support for SMBus block commands i2c: efm32: correct namespacing of location property i2c: exynos5: remove extra line and fix an assignment ...
2014-08-09ARM: EXYNOS: Fix suspend/resume sequencesTomasz Figa1-21/+4
Due to recent consolidation of Exynos suspend and cpuidle code, some parts of suspend and resume sequences are executed two times, once from exynos_pm_syscore_ops and then from exynos_cpu_pm_notifier() and thus it breaks suspend, at least on Exynos4-based boards. In addition, simple core power down from a cpuidle driver could, in case of CPU 0 could result in calling functions that are specific to suspend and deeper idle states. This patch fixes the issue by moving those operations outside the CPU PM notifier into suspend and AFTR code paths. This leads to a bit of code duplication, but allows additional code simplification, so in the end more code is removed than added. Fixes: 85f9f90808b4 ("ARM: EXYNOS: Use the cpu_pm notifier for pm") Cc: Kukjin Kim <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Olof Johansson <[email protected]> Cc: [email protected] Signed-off-by: Tomasz Figa <[email protected]> [b.zolnierkie: ported patch over current changes] [b.zolnierkie: fixed exynos_aftr_finisher() return value] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2014-08-10drm/ttm: expose CPU address of DMA-allocated pagesAlexandre Courbot2-5/+10
Pages allocated using the DMA API have a coherent memory mapping. Make this mapping visible to drivers so they can decide to use it instead of creating their own redundant one. Signed-off-by: Alexandre Courbot <[email protected]> Acked-by: David Airlie <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-08Merge tag 'for-linus-20140808' of git://git.infradead.org/linux-mtdLinus Torvalds20-142/+923
Pull MTD updates from Brian Norris: "AMD-compatible CFI driver: - Support OTP programming for Micron M29EW family - Increase buffer write timeout, according to detected flash parameter info NAND - Add helpers for retrieving ONFI timing modes - GPMI: provide option to disable bad block marker swapping (required for Ka-On electronics platforms) SPI NOR - EON EN25QH128 support - Support new Flag Status Register (FSR) on a few Micron flash Common - New sysfs entries for bad block and ECC stats And a few miscellaneous refactorings, cleanups, and driver improvements" * tag 'for-linus-20140808' of git://git.infradead.org/linux-mtd: (31 commits) mtd: gpmi: make blockmark swapping optional mtd: gpmi: remove line breaks from error messages and improve wording mtd: gpmi: remove useless (void *) type casts and spaces between type casts and variables mtd: atmel_nand: NFC: support multiple interrupt handling mtd: atmel_nand: implement the nfc_device_ready() by checking the R/B bit mtd: atmel_nand: add NFC status error check mtd: atmel_nand: make ecc parameters same as definition mtd: nand: add ONFI timing mode to nand_timings converter mtd: nand: define struct nand_timings mtd: cfi_cmdset_0002: fix do_write_buffer() timeout error mtd: denali: use 8 bytes for READID command mtd/ftl: fix the double free of the buffers allocated in build_maps() mtd: phram: Fix whitespace issues mtd: spi-nor: add support for EON EN25QH128 mtd: cfi_cmdset_0002: Add support for locking OTP memory mtd: cfi_cmdset_0002: Add support for writing OTP memory mtd: cfi_cmdset_0002: Invalidate cache after entering/exiting OTP memory mtd: cfi_cmdset_0002: Add support for reading OTP mtd: spi-nor: add support for flag status register on Micron chips mtd: Account for BBT blocks when a partition is being allocated ...
2014-08-08Merge tag 'fbdev-3.17' of ↵Linus Torvalds29-751/+990
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev updates from Tomi Valkeinen: - much better HDMI infoframe support for OMAP - Cirrus Logic CLPS711X framebuffer driver - DT support for PL11x CLCD driver - various small fixes * tag 'fbdev-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (35 commits) OMAPDSS: DSI: fix depopulating dsi peripherals video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic video: ARM CLCD: Fix DT-related build problems drivers: video: fbdev: atmel_lcdfb.c: Add ability to inverted backlight PWM. video: ARM CLCD: Add DT support drm/omap: Add infoframe & dvi/hdmi mode support OMAPDSS: HDMI: remove the unused code OMAPDSS: HDMI5: add support to set infoframe & HDMI mode OMAPDSS: HDMI4: add support to set infoframe & HDMI mode OMAPDSS: HDMI: add infoframe and hdmi_dvi_mode fields OMAPDSS: add hdmi ops to hdmi-connector and tpd12s015 OMAPDSS: add hdmi ops to hdmi_ops and omap_dss_driver OMAPDSS: HDMI: remove custom avi infoframe OMAPDSS: HDMI5: use common AVI infoframe support OMAPDSS: HDMI4: use common AVI infoframe support OMAPDSS: Kconfig: select HDMI OMAPDSS: HDMI: fix name conflict OMAPDSS: DISPC: clean up dispc_mgr_timings_ok OMAPDSS: DISPC: reject interlace for lcd out OMAPDSS: DISPC: fix debugfs reg dump ...
2014-08-08Merge tag 'pwm/for-3.17-rc1' of ↵Linus Torvalds7-25/+713
git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm changes from Thierry Reding: "The set of changes for this merge window contains two new drivers: one for Rockchip SoCs and another for STMicroelectronics STiH4xx SoCs. The remainder of the changes are the usual small cleanups such as removing redundant OOM messages, signalling that a PWM chip's operations can sleep and removing an unneeded dependency" * tag 'pwm/for-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: rockchip: Added to support for RK3288 SoC pwm: rockchip: document RK3288 SoC compatible pwm: sti: Remove PWM period table pwm: sti: Sync between enable/disable calls pwm: sti: Ensure same period values for all channels pwm: sti: Fix PWM prescaler handling pwm: sti: Supply Device Tree binding documentation for ST's PWM IP pwm: sti: Add new driver for ST's PWM IP pwm: imx: set can_sleep flag for imx_pwm pwm: lpss: remove dependency on clk framework pwm: pwm-tipwmss: remove unnecessary OOM messages pwm: rockchip: document device tree bindings pwm: add Rockchip SoC PWM support