Philipp Zabel [Fri, 22 Jul 2016 08:25:09 +0000 (10:25 +0200)]
drm/imx: imx-ldb: do not try to dereference crtc->state->state in encoder mode_set
The code in imx_ldb_encoder_mode_set crashes with a NULL pointer
dereference trying to access crtc->state->state, which was previously
cleared by drm_atomic_helper_swap_state:
Unable to handle kernel NULL pointer dereference at virtual address
00000010
pgd =
ae08c000
[
00000010] *pgd=
3e00e831, *pte=
00000000, *ppte=
00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 102 Comm: kmsfb-manage Not tainted 4.7.0-rc5+ #232
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
task:
ae058c40 ti:
ae04e000 task.ti:
ae04e000
PC is at imx_ldb_encoder_mode_set+0x138/0x2f8
LR is at 0xae881818
pc : [<
8051a8c8>] lr : [<
ae881818>] psr:
600f0013
sp :
ae04fc70 ip :
ae04fbb0 fp :
ae04fcbc
r10:
ae8ea018 r9 :
00000000 r8 :
ae246418
r7 :
ae8ea010 r6 :
ae8ea308 r5 :
00000000 r4 :
00000000
r3 :
00000000 r2 :
00000000 r1 :
00000110 r0 :
00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control:
10c5387d Table:
3e08c04a DAC:
00000051
Process kmsfb-manage (pid: 102, stack limit = 0xae04e210)
Stack: (0xae04fc70 to 0xae050000)
fc60:
043ce660 00000001 0000009e 043ce660
fc80:
00000002 00000000 00000000 af75cf50 00001009 ae23f440 00000001 ae246418
fca0:
8155a210 ae8ea308 8093c364 ae2464e0 ae04fcec ae04fcc0 804ef350 8051a79c
fcc0:
00000004 00000004 ae23f440 af3f9000 ae881818 8155a210 af1af200 ae8ea020
fce0:
ae04fd1c ae04fcf0 80519124 804ef060 ae04fd34 00000000 00000000 00000000
fd00:
ae881818 ae23f440 80d4ec8c 00000000 ae04fd34 ae04fd20 804f00b4 80518fac
fd20:
ae23f440 00000000 ae04fd54 ae04fd38 804f2190 804f0074 ae23f440 af3f9000
fd40:
ae04fdd4 ae881818 ae04fd6c ae04fd58 80516390 804f20f4 ae23f440 00000000
fd60:
ae04fd8c ae04fd70 804f26f4 80516348 ae23a000 ae881818 00000001 af3f9000
fd80:
ae04fdac ae04fd90 80502c58 804f2678 ae04fe50 ae23f400 00000001 af3f9000
fda0:
ae04fe1c ae04fdb0 80507a1c 80502bf8 ae23a000 ae058c40 af1af200 ae23f400
fdc0:
ae23a000 af3f9000 ae881818 ae23a00c 80176c7c ae23a000 ae881818 af1af200
fde0:
00000000 00000000 ae23f400 00000001 ae04fe1c 00000051 ae04fe50 8155a210
fe00:
80932060 c06864a2 af3f9000 ae246200 ae04fefc ae04fe20 804f9718 805074e8
fe20:
ae04feac ae04fe30 80177360 8017631c 805074dc 00000068 00000068 00000062
fe40:
00000068 000000a2 ae04fe50 7ef29688 7ef29c40 00000000 00000001 00000018
fe60:
00000026 00000000 00000000 00000000 00000001 000115bc 05010500 05a0059f
fe80:
03200000 03360321 00000337 0000003c 00000000 00000040 30383231 30303878
fea0:
00000000 00000000 00000000 00000000 00000000 00000000 00004000 aea6a140
fec0:
00000000 80d77b71 00000000 80283110 600f0013 7ef29688 af342bb0 ae250b40
fee0:
80275440 00000003 ae04e000 00000000 ae04ff7c ae04ff00 80274ac8 804f957c
ff00:
80283128 80179030 00000000 00000000 80282fd8 ae1e0000 0000003d aea6a1d0
ff20:
00000002 00000003 00004000 007f8c60 c06864a2 7ef29688 ae04e000 00000000
ff40:
ae04ff6c ae04ff50 80283260 80282fe4 00017050 ae250b41 00000003 ae250b40
ff60:
c06864a2 7ef29688 ae04e000 00000000 ae04ffa4 ae04ff80 80275440 80274a20
ff80:
00017050 00000001 007f8c60 00000036 801088a4 ae04e000 00000000 ae04ffa8
ffa0:
80108700 80275408 00017050 00000001 00000003 c06864a2 7ef29688 000115bc
ffc0:
00017050 00000001 007f8c60 00000036 00000003 00000000 00000026 00000018
ffe0:
00016f28 7ef29684 0000b7d9 76e4a1e6 400f0030 00000003 3ff7e861 3ff7ec61
Backtrace:
[<
8051a790>] (imx_ldb_encoder_mode_set) from [<
804ef350>] (drm_atomic_helper_commit_modeset_disables+0x2fc/0x3f0)
r10:
ae2464e0 r9:
8093c364 r8:
ae8ea308 r7:
8155a210 r6:
ae246418 r5:
00000001
r4:
ae23f440
[<
804ef054>] (drm_atomic_helper_commit_modeset_disables) from [<
80519124>] (imx_drm_atomic_commit_tail+0x184/0x1e0)
r10:
ae8ea020 r9:
af1af200 r8:
8155a210 r7:
ae881818 r6:
af3f9000 r5:
ae23f440
r4:
00000004 r3:
00000004
[<
80518fa0>] (imx_drm_atomic_commit_tail) from [<
804f00b4>] (commit_tail+0x4c/0x68)
r6:
00000000 r5:
80d4ec8c r4:
ae23f440
[<
804f0068>] (commit_tail) from [<
804f2190>] (drm_atomic_helper_commit+0xa8/0xd4)
r5:
00000000 r4:
ae23f440
[<
804f20e8>] (drm_atomic_helper_commit) from [<
80516390>] (drm_atomic_commit+0x54/0x74)
r7:
ae881818 r6:
ae04fdd4 r5:
af3f9000 r4:
ae23f440
[<
8051633c>] (drm_atomic_commit) from [<
804f26f4>] (drm_atomic_helper_set_config+0x88/0xac)
r5:
00000000 r4:
ae23f440
[<
804f266c>] (drm_atomic_helper_set_config) from [<
80502c58>] (drm_mode_set_config_internal+0x6c/0xf4)
r7:
af3f9000 r6:
00000001 r5:
ae881818 r4:
ae23a000
[<
80502bec>] (drm_mode_set_config_internal) from [<
80507a1c>] (drm_mode_setcrtc+0x540/0x5b8)
r7:
af3f9000 r6:
00000001 r5:
ae23f400 r4:
ae04fe50
[<
805074dc>] (drm_mode_setcrtc) from [<
804f9718>] (drm_ioctl+0x1a8/0x46c)
r10:
ae246200 r9:
af3f9000 r8:
c06864a2 r7:
80932060 r6:
8155a210 r5:
ae04fe50
r4:
00000051
[<
804f9570>] (drm_ioctl) from [<
80274ac8>] (do_vfs_ioctl+0xb4/0x9e8)
r10:
00000000 r9:
ae04e000 r8:
00000003 r7:
80275440 r6:
ae250b40 r5:
af342bb0
r4:
7ef29688
[<
80274a14>] (do_vfs_ioctl) from [<
80275440>] (SyS_ioctl+0x44/0x6c)
r10:
00000000 r9:
ae04e000 r8:
7ef29688 r7:
c06864a2 r6:
ae250b40 r5:
00000003
r4:
ae250b41
[<
802753fc>] (SyS_ioctl) from [<
80108700>] (ret_fast_syscall+0x0/0x1c)
r9:
ae04e000 r8:
801088a4 r7:
00000036 r6:
007f8c60 r5:
00000001 r4:
00017050
Code:
1a000018 e596e034 e59e3368 e59331bc (
e5930010)
---[ end trace
464e7d3c7f4b9706 ]---
Instead of trying to walk only the connectors in atomic state to which we
don't have access, just walk all connectors to find one connected to the
current encoder and containing a bus_format description.
Fixes:
49f98bc4d44a4 ("drm/imx: store internal bus configuration in crtc state")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Liu Ying <gnuiyl@gmail.com>
Dave Airlie [Sat, 16 Jul 2016 01:19:29 +0000 (11:19 +1000)]
Merge tag 'imx-drm-next-2016-07-14' of git://git.pengutronix.de/git/pza/linux into drm-next
imx-drm updates
- atomic mode setting conversion
- replace DMFC FIFO allocation mechanism with a fixed allocation
that is good enough for all cases
- support for external bridges connected to parallel-display
- improved error handling in imx-ldb, imx-tve, and parallel-display
- some code cleanup in imx-tve
* tag 'imx-drm-next-2016-07-14' of git://git.pengutronix.de/git/pza/linux:
drm/imx: parallel-display: add bridge support
drm/imx: parallel-display: check return code from of_get_drm_display_mode()
gpu: ipu-v3: ipu-dc: don't bug out on invalid bus_format
drm/imx: imx-tve: fix the error message
drm/imx: imx-tve: remove unneeded 'or' operation
drm/imx: imx-tve: check the value returned by regulator_set_voltage()
drm/imx: imx-ldb: check return code on panel attach
drm/imx: turn remaining container_of macros into inline functions
drm/imx: store internal bus configuration in crtc state
drm/imx: remove empty mode_set encoder callbacks
drm/imx: atomic phase 3 step 3: Advertise DRIVER_ATOMIC
drm/imx: atomic phase 3 step 2: Legacy callback fixups
drm/bridge: dw-hdmi: Remove the legacy drm_connector_funcs structure
drm/imx: atomic phase 3 step 1: Use atomic configuration
drm/imx: Remove encoders' ->prepare callbacks
drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip
drm/imx: atomic phase 2 step 1: Wire up state ->reset, ->duplicate and ->destroy
drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers
gpu: ipu-v3: ipu-dmfc: Use static DMFC FIFO allocation mechanism
drm/imx: ipuv3 plane: Check different types of plane separately
Dave Airlie [Fri, 15 Jul 2016 04:05:41 +0000 (14:05 +1000)]
Merge branch 'exynos-drm-next' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next
This pull request adds to the rework patch series for IOMMU
integration to support ARM64bit architecture with DMA-IOMMU
glue code.
With this patch series, Exynos DRM works well on Exynos5433 SoC
with IOMMU enabled.
* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
drm/exynos: iommu: add support for ARM64 specific code for IOMMU glue
drm/exynos: iommu: move ARM specific code to exynos_drm_iommu.h
drm/exynos: iommu: remove unused entries from exynos_drm_private strcuture
drm/exynos: iommu: add a check if all sub-devices have iommu controller
drm/exynos: iommu: move dma_params configuration code to separate functions
Dave Airlie [Fri, 15 Jul 2016 03:56:11 +0000 (13:56 +1000)]
Merge tag 'drm-vc4-next-2016-07-12' of https://github.com/anholt/linux into drm-next
This pull request brings in new vc4 plane formats for Android, precise
vblank timestamping, and a couple of small cleanups.
* tag 'drm-vc4-next-2016-07-12' of https://github.com/anholt/linux:
drm/vc4: remove redundant ret status check
drm/vc4: Implement precise vblank timestamping.
drm/vc4: Bind the HVS before we bind the individual CRTCs.
gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
drm: vc4: enable XBGR8888 and ABGR8888 pixel formats
drm/vc4: clean up error exit path on failed dpi_connector allocation
Dave Airlie [Fri, 15 Jul 2016 03:50:58 +0000 (13:50 +1000)]
Merge tag 'drm-intel-next-2016-07-11' of git://anongit.freedesktop.org/drm-intel into drm-next
- select igt testing depencies for CONFIG_DRM_I915_DEBUG (Chris)
- track outputs in crtc state and clean up all our ad-hoc connector/encoder
walking in modest code (Ville)
- demidlayer drm_device/drm_i915_private (Chris Wilson)
- thundering herd fix from Chris Wilson, with lots of help from Tvrtko Ursulin
- piles of assorted clean and fallout from the thundering herd fix
- documentation and more tuning for waitboosting (Chris)
- pooled EU support on bxt (Arun Siluvery)
- bxt support is no longer considered prelimary!
- ring/engine vfunc cleanup from Tvrtko
- introduce intel_wait_for_register helper (Chris)
- opregion updates (Jani Nukla)
- tuning and fixes for wait_for macros (Tvrkto&Imre)
- more kabylake pci ids (Rodrigo)
- pps cleanup and fixes for bxt (Imre)
- move sink crc support over to atomic state (Maarten)
- fix up async fbdev init ordering (Chris)
- fbc fixes from Paulo and Chris
* tag 'drm-intel-next-2016-07-11' of git://anongit.freedesktop.org/drm-intel: (223 commits)
drm/i915: Update DRIVER_DATE to
20160711
drm/i915: Select DRM_VGEM for igt
drm/i915: Select X86_MSR for igt
drm/i915: Fill unused GGTT with scratch pages for VT-d
drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.
drm/i915:gen9: implement WaMediaPoolStateCmdInWABB
drm/i915: Check for invalid cloning earlier during modeset
drm/i915: Simplify hdmi_12bpc_possible()
drm/i915: Kill has_dsi_encoder
drm/i915: s/INTEL_OUTPUT_DISPLAYPORT/INTEL_OUTPUT_DP/
drm/i915: Replace some open coded intel_crtc_has_dp_encoder()s
drm/i915: Kill has_dp_encoder from pipe_config
drm/i915: Replace manual lvds and sdvo/hdmi counting with intel_crtc_has_type()
drm/i915: Unify intel_pipe_has_type() and intel_pipe_will_have_type()
drm/i915: Add output_types bitmask into the crtc state
drm/i915: Remove encoder type checks from MST suspend/resume
drm/i915: Don't mark eDP encoders as MST capable
drm/i915: avoid wait_for_atomic() in non-atomic host2guc_action()
drm/i915: Group the irq breadcrumb variables into the same cacheline
drm/i915: Wake up the bottom-half if we steal their interrupt
...
Dave Airlie [Fri, 15 Jul 2016 01:01:37 +0000 (11:01 +1000)]
Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next
I recovered dri-devel backlog from my vacation, more misc stuff:
- of_put_node fixes from Peter Chen (not all yet)
- more patches from Gustavo to use kms-native drm_crtc_vblank_* funcs
- docs sphinxification from Lukas Wunner
- bunch of fixes all over from Dan Carpenter
- more follow up work from Chris register/unregister rework in various
places
- vgem dma-buf export (for writing testcases)
- small things all over from tons of different people
* tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel: (52 commits)
drm: Don't overwrite user ioctl arg unless requested
dma-buf/sync_file: improve Kconfig description for Sync Files
MAINTAINERS: add entry for the Sync File Framework
drm: Resurrect atomic rmfb code
drm/vgem: Use PAGE_KERNEL in place of x86-specific PAGE_KERNEL_IO
qxl: silence uninitialized variable warning
qxl: check for kmap failures
vga_switcheroo: Sphinxify docs
drm: Restore double clflush on the last partial cacheline
gpu: drm: rockchip_drm_drv: add missing of_node_put after calling of_parse_phandle
gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle
gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle
gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle
gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
drm/tilcdc: use drm_crtc_handle_vblank()
drm/rcar-du: use drm_crtc_handle_vblank()
drm/nouveau: use drm_crtc_handle_vblank()
drm/atmel: use drm_crtc_handle_vblank()
drm/armada: use drm_crtc_handle_vblank()
drm: make drm_vblank_count_and_time() static
...
Philipp Zabel [Mon, 27 Jun 2016 13:26:31 +0000 (15:26 +0200)]
drm/imx: parallel-display: add bridge support
Add support for bridge chips connected externally to the i.MX
DISP0/DISP1 DPI interfaces.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Chris Wilson [Tue, 12 Jul 2016 14:59:50 +0000 (15:59 +0100)]
drm: Don't overwrite user ioctl arg unless requested
Currently, we completely ignore the user when it comes to the in/out
direction of the ioctl argument, as we simply cannot trust userspace.
(For example, they might request a copy of the modified ioctl argument
when the driver is not expecting such and so leak kernel stack.)
However, blindly copying over the target address may also lead to a
spurious EFAULT, and a failure after the ioctl was completed
successfully. This is important in order to avoid an ABI break when
extending an ioctl from IOR to IORW. Similar to how we only copy the
intersection of the kernel arg size and the user arg size, we only want
to copy back the kernel arg data iff both the kernel and userspace
request the copy.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1468335590-21023-1-git-send-email-chris@chris-wilson.co.uk
Dave Airlie [Thu, 14 Jul 2016 02:14:49 +0000 (12:14 +1000)]
Merge branch 'linux-4.8' of git://github.com/skeggsb/linux into drm-next
Here's an initial drm-next pull for nouveau 4.8, highlights:
- GK20A/GM20B volt and clock improvements.
- Initial support for GP100/GP104 GPUs, GP104 will not yet support
acceleration due to NVIDIA having not released firmware for them as of yet.
* 'linux-4.8' of git://github.com/skeggsb/linux: (97 commits)
drm/nouveau/bus: remove cpu_coherent flag
drm/nouveau/ttm: remove special handling of coherent objects
drm/nouveau: check for supported chipset before booting fbdev off the hw
drm/nouveau/ce/gp104: initial support
drm/nouveau/fifo/gp104: initial support
drm/nouveau/disp/gp104: initial support
drm/nouveau/dma/gp104: initial support
drm/nouveau/ltc/gp104: initial support
drm/nouveau/ibus/gp104: initial support
drm/nouveau/i2c/gp104: initial support
drm/nouveau/gpio/gp104: initial support
drm/nouveau/fuse/gp104: initial support
drm/nouveau/bus/gp104: initial support
drm/nouveau/bar/gp104: initial support
drm/nouveau/mmu/gp104: initial support
drm/nouveau/fb/gp104: initial support
drm/nouveau/imem/gp104: initial support
drm/nouveau/devinit/gp104: initial support
drm/nouveau/bios/gp104: initial support
drm/nouveau/tmr/gp104: initial support
...
Alexandre Courbot [Wed, 13 Jul 2016 06:29:36 +0000 (15:29 +0900)]
drm/nouveau/bus: remove cpu_coherent flag
This flag's only remaining function is to ignore the uncached flag for
BOs on coherent architectures.
However the reason for allocating an object uncache on a non-coherent
architecture (namely because the cost of doing explicit flushes/
invalidations is higher than the benefit of caching the data because
accesses are few and far between) should also apply on architectures for
which coherency is maintained implicitly. Thus allocate coherent objects
as uncached on all architectures.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 13 Jul 2016 06:29:35 +0000 (15:29 +0900)]
drm/nouveau/ttm: remove special handling of coherent objects
TTM-allocated coherent objects were populated using the DMA API and
accessed using the mapping it returned to workaround coherency
issues. These issues seem to have been solved, thus remove this extra
case to handle and use the regular kernel mapping functions.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Jul 2016 01:57:07 +0000 (11:57 +1000)]
drm/nouveau: check for supported chipset before booting fbdev off the hw
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/ce/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/fifo/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/disp/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/dma/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/ltc/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/ibus/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/i2c/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/gpio/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/fuse/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bus/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bar/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/mmu/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/fb/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/imem/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/devinit/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bios/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/tmr/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/pci/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/mc/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/top/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/core: recognise GP104 chipset
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/sw/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/gr/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/ce/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/fifo/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/disp/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/dma/gp100: initial implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/secboot/gm200: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/ltc/gp100: initial support
Due to the GPU preventing us from touching NV_PLTCG_LTCS_LTSS_CBC_BASE,
we cannot provide CBC/ZBC support without signed PMU firmware to handle
the task for us...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/ibus/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/i2c/gm204: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/gpio/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/fuse/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bus/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bar/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/mmu/gp100: initial support
GP100 still supports the previous generations' page table layout, which
we will temporarily make use of here.
Proper support for the new MMU layout requires some rework to the common
MMU code, which is in progress.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/fb/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/imem/gp100: initial implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/devinit/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bios/rammap: 32-bit bios pointers
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bios/pll: initial support for BIT 'C' version 2
Just enough to get at the PLL table.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bios/dp: initial support for 4.2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/bios/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/tmr/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/pci/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/mc/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/top/gp100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/core: recognise GP100 chipset
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/core: increase maximum nvenc instances to 3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/core: increase maximum ce instances to 6
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau/fb/gf100-: allow selection of an alternate big page size
GFxxx/GM1xx support the selection of 64/128KiB big pages globally.
GM2xx supports the same, as well as another mode where the page size
can be selected per-instance.
We default to 128KiB pages (With per-instance for GM200, but the current
code selects 128KiB there already) as the MMU code isn't currently able
to handle otherwise.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 9 Jul 2016 00:41:01 +0000 (10:41 +1000)]
drm/nouveau: prevent oops if no mmu subdev present
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 27 Jun 2016 06:49:24 +0000 (16:49 +1000)]
drm/nouveau/disp/g94: implement workaround for dvi issue on fx380
Fixes the second DVI output on Quadro FX380.
Thanks to NVIDIA for providing the details on the full workaround.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 22 Jun 2016 02:41:04 +0000 (12:41 +1000)]
drm/nouveau/bios: pointers beyond end of first image need special handling
Makes common the code that was previously used by the PMU table parsing,
as it appears other tables need this too.
Not much of an idea what this is all about...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 22 Jun 2016 02:10:00 +0000 (12:10 +1000)]
drm/nouveau/bios: guard against out-of-bounds accesses to image
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 22 Jun 2016 00:17:11 +0000 (10:17 +1000)]
drm/nouveau/fifo/gk104-: translate engidx into human-readable name in debug output
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 21 Jun 2016 06:29:03 +0000 (16:29 +1000)]
drm/nouveau/disp/nv50-: fix lookup of udisp table under certain circumstances
Some VBIOS have separate tables for each link of a given output path,
which means we have to specify the specific link we're using instead
of all possible links.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 21 Jun 2016 02:41:36 +0000 (12:41 +1000)]
drm/nouveau/ltc/gm107-: decode interrupt status to human-readable strings
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Julia Lawall [Sun, 19 Jun 2016 06:44:23 +0000 (08:44 +0200)]
drm/nouveau/gr/gk20a: delete unneeded second newline
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 17 Jun 2016 21:16:14 +0000 (22:16 +0100)]
drm/nouveau/clk/gf100: Read secondary bypass postdiv when required
v2: fix typo it's -> its
Signed-off-by: Roy Spliet <nouveau@spliet.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 17 Jun 2016 21:16:13 +0000 (22:16 +0100)]
drm/nouveau/clk/gf100-: Clean up PLL locking test
Corresponds with GT215. Don't rely on the lock test logic being
unconditionally enabled, and disable test logic when done (presumably
to save power).
v2: Remove warning, nvkm_msec already warns on time-out
Signed-off-by: Roy Spliet <nouveau@spliet.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 8 Jun 2016 08:32:41 +0000 (17:32 +0900)]
drm/nouveau/secboot: lazy-load firmware and be more resilient
Defer the loading of firmware files to the chip-specific part of secure
boot. This allows implementations to retry loading firmware if the first
attempt failed ; for the GM200 implementation, this happens when trying
to reset a falcon, typically in reaction to GR init.
Firmware loading may fail for a variety of reasons, such as the
filesystem where they reside not being ready at init time. This new
behavior allows GR to be initialized the next time we try to use it if
the firmware has become available.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 8 Jun 2016 08:32:40 +0000 (17:32 +0900)]
drm/nouveau/secboot/gm200: make firmware loading re-callable
Make it possible to call gm20x_secboot_prepare_blobs() several times
after either success or failure without re-building already existing
blobs. The function will now try to load firmware files that have
previously failed before returning success.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 8 Jun 2016 08:32:39 +0000 (17:32 +0900)]
drm/nouveau/gr/gf100: handle secure boot errors
Handle and propagate secure boot errors. Failure to do so results in
Nouveau incorrectly believing init has succeeded and a completely
black display during boot. If we propagate the error, GR init will fail
and the user will at least have a working display.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 8 Jun 2016 08:32:38 +0000 (17:32 +0900)]
drm/nouveau/secboot: fix kerneldoc for secure boot structures
Some members were documented in the wrong structure.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Karol Herbst [Sun, 17 Apr 2016 12:51:23 +0000 (14:51 +0200)]
drm/nouveau/hwmon: add in_min and in_max
it is a little help for hardware monitoring tools
Signed-off-by: Karol Herbst <karolherbst@gmail.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Karol Herbst [Fri, 26 Feb 2016 06:49:08 +0000 (07:49 +0100)]
drm/nouveau/volt: save the voltage range we are able to set
We shouldn't set voltages below the min or above the max voltage the gpu is
able to set, so save the range for future lookups.
Signed-off-by: Karol Herbst <karolherbst@gmail.de>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Tested-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:29 +0000 (17:39 +0900)]
drm/nouveau/clk/gm20b: add glitchless and DFS support
This patch adds support for advanced features supported by the
Noise-Aware PLL of Maxwell. Glitchless switch allows the PL field to be
updated without disabling the PLL first if the SYNC_MODE bit of the CFG
register is set.
More significantly, DFS allows the PLL to monitor the actual input
voltage and to dynamically lower the output frequency accordingly. This
allows the clock to be more tolerant of lower voltages.
These improvements are only supported for Tegra speedos >= 1.
Also add the voltage table that is suitable for GM20B's NAPLL. This
change needs to be done atomically for the right voltages to be used by
the clock driver.
v2. Fix build on non-Tegra platforms
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:28 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: rename constructor
Strip the _ prefix off the gk20a clock constructor.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:27 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: improve MNP programming
Split the MNP programming function into two functions for the cases
where we allow sliding or not, instead of making it take a parameter for
this. This results in less conditionals in the code and makes it easier
to read.
Also make the MNP programming functions take the PLL parameters as
arguments, and move bits of code to more relevant places (previous
programming tended to be just-in-time, which added more conditionnals in
the code).
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:26 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: factorize n_lo computation code
Use a dedicated function instead of always calculating n_lo on the fly.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:25 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: parameterize PLL settings
Make functions manipulating PLL settings take them as an argument,
instead of assuming we want to work on the copy in the gk20a_clk
structure. This makes these functions more flexible, which we will need
in GM20B.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:24 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: add and use MNP programming functions
Add relevant functions to work with the gk20a_pll structure and use them
where they ought to be instead of directly manipulating registers.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:23 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: use nvkm_ functions in slide()
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:22 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: reorganize MNP calculation a bit
Move variables declarations to their actual scope of use, and simplify
code a bit.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:21 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: setup slide once during init
Slide setup needs to be performed only once, during init. Also
use the proper parameters for different clock speeds.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:20 +0000 (17:39 +0900)]
drm/nouveau/clk/gk20a: properly protect macro argument
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:19 +0000 (17:39 +0900)]
drm/nouveau/volt/gm20b: add support for vmin parameter
Chips may be characterized for a minimum voltage. Support this extra
parameter and select the appropriate minimum voltage for the detected
GPU speedo.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:18 +0000 (17:39 +0900)]
drm/nouveau/volt/gk20a: rename constructor
Strip the _ prefix off the gk20a volt constructor.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:17 +0000 (17:39 +0900)]
drm/nouveau/volt/gk20a: constify and name v_scale
Give a name to this constant so we at least get an idea of what it is
for.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:16 +0000 (17:39 +0900)]
drm/nouveau/volt/gk20a: make unused public functions static
Nobody else is using these, so make them private.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot [Wed, 1 Jun 2016 08:39:15 +0000 (17:39 +0900)]
drm/nouveau/tegra: fetch gpu_speedo_id
The GPU speedo ID is required to select the right clk/volt parameters on
GM20B.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 29 May 2016 22:57:55 +0000 (08:57 +1000)]
drm/nouveau/secboot: use nvkm_mc_enable/disable()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 29 May 2016 22:56:23 +0000 (08:56 +1000)]
drm/nouveau/secboot: use nvkm_mc_intr_mask/unmask()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 29 May 2016 22:53:06 +0000 (08:53 +1000)]
drm/nouveau/mc/gk104-: add pmu reset mask
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 29 May 2016 22:50:50 +0000 (08:50 +1000)]
drm/nouveau/mc/gf100-: support for masking interrupts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 29 May 2016 22:48:21 +0000 (08:48 +1000)]
drm/nouveau/mc/gt215: support for masking interrupts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 29 May 2016 22:39:27 +0000 (08:39 +1000)]
drm/nouveau/mc: support for temporarily masking interrupts from a specific device
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>