summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-03-15drm-legacy.c: suppress 'unused parameter' warningsHEADmasterEric Engestrom1-0/+3
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-15drm-common.c: remove unused variable `gbm`Eric Engestrom1-1/+0
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-15drm-atomic.c: remove unused variables `gpu_fence_fd`, `kms_fence_fd`Eric Engestrom1-4/+0
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-15drm-atomic.c: remove unused variables `i`Eric Engestrom1-2/+1
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-15drm-atomic.c: fix signed comparisonEric Engestrom1-1/+1
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-15cube-tex.c: fix signed comparisonEric Engestrom1-3/+3
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-15kmscube.c: don't return uninitialized variableEric Engestrom1-2/+2
`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>
2017-03-15.gitignore: cleanups no-longer applicable filesEmil Velikov1-17/+0
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-15configure.ac: remove no-longer applicable m4 folderEmil Velikov3-8/+0
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>
2017-03-15configure.ac: remove unused AC_PROG_LIBTOOLEmil Velikov2-6/+2
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>
2017-03-15configure.ac: remove useless AC_CONFIG_* macrosEmil Velikov1-2/+0
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>
2017-03-15configure.ac: wire -Wall -Wextra directly into the buildEmil Velikov2-38/+1
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.
2017-03-14drm-common.h: forward-declare needed structsEric Engestrom1-0/+3
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>
2017-03-13fix compile break with old EGL headersRob Clark1-0/+17
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.
2017-03-13Remove unneeded GL_GLEXT_PROTOTYPES defineEmil Velikov1-1/+0
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>
2017-03-13Rename drm.[ch] to drm-common.[ch]Emil Velikov6-9/+9
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>
2017-03-13Remove hacky "drm/" prefix in include pathEmil Velikov1-1/+1
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>
2017-03-13Resolve link issue due to unresolved symbol sqrtfEmil Velikov1-1/+1
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>
2017-03-13Add all source files to kmscube_SOURCESEmil Velikov1-2/+3
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-13configure.ac: fix project urlEric Engestrom1-1/+1
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>
2017-03-13Move link against libm to LDADDEmil Velikov1-1/+2
Having -lm in CFLAGS might work, but is the wrong thing to do. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-13autogen.sh: set default sendemail.to/format.subjectPrefixEmil Velikov1-0/+6
Provide some sane defaults for patch submission. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-13autogen.sh: use exec to invoke configureEmil Velikov1-1/+1
There's no point in hanging in waitpid. Just exec the configure script. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-13autogen.sh: quote string variables, honour NOCONFIGUREEmil Velikov1-5/+7
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-13Add m4/.gitignoreEmil Velikov4-2/+7
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>
2017-03-13configure: Stop using AM_MAINTAINER_MODEEmil Velikov2-2/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-03-10drm-atomic: Include <stdlib.h> header fileFabio Estevam1-0/+1
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>
2017-02-25add atomic kms supportRob Clark7-4/+445
Based mostly on original atomic conversion from Gustavo Padovan.
2017-02-22split out legacy (pageflip) kmsRob Clark7-271/+387
Preping to add new atomic alternative path.
2017-02-21add yuv/rgb tex modeRob Clark5-4/+617
2017-02-21add nv12/rgba texture frame dataRob Clark3-0/+45128
2017-02-21split out smooth-shaded cubeRob Clark5-317/+382
2017-02-21split out get_program() helperRob Clark3-69/+98
2017-02-21split gbm outRob Clark4-32/+98
2017-02-21make eglGetPlatformDisplayEXT optionalRob Clark1-5/+11
Pull in get_proc() macro from yuv and atomic-fence branches. Once those parts get merged into a unified kmscube we'll want to look up more extension fxns.
2017-02-21update gitignoreRob Clark1-0/+2
2017-02-21add cmdline arg to specify kms deviceRob Clark1-4/+34
We'll want to add more args in the future, otherwise getopt might be a bit overkill.
2017-01-12Don't check for every kind of DRM driver. Just use the CARD !Myy1-23/+1
The DRM checks are WAY too fragile. Testing every potential DRM driver available goes against what device drivers are for. They're supposed to provide transparent abstractions. Currently the patch uses only card0. Some people *might* have multiple graphics cards. In this case, feel free to add options to choose the right DRM device entry (/dev/dri/cardX). Signed-off-by: Myy <myy@miouyouyou.fr>
2017-01-11Used eglGetPlatformDisplayEXT in order to use this sample with MaliMyy1-1/+9
For some reason, ARM Mali Wayland/DRM drivers does not seem to support eglGetDisplay(gbm.dev) and prefers instead eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_KHR, gbm.dev, NULL). Used the Weston DRM and GL renderers as reference. Signed-off-by: Myy <myy@miouyouyou.fr>
2016-09-20add vc4Eric Anholt1-1/+10
2016-09-07Make search for a crtc more robustNicholas Bishop1-4/+51
Running the kmscube test on qemu with "-vga virtio" fails for me with a "no encoder!" error. Fixed by searching all crtcs for one that is supported by one of the encoders in the connector. This code is only used if the existing `encoder->crtc_id` check is zero, so there should be no regression for systems where it already works. I think this should match the advice given here: https://dvdhrm.wordpress.com/2012/09/13/linux-drm-mode-setting-api/
2016-08-30also print GL extensionsRob Clark1-0/+1
2016-08-30misc cleanupRob Clark1-27/+33
2016-08-30fix typoRob Clark1-4/+4
2016-08-14add virtio_gpuGustavo Padovan1-1/+1
2016-08-14add tegraChristoph Haag1-1/+1
2014-11-04Prefer mode of type "DRM_MODE_TYPE_PREFERED"Gabriel Laskar1-1/+6
On screen with native resolution of 1440x900, there is sometime a compatibility mode for 1280x1024, with shrinked output and vertical bands to maintain ratio. If we select the resolution with the higher area, we select the compatibility mode and not the native resolution. When using mode_type == DRM_MODE_TYPE_PREFERED, we avoid that issue. Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
2013-11-13add msmRob Clark1-1/+1
The msm drm/kms + freedreno gallium driver can run kmscube too. Signed-off-by: Rob Clark <robdclark@gmail.com>
2012-10-24Makefile.am: remove need for m4 folderNicolas Dechesne1-2/+0
The current Makefile.am requires the 'm4' folder, however there is no need for it for the moment. that causes troubles when building packages with Debian CDBS 'autoreconf' which does not use the local autogen.sh script. Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com>
2012-10-24Put vertex attribute data into a VBO.Jesse Barker1-109/+118
This makes the division between set up (init_gl()), and draw (draw()) code cleaner, and should be more efficient in general. Signed-off-by: Jesse Barker <jesse.barker@linaro.org>