1
0
Fork 0
Commit Graph

563049 Commits (eceb8a1562db6fc3e1c21cd54a4be0189aa1d0e3)

Author SHA1 Message Date
Christian König eceb8a1562 drm/amdgpu: move VM page tables to the LRU end on CS v2
This makes it less likely to run into an ENOMEM because
VM page tables are evicted last.

v2: move the BOs in the LRU tail after validation

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:22:17 -05:00
Christian König ab74961810 drm/ttm: add ttm_bo_move_to_lru_tail function v2
This allows the drivers to move a BO to the end of the LRU
without removing and adding it again.

v2: Make it more robust, handle pinned and swapable BOs as well.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:21:21 -05:00
Christian König ed704a43e8 drm/ttm: fix adding foreign BOs to the swap LRU
It doesn't make any sense to try to swap out imported BOs.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:19:52 -05:00
Christian König 33d48cf825 drm/ttm: fix adding foreign BOs to the LRU during init v2
If we import a BO with an external reservation object we don't
reserve/unreserve it. So we never add it to the LRU causing a possible
denial of service.

v2: fix typo in commit message

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:18:31 -05:00
Geliang Tang e3837b00b6 drm/radeon: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:15:53 -05:00
Geliang Tang cc29ec874b drm/amdgpu: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:14:59 -05:00
Alex Deucher 403664bbf8 drm/amdgpu/cz: force vce clocks when sclks are forced
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:13:33 -05:00
Alex Deucher 5f57642672 drm/amdgpu/cz: force uvd clocks when sclks are forced
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:13:26 -05:00
Alex Deucher 044c0629b5 drm/amdgpu/cz: add code to enable forcing VCE clocks
VCE DPM works similarly to SCLK DPM.  Add a similar interface
for VCE for forcing the VCE clocks.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:12:43 -05:00
Alex Deucher d83b1e8132 drm/amdgpu/cz: add code to enable forcing UVD clocks
UVD DPM works similarly to SCLK DPM.  Add a similar interface
for UVD for forcing the UVD clocks.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 12:11:30 -05:00
Chunming Zhou 888c9e33e4 drm/amdgpu: fix lost sync_to if scheduler is enabled.
when scheduler is enabled, the semaphore isn't used at all.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
2016-01-13 11:39:15 -05:00
Rex Zhu f3b5cb3e68 drm/amd/powerplay: fix static checker warning for return meaningless value.
The return value should be either negative or zero, no positive.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-13 11:38:42 -05:00
Alex Deucher 5f2323658e drm/amdgpu: add irq domain support
Hardware blocks on the GPU like ACP generate interrupts in
the GPU interrupt controller, but are driven by a separate
driver.  Add an irq domain to the GPU driver so that
blocks like ACP can register a Linux interrupt.

Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-11 09:52:57 -05:00
Alex Deucher ba228ac8f5 drm/amdgpu/cgs: add an interface to access PCI resources
This provides an interface to get access to the base address
of PCI resources (MMIO, DOORBELL, etc.).  Only MMIO and
DOORBELL are implemented right now.  This is necessary to
properly utilize shared drivers on platform devices.  IP
modules can use this interface to get the base address
of the resource and add any additional offset and set the
size when setting up the platform driver(s).

Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-11 09:52:43 -05:00
Dave Airlie 57b4f7e687 Merge branch 'linux-4.5' of git://github.com/skeggsb/linux into drm-next
- gk20a instmem fixes / improvements
- more gm10x vs gm20x differences deal with
- better support for high-frequency hdmi modes
- pstate control interfaces moved to debugfs
- support for pcie link speed changes
- misc other fixes across the board

* 'linux-4.5' of git://github.com/skeggsb/linux: (50 commits)
  drm/nouveau/pmu: prevent falcon from acking interrupts routed to the host
  drm/nouveau/perf: change pcie speed on pstate change
  drm/nouveau/perf: add fields for pci speed and width and use it for the pstates
  drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer cards
  drm/nouveau/pci: implement pcie speed change for kepler+
  drm/nouveau/pci: implement pcie speed change for Fermi
  drm/nouveau/pci: implement pcie speed change for tesla
  drm/nouveau/pci: implement generic code for pcie speed change
  drm/nouveau/pci: add gk104 variant
  drm/nouveau/pci: add gf106 variant
  drm/nouveau/kms: take mode_config mutex in connector hotplug path
  drm/nouveau/nouveau/perfmon: add interface files for current core voltage
  drm/nouveau/sysfs: remove pstate interface
  drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs
  drm/nouveau/debugfs: we need a ctrl object for debugfs
  drm/nouveau/debugfs: rename functions to indicate they are used inside drm
  drm/nouveau/debugfs: add infrastructure to add files with other fops than only read
  drm/nouveau/fifo/gf100: remove references to "daemon"
  drm/nouveau/fb/nv50: remove references to "daemon"
  drm/nouveau/clk: remove references to "daemon"
  ...
