Eventually we'll want a separate bo-cache for ringbuffer bo's, since
ringbuffer bo's get vmap'd on the kernel side, it is preferrable to
re-use them as ringbuffers rather than something else. Plus should
help to add madvise support if it is a bit better decoupled from bo
allocation (next patch).
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Provide a way to insert a reference (ie. OUT_IB()) to a target ring,
executing all the cmds in the target ring from the start.
Sometimes the ringmarker stuff is just overkill. And it will won't
really work properly once we support multiple physical cmdstream buffers
per fd_ringbuffer. So in the future the old ringmarker related APIs
will be deprecated in a few releases.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
When in multi GPU case, devices array may have some
NULL "hole" in between two devices. So check all
array elements and free non-NULL device.
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently drmGetDevice always returns the first device it finds under
/dev/dri/.
Move the target device to the start of the list during iteration. This
way during deduplication it'll preserve its place and will be returned
to the user.
v2: Keep the memory leak separate.
v3: Move the drmFoldDuplicatedDevices description
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
[Emil Velikov: move drmFoldDuplicatedDevices description, add
changelog, reword commit message]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This header provides major/minor/makedev funcs under most Linux C
libs. Pull it in to fix building with newer versions that drop the
implicit include via sys/types.h.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94231
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
AOSP master now errors if LOCAL_SRC_FILES contains headers, so filter
out header files from the source lists.
Signed-off-by: Rob Herring <robh@kernel.org>
This is unusual. Usually IDs listed on early stages of platform
definition are kept there as reserved for later use.
However these IDs here are not listed anymore in any of steppings
and devices IDs tables for Kabylake on configurations overview
section of BSpec.
So it is better removing them before they become used in any
other future platform.
v2: Rebase.
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
The spec has been updated adding new PCI IDs.
v2: Avoid using "H" instead of HALO to keep names uniform - DK.
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Previously, (*device)->businfo.pci would end up misaligned, which results
in undefined behavior.
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
When multi GPU present, after drmFoldDuplicatedDevices
merge same busid deveces, two different devices may be
seperated by zero in local_devices[]. The for loop
should check all local_devices instead of exit when
meet a zero.
Reviewed-by: Jim Qu <Jim.Qu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Not initializing the ip instance leads to sporadic fails in the tests.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Make sure that this function is defined (even empty/dummy) when KGSL support is
disabled, since it's part of the driver i/f and it was reported to cause symbols
issues when building against musl libc implementation.
Reported-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
This needs the kernel patch to make sure the C++ protection is in place.
Otherwise just new defines, using the right fixed-width types and
some shuffling in where stuff is defined (the DRM_CAP list moved, but
the #defines are the same).
Generated using make headers_install.
Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Generated using make headers_install.
Only cosmetics&new definitions here now.
Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Only real difference is switching to kernel types for fixed-width
integers, like we should.
Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Generated using make headers_install. Only difference is a new value
of SAREA_MAX for mips. Not that we ever shipped a dri1 driver on that
platform probably ...
Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Generated using make header_install.
Generated fromd drm-intel-next-queued commit
55c561a708eec328822721233b1148119e80f5c3
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This was purely a kernel-internal type used in a early patch version
to add GEM bo mmap support. It was never used in-kernel in merged code
nor in userspace. Nuke it to align with kernel headers.
For reference the kernel patch:
commit 05f51722a154e73019434bd020e50ddb941046c5
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed Dec 11 11:34:32 2013 +0100
drm/bufs: remove handling of _DRM_GEM mappings
Gone with the new gem vma offset manager from David.
We can also ditch the uapi header definition from the enum since
userspace never used this. It ended up in there purely for historical
reasons (for reusing the old drm mmap code essentially), not because
userspace ever needed it.
Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Update the UAPI header to the latest version in the Linux kernel. This
changes the struct drm_tegra_gem_mmap to properly handle offsets on 64-
bit architectures.
See commit bdf765071a8b ("drm/tegra: gem: Return 64-bit offset for
mmap(2)") in the Linux kernel (as of v4.1).
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
modetest was failing to work with driver because it wasn't in the
module list.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
These IDs were already part of the kernel since:
kernel commit 985dd4360fdf2533fe48a33a4a2094f2e4718dc0
Author: Imre Deak <imre.deak@intel.com>
Date: Thu Jan 28 16:04:12 2016 +0200
drm/i915/bxt: update list of PCIIDs
Cc: Venkateswarlu Vinjamuri <venkateswarlu.v.vinjamuri@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>