summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/tegra
AgeCommit message (Collapse)AuthorFilesLines
2018-10-30gallium: rework PIPE_HANDLE_USAGE_* flagsMarek Olšák1-2/+1
Only radeonsi uses them, so adjust them to match its needs.
2018-08-31tegra: make use loader_open_render_node(..) helperChristian Gmeiner1-59/+2
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-08-31tegra: fix memory leakChristian Gmeiner1-0/+1
Fixes: 1755f608f52 ("tegra: Initial support") Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-07-31gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák1-1/+3
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-05-30gallium/winsys: rename DRM_API_HANDLE_* to WINSYS_HANDLE_*Dave Airlie1-2/+2
This just renames this as we want to add an shm handle which isn't really drm related. Originally by: Marc-André Lureau <marcandre.lureau@gmail.com> (airlied: I used this sed script instead) This was generated with: git grep -l 'DRM_API_' | xargs sed -i 's/DRM_API_/WINSYS_/g' Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-05-29tegra: Treat resources with modifiers as scanoutThierry Reding1-1/+12
Resources created with modifiers are treated as scanout because there is no way for applications to specify the usage (though that capability may be useful to have in the future). Currently all the resources created by applications with modifiers are for scanout, so make sure they have bind flags set accordingly. This is necessary in order to properly export buffers for such resources so that they can be shared with scanout hardware. Tested-by: Daniel Kolesa <daniel@octaforge.org> Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-29tegra: Fix scanout resources without modifiersThierry Reding1-1/+18
Resources created for scanout but without modifiers need to be treated as pitch-linear. This is because applications that don't use modifiers to create resources must be assumed to not understand modifiers and in turn won't be able to create a DRM framebuffer and passing along which modifiers were picked by the implementation. Tested-by: Daniel Kolesa <daniel@octaforge.org> Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-29tegra: Remove usage of non-stable UAPIThierry Reding1-66/+3
This code path is no longer required with framebuffer modifier support. Tested-by: Daniel Kolesa <daniel@octaforge.org> Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-03-09tegra: Initial supportThierry Reding9-0/+2346
Tegra K1 and later use a GPU that can be driven by the Nouveau driver. But the GPU is a pure render node and has no display engine, hence the scanout needs to happen on the Tegra display hardware. The GPU and the display engine each have a separate DRM device node exposed by the kernel. To make the setup appear as a single device, this driver instantiates a Nouveau screen with each instance of a Tegra screen and forwards GPU requests to the Nouveau screen. For purposes of scanout it will import buffers created on the GPU into the display driver. Handles that userspace requests are those of the display driver so that they can be used to create framebuffers. This has been tested with some GBM test programs, as well as kmscube and weston. All of those run without modifications, but I'm sure there is a lot that can be improved. Some fixes contributed by Hector Martin <marcan@marcan.st>. Changes in v2: - duplicate file descriptor in winsys to avoid potential issues - require nouveau when building the tegra driver - check for nouveau driver name on render node - remove unneeded dependency on libdrm_tegra - remove zombie references to libudev - add missing headers to C_SOURCES variable - drop unneeded tegra/ prefix for includes - open device files with O_CLOEXEC - update copyrights Changes in v3: - properly unwrap resources in ->resource_copy_region() - support vertex buffers passed by user pointer - allocate custom stream and const uploader - silence error message on pre-Tegra124 - support X without explicit PRIME Changes in v4: - ship Meson build files in distribution tarball - drop duplicate driver_tegra dependency Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Andre Heider <a.heider@gmail.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Thierry Reding <treding@nvidia.com>