Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Note: nothing happens here yet since LINEAR == 0.
|
|
|
|
|
|
This is helpful for debugging as you will bail early with an error
message instead of a random SIGSEGV (or something more obscure).
|
|
|
|
|
|
Fixes: 87e3ff5683ee54228b3e ("add atomic kms support")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
|
|
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. kmscube was blindly asserting
it supported whatever version that may be, even if it actually didn't.
With libdrm 2.4.78, setting a higher context version than 2 will attempt
to call the page_flip_handler2 vfunc if it was non-NULL, which being a
random chunk of stack memory, it might well have been.
Set the version as 2, which should be bumped only with the appropriate
version checks.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
When the GBM BOs are created, they are created using a bo with a correct
memory requirement but with an incorrect channel layout. This makes
drivers that are picky about matching formats (svga/vmwgfx) complain.
Use the correct GBM formats and require GBM >= 13.0 to make sure they
are available.
v2: Remove a couple of stale comments
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Uses gstreamer for a simple decoder. If decoder can give us dma-buf's
directly, we'll directly use that as a texture (zero copy), otherwise
memcpy into a buffer from gbm. This should work with both hw and sw
decoders.
Probably room for improvement. And the interface between gl and the
decoder is pretty simple so I suppose other decoders would be possible.
(But hopefully they could already be supported via gstreamer.)
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
(otherwise there will be symbol conflicts in the next patch.. also these
should be const)
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
|
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Currently the following build errors are seen on mips64el:
cube-tex.c: In function 'get_fd_rgba':
cube-tex.c:230:2: error: 'for' loop initial declarations are only allowed in C99 mode
for (uint32_t i = 0; i < texh; i++) {
^
cube-tex.c:230:2: note: use option -std=c99 or -std=gnu99 to compile your code
cube-tex.c: In function 'get_fd_y':
cube-tex.c:261:2: error: 'for' loop initial declarations are only allowed in C99 mode
for (uint32_t i = 0; i < texh; i++) {
^
cube-tex.c: In function 'get_fd_uv':
cube-tex.c:292:2: error: 'for' loop initial declarations are only allowed in C99 mode
for (uint32_t i = 0; i < texh/2; i++) {
^
Add the -std=c99 option in CFLAGS to fix this problem.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
Include <sys/select.h> to fix the following build error seen on mips64el:
drm-legacy.c: In function 'legacy_run':
drm-legacy.c:45:2: error: unknown type name 'fd_set'
fd_set fds;
^
drm-legacy.c:55:2: warning: implicit declaration of function 'FD_ZERO' [-Wimplicit-function-declaration]
FD_ZERO(&fds);
^
drm-legacy.c:56:2: warning: implicit declaration of function 'FD_SET' [-Wimplicit-function-declaration]
FD_SET(0, &fds);
^
drm-legacy.c:94:4: warning: implicit declaration of function 'select' [-Wimplicit-function-declaration]
ret = select(drm.fd + 1, &fds, NULL, NULL, NULL);
^
drm-legacy.c:101:4: warning: implicit declaration of function 'FD_ISSET' [-Wimplicit-function-declaration]
} else if (FD_ISSET(0, &fds)) {
^
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
There is no need to use brackets for single line if statements,
so simply remove them.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
In kmscube.c there is the following logic:
if (mode == SMOOTH) {
egl = init_cube_smooth(gbm);
} else {
egl = init_cube_tex(gbm, mode);
}
,which makes init_cube_tex() to be never called on the SMOOTH case.
Handle the SMOOTH switch case inside init_tex() to fix the following
build warning:
cube-tex.c: In function 'init_tex':
cube-tex.c:438:2: warning: enumeration value 'SMOOTH' not handled in switch [-Wswitch]
switch (mode) {
^
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
[Eric: add assert()]
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
`ret` isn't used by anything, so remove it as well.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
With the removal of libtool as of last commit we no longer need the m4
folder or any of the related infra.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
We're creating a single binary with no static/shared libraries.
We implicitly relied on the macro to pull AC_PROG_CC, so we should add
it now, otherwise configure will fail.
As a nice bonus, with the last three commits combined the execution time
of autogen.sh drops by more than half.
before after
real 0m7.965s 0m3.661s
user 0m4.530s 0m1.280s
sys 0m0.280s 0m0.070s
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Namely:
AC_CONFIG_SRCDIR - it's used to "help" people who deliberatelly override
--srcdir. Nobody should be doing this to begin with, so just let them
get what they're asking for.
AC_CONFIG_HEADERS - we don't have any conditionals, function or macro
checks. Hence we don't need the header.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Both flags are widely available and the rest of MAYBE_WARN are of little
interest. Since atm no flags were passed, we might as well not bother
with anything but the former two.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
This will prompt some warnings, but we can sort this at a later stage.
|
|
drm-common.h:63:49: warning: ‘struct egl’ declared inside parameter list will not be
visible outside of this definition or declaration
int (*run)(const struct gbm *gbm, const struct egl *egl);
^~~
drm-common.h:63:26: warning: ‘struct gbm’ declared inside parameter list will not be
visible outside of this definition or declaration
int (*run)(const struct gbm *gbm, const struct egl *egl);
^~~
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
We would fall-back to eglGetDisplay() if EGL_EXT_platform_base is not
supported, but that still required at least compiling against recent EGL
headers.
|
|
The define itself is sort of a hack for cases where one wants to static
link against extensions. Instead one should be calling
{egl,glX}GetProcAddress as clearly documented. Since our code is sane
enough to not depend on the static link, simply drop the quirky define.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Depending on the moon cycle and other factors we might end up including
the local or libdrm version of drm.h. Simply rename the files to make it
distinct and easy to track and manage.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
The file is provided by the libdrm which knows about the location.
Since we already honour the Cflags provided by libdrm, any potential
build issues are most likely due to broken package shipped by the
distro.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Due to a missing trailing \ the -lm was not added to the LDADD and we'd
fail at link time.
Fixes: 1cdfb660a67 ("Move link against libm to LDADD")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
As announced by Rob Clark [1], the project has moved to fd.o
[1] https://lists.freedesktop.org/archives/mesa-dev/2017-February/145745.html
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
Having -lm in CFLAGS might work, but is the wrong thing to do.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Provide some sane defaults for patch submission.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
There's no point in hanging in waitpid. Just exec the configure script.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
It picks more components, from the autotools build system, allows us to
remove the autogen.sh workaround.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Include <stdlib.h> header file to fix the following build warning:
CC kmscube-drm.o
drm-atomic.c: In function 'init_drm_atomic':
drm-atomic.c:346:14: warning: implicit declaration of function 'calloc' [-Wimplicit-function-declaration]
drm.plane = calloc(1, sizeof(*drm.plane));
^
drm-atomic.c:346:14: warning: incompatible implicit declaration of built-in function 'calloc'
drm-atomic.c:346:14: note: include '<stdlib.h>' or provide a declaration of 'calloc'
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Based mostly on original atomic conversion from Gustavo Padovan.
|
|
Preping to add new atomic alternative path.
|
|
|
|
|
|
|
|
|