aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2018-05-18drm/amdgpu/vg20:Restruct uvd.inst to support multiple instancesJames Zhu5-590/+660
Vega20 has dual-UVD. Need add multiple instances support for uvd. Restruct uvd.inst, using uvd.inst[0] to replace uvd.inst->. Repurpose amdgpu_ring::me for instance index, and initialize to 0. There are no any logical changes here. Signed-off-by: James Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-05-18drm/amdgpu/vg20:Restruct uvd to support multiple uvdsJames Zhu9-194/+205
Vega20 has dual-UVD. Need Restruct amdgpu_device::uvd to support multiple uvds. There are no any logical changes here. Signed-off-by: James Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-05-18drm/amdgpu: Disable ip modules that are not ready yetFeifei Xu1-5/+9
Please enable above ips on soc15.c when they're available. Reviewed-by: Christian König <[email protected]> Signed-off-by: Feifei Xu <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-05-18drm/amd/powerplay: update vega20 cg flags (v2)Evan Quan1-1/+17
v2: remove duplicate flag. Reviewed-by: Christian König <[email protected]> Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-05-18drm/tegra: vic: Track interface versionThierry Reding1-0/+5
Set the interface version implemented by the VIC module. This allows userspace to pass the correct command stream when programming the VIC module. Reviewed-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18drm/tegra: gr3d: Track interface versionThierry Reding1-3/+25
Set the interface version implemented by the gr3d module. This allows userspace to pass the correct command stream when programming the gr3d module. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18drm/tegra: gr2d: Track interface versionThierry Reding1-2/+20
Set the interface version implemented by the gr2d module. This allows userspace to pass the correct command stream when programming the gr2d module. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18drm/tegra: Track client versionThierry Reding1-0/+1
Userspace needs to know the version of the interface implemented by a client so it can create the proper command streams. Allow individual drivers to store this version along with the client so that it can be returned to userspace upon opening a channel. Acked-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18drm/tegra: dc: Support rotation propertyThierry Reding3-1/+28
Currently only the DRM_MODE_REFLECT_Y rotation is supported. The driver already supports reflection on the Y axis via a custom flag which is not very useful because it requires custom userspace. Add the standard rotation property that supports 0 degree rotation and Y axis reflection for primary and overlay planes to provide a better interface than the custom flag. v2: keep custom flag for ABI compatibility (Dmitry) Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18drm/tegra: gem: Fill in missing export infoThierry Reding1-0/+2
Set the owner and name of the exported DMA-BUF in addition to the already filled-in fields. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18gpu: host1x: Use not explicitly sized typesThierry Reding2-7/+8
The number of words and the offset in a gather don't need to be explicitly sized, so make them unsigned int instead. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18gpu: host1x: Rename relocarray -> relocs for consistencyThierry Reding2-6/+6
All other array variables use a plural, and this is the only one using the *array suffix. This is confusing, so rename it for consistency. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18gpu: host1x: Drop unnecessary host1x argumentThierry Reding4-13/+13
Functions taking a pointer to a host1x syncpoint as an argument don't need to specify a pointer to a host1x instance because it can be obtained from the syncpoint. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18gpu: host1x: Cleanup loop variable usageThierry Reding4-5/+5
Use unsigned int where possible and don't unnecessarily initialize the loop variable. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18gpu: host1x: Store pointer to client in jobsThierry Reding3-4/+5
Rather than storing some identifier derived from the application context that can't be used concretely anywhere, store a pointer to the client directly so that accesses can be made directly through that client object. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18gpu: host1x: Remove wait check supportThierry Reding7-211/+6
The job submission userspace ABI doesn't support this and there are no plans to implement it, so all of this code is dead and can be removed. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18drm/amdgpu: conditionally compile amdgpu's amdkfd filesOded Gabbay3-9/+63
In case CONFIG_HSA_AMD is not chosen, there is no need to compile amdkfd files that reside inside amdgpu dirver. In addition, because amdkfd depends on x86_64 architecture and amdgpu is not, compiling amdkfd files under i386 architecture can cause compiler errors and warnings. This patch modifies amdgpu's makefile to build amdkfd files only if CONFIG_HSA_AMD is chosen. The only file to be compiled unconditionally is amdgpu_amdkfd.c There are stub functions that are compiled only if amdkfd is not compiled. In that case, calls from amdgpu driver proper will go to those functions instead of the real functions. v2: instead of using function pointers, use stub functions v3: initialize kgd2kfd to NULL in case amdkfd is not compiled Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2018-05-18drm/etnaviv: replace license text with SPDX tagsLucas Stach23-296/+40
This replaces the repetitive GPL-2.0 license text in code and header files with the SPDX tags. Generated hardware headers aren't changed, as any changes there need to be done in the upstream rnndb repository. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
2018-05-18drm/etnaviv: mmuv2: support 40 bit phys addressLucas Stach1-1/+4
MMUv2 supports up to 40 bits of physical address by folding the upper 8 bits into bits [4:11] of the PTE. Signed-off-by: Lucas Stach <[email protected]>
2018-05-18drm/etnaviv: mmuv2: allocate 2nd level page tables on demandLucas Stach1-28/+33
With etnaviv not being tied into the IOMMU framework anymore, the MMU functions will only be called under sleeping locks. Thus we are able to allocate the memory for the 2nd level page tables on demand without having to deal with memory allocation in atomic context. This speeds up driver intitialization on MMUv2 GPU cores, as we don't need to preallocate all the page table memory and also reduces memory consumption for most workloads, as most of them won't use the full GPU virtual address space. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]>
2018-05-18drm/etnaviv: switch MMU page tables to writecombine memoryLucas Stach2-59/+49
We are likely to write multiple page entries at once and already ensure proper write buffer flushing before GPU submit, so this improves CPU time usage in the submit path without any downsides. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]>
2018-05-18drm/etnaviv: remove register loggingLucas Stach5-67/+5
I'm not aware of any case where tracing GPU register manipulation at the kernel level would have been useful. It only adds more indirections and adds to the code size. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
2018-05-18drm/etnaviv: remove cycling through MMU address spaceLucas Stach2-16/+1
This was useful on MMUv1 GPUs, which don't generate proper faults, when the GPU write caches weren't fully understood and not properly handled by the kernel driver. As this has been fixed for quite some time, the cycling though the MMU address space needlessly spreads out the MMU mappings. Signed-off-by: Lucas Stach <[email protected]>
2018-05-18drm/etnaviv: correct timeout calculationRussell King1-8/+17
The old way did clamp the jiffy conversion and thus caused the timeouts to become negative after some time. Also it didn't work with userspace which actually fills the upper 32bits of the 64bit timestamp value. clock_gettime() is 32-bit on 32-bit architectures. Using 64-bit timespec math, like we do in this commit, means that when a wrap occurs, the specified timeout goes into the past and we can't request a timeout in the future. As the Linux implementation of CLOCK_MONOTONIC is reasonable and starts at 0, the first such timer wrap will occur after approx. 68 years of system uptime. Signed-off-by: Russell King <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
2018-05-18gpu: host1x: Fix compiler errors by converting to dma_addr_tEmil Goode2-2/+2
The compiler is complaining with the following errors: drivers/gpu/host1x/cdma.c:94:48: error: passing argument 3 of ‘dma_alloc_wc’ from incompatible pointer type [-Werror=incompatible-pointer-types] drivers/gpu/host1x/cdma.c:113:48: error: passing argument 3 of ‘dma_alloc_wc’ from incompatible pointer type [-Werror=incompatible-pointer-types] The expected pointer type of the third argument to dma_alloc_wc() is dma_addr_t but phys_addr_t is passed. Change the phys member of struct push_buffer to be dma_addr_t so that we pass the correct type to dma_alloc_wc(). Also check pb->mapped for non-NULL in the destroy function as that is the right way of checking if dma_alloc_wc() was successful. Signed-off-by: Emil Goode <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-18drm/nouveau/gr/gf100-: insert some WFIs during gr initBen Skeggs2-0/+6
Inserted wait-for-gr-idle in the places it seems that RM does it, seems to prevent some random mmio timeouts on Quadro GV100. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/clk: Use list_for_each_entry_from_reverseArushi Singhal1-6/+4
It's better to use "list_for_each_entry_from_reverse" for iterating list than "for loop" as it makes the code more clear to read. This patch replace "for loop" with "list_for_each_entry_from_reverse" and "start" variable with "cstate" which helps in refactoring the code and also "cstate" variable is more commonly used in the other functions. changes in v2: "start" variable is removed, before "cstate" variable was removed but "cstate" is more common so preferred "cstate" over "start". Signed-off-by: Arushi Singhal <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau: fix temp/pwm visibility, skip hwmon when no sensors existIlia Mirkin1-3/+13
A NV34 GPU was seeing temp and pwm entries in hwmon, which would error out when read. These should not have been visible, but also the whole hwmon object should just not have been registered in the first place. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau: fix nouveau_dsm_get_client_id()'s return typeLuc Van Oostenryck1-1/+1
The method struct vga_switcheroo_handler::get_client_id() is defined as returning an 'enum vga_switcheroo_client_id' but the implementation in this driver, nouveau_dsm_get_client_id(), returns an 'int'. Fix this by returning 'enum vga_switcheroo_client_id' in this driver too. Signed-off-by: Luc Van Oostenryck <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau: fix mode_valid's return typeLuc Van Oostenryck1-1/+1
The method struct drm_connector_helper_funcs::mode_valid is defined as returning an 'enum drm_mode_status' but the driver implementation for this method uses an 'int' for it. Fix this by using 'enum drm_mode_status' in the driver too. Signed-off-by: Luc Van Oostenryck <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/gr/gv100: initial supportBen Skeggs12-3/+395
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/ce/gv100: initial supportBen Skeggs6-0/+54
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/fifo/gv100: initial supportBen Skeggs21-11/+779
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/kms/gv100: initial supportBen Skeggs21-7/+918
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/disp/gv100: initial supportBen Skeggs26-9/+1544
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/dma/gv100: initial supportBen Skeggs6-0/+159
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/therm/gv100: initial supportBen Skeggs1-0/+1
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/pmu/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GP102. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/fault/gv100: initial supportBen Skeggs4-1/+213
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/bar/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GM107. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/mmu/gv100: initial supportBen Skeggs6-0/+137
VEID support hacked in here, as it's the most convenient place for now. Will be refined once it's better understood. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/ltc/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GP102. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/fb/gv100: initial supportBen Skeggs6-1/+52
Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/imem/gv100: initial supportBen Skeggs1-0/+1
Can't imagine this will be any different. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/tmr/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GK20A. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/bus/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GF100. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/mc/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GP100. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/fuse/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GM107. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/i2c/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GM200. Signed-off-by: Ben Skeggs <[email protected]>
2018-05-18drm/nouveau/gpio/gv100: initial supportBen Skeggs1-0/+1
Appears to be compatible with GK104. Signed-off-by: Ben Skeggs <[email protected]>