Add etna_cmd_stream_flush2 with in-fence fd and out-fence fd support for
explicit fencing.
v3: added etna_cmd_stream_flush2 to etnaviv/etnaviv-symbol-check
v2: renamed etna_cmd_stream_flush_explicit to etna_cmd_stream_flush2
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Import the etnaviv header changes from kernel commits 9ad59fea162c
("drm/etnaviv: submit support for in-fences") and 78ec187f64fa
("drm/etnaviv: submit support for out-fences") for fence fd support.
The drm_etnaviv_gem_submit structure was extended to include a flags
field, new flags for in-fence and out-fence fds and an input/output
fence fd field.
This is one-way backwards compatible because old userspace code passing
a short structure not including the flags field to new kernels will
cause the remaining fields to be zero-filled. New userspace code must
make sure to only pass the short structure to old kernels, though.
Not generated using make headers_install, since the drm/etnaviv_drm.h
uapi header is not installed yet by the kernel.
Copied from the airlied/drm-next commit 78ec187f64fa.
v2: improved commit message
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Add the usual extern "C" when compiling in C++ mode.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This exposes amdgpu_query_sensor_info().
v2: - add amdgpu_query_sensor_info() to the symbols list
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
When using the atomic API, one request can span multiple CRTCs, however
one event is generated per CRTC. As we cannot disambiguate the CRTC with
user data (since we only have one piece of user data to pass in), newer
kernels can include the CRTC ID in the page flip event.
Add a new vfunc to dispatch vblank events carrying a CRTC ID to clients
who negotiate a higher interface version.
[daniels: Rebased, include new cap, call page_flip_handler if it is set
but page_flip_handler2 isn't even on newer contexts, write a
commit message.]
v2: Split into separate commit.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@intel.com>
Generated using make headers_install, based on drm-misc-next commit
5db06a8a98f515f67446a69c57577c4c363ec65d.
This clarifies the comments around modifiers such that they are
per-framebuffer rather than per-plane, adds the beginnings of aspect
ratio mode flags, link status properties, and updates the 'reserved'
field from vblank events to include the CRTC ID.
v2: Split into separate patch, pull in full kernel changes.
v3: Undo revert of connector-type enums, since it is not actually
harmful.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
As mentioned on the xcb mailing list, the platform uses the GLIBC
forwarding mechanism.
https://lists.freedesktop.org/archives/xcb/2016-November/010896.html
Reported-by: Andreas Boll <andreas.boll.dev@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
/me derped, component libdrm doesn't exist under Mesa because it's in DRI.
While at it, give the full URL and make it https.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Accidentally removed with earlier commit. Although rather than simply
adding the check for all platforms, use the same heuristics as we do in
mesa.
Namely: pthread-stubs is a thing only for BSD platforms. Everyone else
should have lightweight pthread API in their C runtime library.
Fixes: 4ecd1ef010 ("xf86drm: fix null termination of string buffer")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
I get a few more symbols in my build tegra-libraries, so let's
include these in the whitelist as well.
While we're at it, update the comment at the top.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Disable some more warnings from clang. These don't appear to be warnings
worth fixing.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
These tests depend on tests/util/ headers, but expect the include path
to be tests/.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
In error path of drmGetBusid() and drmGetReservedContextList(),
there are memory leaks for error path. So this removes them.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This patch fixes invalid code of error path including NULL
deference and leak in g2d test.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
The function g2d_blend_test() is blocked to call because of
feature unsafety. This patch blocks with proper feature name
and also blocks the function itself to remove build warning.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
The function g2d_reset() is not anymore used after the commit
e3c97d1a24 ("exynos/fimg2d: add g2d_validate_xyz() functions"),
so it should be removed.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
As like the commit ecc2a09729 ("xf86drm: Fix type-punned pointer
build warning"), this fixes following build warning.
exynos_drm.c: In function 'exynos_handle_event':
exynos_drm.c:420:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
e = (struct drm_event *) &buffer[i];
^
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Otherwise the make check will rightfully fail.
Fixes: 4e369f25a9 ("amdgpu: add amdgpu_bo_va_op_raw")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This was already done in commit 3dc002df3e ("amdgpu: sync amdgpu_drm.h
with kernel 4.11-rc2"), now update the README accordingly.
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Changes include: PRT and preemption flags, sensor info, and some more
changes for Vega10.
Generated using make headers_install from airlied/drm-next commit
320d8c3d38739fa8e31a076b86cbdafcf8897d5e.
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
This variant allows the caller full control over flags and size, and
allows passing a NULL bo (for PRT support).
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Jerry Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Follow up to 'drm: don't access deprecated register on Vega10'.
The same information is available in enabled_rb_pipes_mask and reading that
register can cause GRBM bus problems.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
swizzle mode needs reference and input picture luma and
chroma pitch aligned with 256
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Move closing the fd to after subclass ->destroy() (since it might want
to delete gem bo's, etc), and actually free() the fd_device object.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
If you don't, then the first place the m4 expands is:
if test "x$INTEL" != "xno"; then
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
fi
So on non-Intel architectures we never find it in the path, and all
subsequent PKG_CHECK_MODULESes fail. Boo autoconf.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Something that valgrind spotted:
==8441== Invalid read of size 4
==8441== at 0x5DEE168: msm_ringbuffer_emit_reloc (msm_ringbuffer.c:506)
==8441== by 0x5B48F0F: OUT_RELOCW (freedreno_util.h:241)
==8441== by 0x5B48F0F: fd5_emit_blit (fd5_emit.h:131)
==8441== by 0x5B48F0F: emit_gmem2mem_surf.isra.12 (fd5_gmem.c:450)
==8441== by 0x5B4910F: fd5_emit_tile_gmem2mem (fd5_gmem.c:477)
==8441== by 0x5B14943: render_tiles (freedreno_gmem.c:342)
==8441== by 0x5B14943: fd_gmem_render_tiles (freedreno_gmem.c:416)
==8441== by 0x5B0FBA7: batch_flush (freedreno_batch.c:281)
==8441== by 0x5B0FBA7: fd_batch_flush (freedreno_batch.c:306)
==8441== by 0x5B11FE7: fd_context_flush (freedreno_context.c:52)
==8441== by 0x58AD783: st_glFlush (st_cb_flush.c:121)
==8441== by 0x5751EE7: _mesa_make_current (context.c:1652)
==8441== by 0x58E6A97: st_api_make_current (st_manager.c:811)
==8441== by 0x5A2CE43: dri_unbind_context (dri_context.c:207)
==8441== by 0x5A2C77F: driUnbindContext (dri_util.c:589)
==8441== by 0x4AC8A67: MakeContextCurrent (glxcurrent.c:214)
==8441== Address 0x6f5eb1c is 204 bytes inside a block of size 240 free'd
==8441== at 0x4868F44: realloc (vg_replace_malloc.c:785)
==8441== by 0x5DEE143: msm_ringbuffer_emit_reloc (msm_ringbuffer.c:502)
==8441== by 0x5B48F0F: OUT_RELOCW (freedreno_util.h:241)
==8441== by 0x5B48F0F: fd5_emit_blit (fd5_emit.h:131)
==8441== by 0x5B48F0F: emit_gmem2mem_surf.isra.12 (fd5_gmem.c:450)
==8441== by 0x5B4910F: fd5_emit_tile_gmem2mem (fd5_gmem.c:477)
==8441== by 0x5B14943: render_tiles (freedreno_gmem.c:342)
==8441== by 0x5B14943: fd_gmem_render_tiles (freedreno_gmem.c:416)
==8441== by 0x5B0FBA7: batch_flush (freedreno_batch.c:281)
==8441== by 0x5B0FBA7: fd_batch_flush (freedreno_batch.c:306)
==8441== by 0x5B11FE7: fd_context_flush (freedreno_context.c:52)
==8441== by 0x58AD783: st_glFlush (st_cb_flush.c:121)
==8441== by 0x5751EE7: _mesa_make_current (context.c:1652)
==8441== by 0x58E6A97: st_api_make_current (st_manager.c:811)
==8441== by 0x5A2CE43: dri_unbind_context (dri_context.c:207)
==8441== by 0x5A2C77F: driUnbindContext (dri_util.c:589)
==8441== Block was alloc'd at
==8441== at 0x4868F44: realloc (vg_replace_malloc.c:785)
==8441== by 0x5DEE08B: msm_ringbuffer_emit_reloc (msm_ringbuffer.c:481)
==8441== by 0x5B48F0F: OUT_RELOCW (freedreno_util.h:241)
==8441== by 0x5B48F0F: fd5_emit_blit (fd5_emit.h:131)
==8441== by 0x5B48F0F: emit_gmem2mem_surf.isra.12 (fd5_gmem.c:450)
==8441== by 0x5B4909F: fd5_emit_tile_gmem2mem (fd5_gmem.c:465)
==8441== by 0x5B14943: render_tiles (freedreno_gmem.c:342)
==8441== by 0x5B14943: fd_gmem_render_tiles (freedreno_gmem.c:416)
==8441== by 0x5B0FBA7: batch_flush (freedreno_batch.c:281)
==8441== by 0x5B0FBA7: fd_batch_flush (freedreno_batch.c:306)
==8441== by 0x5B11FE7: fd_context_flush (freedreno_context.c:52)
==8441== by 0x58AD783: st_glFlush (st_cb_flush.c:121)
==8441== by 0x5751EE7: _mesa_make_current (context.c:1652)
==8441== by 0x58E6A97: st_api_make_current (st_manager.c:811)
==8441== by 0x5A2CE43: dri_unbind_context (dri_context.c:207)
==8441== by 0x5A2C77F: driUnbindContext (dri_util.c:589)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
drm_intel_gem_bo_free() unconditionally attempts to remove the handle
from the hashtable. This goes horribly wrong if we haven't already added
the bo to the hashtable.
Reported-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Move the dereference after the null check.
Fixes: 028715ee70 ("intel: Avoid the need for most overflow
checks by using a scratch page.")
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
If the build dir is outside of the git dir, the order matters :)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Old values are of no interest to the user, so let's reduce the spam
a bit by hiding those.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>