'zpos' plane property is configurable, so adjust hardware layers
priority based on the zpos value. 'zpos' value shifted by one can be
used directly as hw priority value and stored to the registers, because
mixer accepts priority values from 1 to 15 (0 means that layer is
disabled).
This patch also changes the default layer priority to match already
exposed initial zpos values. The initial configuration is now:
[top] video > gfx layer1 > gfx layer0 [bottom].
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
This patch adds all infrastructure to make zpos plane property
configurable from userspace.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
This patch renames zpos entry to index, because in most places it is
used as index for selecting hardware layer/window instead of
configurable layer position. This will later enable to make the zpos
property configurable.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Fixes: 1e4854e96c ("drm/amdgpu/powerplay: implement thermal control for tonga.")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dave Airlie <airlied@redhat.com>
- 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"
...
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>
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>
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>
Commit 69c4938249 ("drm/nouveau/instmem/gk20a: use direct CPU access")
tried to be smart while using the DMA-API by managing the CPU mappings of
buffers allocated with the DMA-API by itself. In doing so, it relied
on dma_to_phys() which is an architecture-private function not
available everywhere. This broke the build on several architectures.
Since there is no reliable and portable way to obtain the physical
address of a DMA-API buffer, stop trying to be smart and just use the
CPU mapping that the DMA-API can provide. This means that buffers will
be CPU-mapped for all their life as opposed to when we need them, but
anyway using the DMA-API here is a fallback for when no IOMMU is
available so we should not expect optimal behavior.
This makes the IOMMU and DMA-API implementations of instmem diverge
enough that we should maybe put them into separate files...
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
The LRU list used for recycling CPU mappings was handling concurrency
very poorly. For instance, if an instobj was acquired twice before being
released once, it would end up into the LRU list even though there is
still a client accessing it.
This patch fixes this by properly counting how many clients are
currently using a given instobj.
While at it, we also raise errors when inconsistencies are detected, and
factorize some code.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This patch is needed by initramfs tools to detect
the required firmware files for the module.
This patch tests for either TEGRA_124_SOC or TEGRA_132_SOC
for the firmwares related to the Tegra K1 generation.
v2: move the MODULE_FIRMWARE to the nvidia_platform.c file.
This will avoid to test for NOUVEAU_PLATFORM_DRIVER
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
The offset should be 8 on Kepler and later.
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Very rough, no idea how correct it is at this point, but it prevents
getteximage-depth from piglit from hanging the GPU.
v2: updated with NV_PCE_FE_LAUNCHERR_REPORT values provided by NVIDIA
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
The CPU-side tracking of engine runlists was not protected by a lock,
leading to list corruption, eventually causing runlist_update() to
overrun the GPU-side runlist, triggering an OOPS.
Fixes some of the issues noticed during parallel piglit runs.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>