2016-01-11 11:48:18 +10:00
Ben Skeggs a18c91dece drm/nouveau/pmu: prevent falcon from acking interrupts routed to the host
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:30:23 +10:00
Karol Herbst f68f4c960a drm/nouveau/perf: change pcie speed on pstate change
v2: remove error and only set link for pcie devices
v6: remove check for pcie device

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11 11:30:23 +10:00
Karol Herbst d3b378c09c drm/nouveau/perf: add fields for pci speed and width and use it for the pstates
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11 11:30:22 +10:00
Karol Herbst c6e2f9bc03 drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer cards
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11 11:30:22 +10:00
Karol Herbst 3aba825ffa drm/nouveau/pci: implement pcie speed change for kepler+
v2: rename functions
v3: remove pcie2 accessors
v6: fix alignement and line width, also remove useless code

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11 11:30:21 +10:00
Karol Herbst 7c923844bf drm/nouveau/pci: implement pcie speed change for Fermi
v5: don't set kepler func pointers
v6: fix alignment and line length
2016-01-11 11:30:21 +10:00
Karol Herbst 5cca4bdc0d drm/nouveau/pci: implement pcie speed change for tesla
v5: don't set fermi or kepler func pointers
v6: fix alignment
2016-01-11 11:30:20 +10:00
Karol Herbst bcc19d9bf5 drm/nouveau/pci: implement generic code for pcie speed change
v2: rename and group functions
v4: change copyright information
    move printing of pcie speeds into oneinit,
    rename all pcie functions to nvkm_pcie_*
    don't try to raise the pcie version when no higher one is supported
v5: revert Copyright changes and rename nvkm_pcie_raise_version to nvkm_pcie_set_version
v6: remove some useless pci_is_pcie checks and rework messages

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11 11:30:20 +10:00
Karol Herbst 28c8060575 drm/nouveau/pci: add gk104 variant
v2: change email used in header
v4: change Copyright information
v5: revert Copyright changes

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11 11:30:19 +10:00
Karol Herbst bec4961e2a drm/nouveau/pci: add gf106 variant
v2: change email used in header
v4: change Copyright information
v5: revert Copyright changes

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11 11:30:19 +10:00
Ben Skeggs 0a882cadbc drm/nouveau/kms: take mode_config mutex in connector hotplug path
fdo#93634

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
2016-01-11 11:29:36 +10:00
Karol Herbst 2e7db87dee drm/nouveau/nouveau/perfmon: add interface files for current core voltage
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:26 +10:00
Karol Herbst fcc95ce90f drm/nouveau/sysfs: remove pstate interface
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:26 +10:00
Karol Herbst 6e9fc17739 drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:25 +10:00
Karol Herbst b126a200e9 drm/nouveau/debugfs: we need a ctrl object for debugfs
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:25 +10:00
Karol Herbst 56c101af40 drm/nouveau/debugfs: rename functions to indicate they are used inside drm
We will need our own debugfs_init and cleanup functions, because
nouveau_drm isn't ready while the DRM ones are called by DRM.

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:24 +10:00
Karol Herbst 1b7ab1a1c3 drm/nouveau/debugfs: add infrastructure to add files with other fops than only read
v2: use the same object for private data as with the drm debugfs functions

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:24 +10:00
Ben Skeggs 9402aec544 drm/nouveau/fifo/gf100: remove references to "daemon"
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:23 +10:00
Ben Skeggs bac34ed635 drm/nouveau/fb/nv50: remove references to "daemon"
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:23 +10:00
Ben Skeggs 547dd2714a drm/nouveau/clk: remove references to "daemon"
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:23 +10:00
Ilia Mirkin caf2be8a34 drm/nouveau/gr/gf100: provide a bit more info for various errors
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:22 +10:00
Ben Skeggs cf0912924f drm/nouveau/bios: parse 8.1 Gbps DP link rate
From DCB 4.1 spec.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:22 +10:00
Ben Skeggs 7d2813c437 drm/nouveau/ltc/gm204: split implementation from gm107
Differences from GM10x:
- GM20x LTC count detection differs from GM10x
- GM20x init doesn't require large page size setting

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:21 +10:00
Ben Skeggs 4fb9c3f3e5 drm/nouveau/ltc/gm107: use nvkm_mask to set cbc_ctrl1
resman and nvgpu both do this, presumably for good reason.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:21 +10:00
Ben Skeggs e3d26d0860 drm/nouveau/ibus/gm204: split implementation from gk104
GM20x doesn't require the priv ring timeout bumps that GK/GM10x have.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:28:20 +10:00
Ben Skeggs 5bf561eeca drm/nouveau/gr/gf100-: subclass nvkm_object to store channel pointer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs f01c4e682c drm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obvious
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 13db6d6ea7 drm/nouveau/nvif: split out client interface definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 923bc416aa drm/nouveau/nvif: split out device interface definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 845f27253c drm/nouveau/nvif: split out ctxdma interface definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 75445a4d64 drm/nouveau/nvif: split out perfmon interface definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 671e969696 drm/nouveau/nvif: split out device control interface definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 8ed1730ccd drm/nouveau/nvif: split out fifo interface definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 7568b10671 drm/nouveau/nvif: split out display interface definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs 538b269bc5 drm/nouveau/nvif: split out nvsw interface definitons
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00