summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* meson: files should be tracked using `files()`Eric Engestrom2018-12-111-3/+3
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* meson: `-Wextra` is `warning_level=2`Eric Engestrom2018-12-111-9/+2
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* meson: `-Wall` is always enabled in mesonEric Engestrom2018-12-111-1/+0
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* Merge branch 'pull/meson' into 'master'Rob Clark2018-12-102-0/+112
|\ | | | | | | | | Add meson support See merge request mesa/kmscube!5
| * Add meson supportLyude Paul2018-12-092-0/+112
|/
* add missing headerEric Engestrom2018-10-191-0/+1
|
* Merge branch 'fd_close' into 'master'Eric Engestrom2018-10-191-0/+5
|\ | | | | | | | | cube-tex: close the fd after EGLImage creation. See merge request mesa/kmscube!2
| * cube-tex: close the fd after EGLImage creation.Dongseong Hwang2018-08-131-0/+5
| | | | | | | | EGLImage takes the fd ownership.
* | gst-decoder: fix cleanup loopEric Engestrom2018-10-191-1/+1
| | | | | | | | | | planes[i].fd are opened in a `nplanes` loop, so they should be closed in a same-length loop. Also, the name is a hint :P
* | configure.ac: fix repo urlEric Engestrom2018-10-191-1/+1
| |
* | Merge branch 'fix/memleak' into 'master'Eric Engestrom2018-10-191-0/+3
|\ \ | | | | | | | | | | | | common: free temporary log buffer See merge request mesa/kmscube!3
| * | common: free temporary log bufferEric Engestrom2018-10-191-0/+3
| | |
* | | Merge branch 'gitlab-ci' into 'master'Eric Engestrom2018-10-191-0/+53
|\ \ \ | |/ / |/| | | | | | | | add a trivial build-test ci See merge request mesa/kmscube!4
| * | add a trivial build-test ciEric Engestrom2018-10-191-0/+53
|/ /
* | Add README.mdDaniel Vetter2018-10-031-0/+9
|/
* add MSAARob Clark2018-06-196-17/+24
| | | | | Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* gbm: fix fallback for drivers that don't support modifiersRob Clark2018-06-191-1/+4
| | | | | | | | | | Gallium drivers that do not implement resource_create_with_modifiers() will fail gbm_surface_create_with_modifiers() so fall back to the old way. Fixes: 4f7cec0 Use weak functions to handle lack of gbm modifiers Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* cube-tex: make use of modifiersChristian Gmeiner2018-04-033-12/+106
| | | | | | | | | | | | | | | | Fixes rendering issues with mode rgba on etnaviv. I have applied the same change for nv12 variants but they are not supported on etnaviv. v1 -> v2: - check if EGL_EXT_image_dma_buf_import_modifiers is supported - use weak function trick for gbm_bo_get_modifier(..) v2 -> v3: - check if modifier != DRM_FORMAT_MOD_INVALID Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* Use weak functions to handle lack of gbm modifiersEmil Velikov2018-04-024-44/+55
| | | | | | | | | | | | | | Add weak function declaration and check if they're valid prior to calling the functions. This allows us to remove conditional compilation, yet allowing the modifiers codepath to work if API is available. Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* Rework default modifier handlingEmil Velikov2018-04-022-22/+3
| | | | | | | | | | | | | Currently the default modifier is MOD_INVALID. At a later stage, if the modifier is the same (the user may have explicit selected MOD_INVALID), we'll fallback to MOD_LINEAR. Simplify things to a) use MOD_LINEAR by default b) use the user modifier - even if they request MOD_INVALID. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* formats: use weston's egl config matching logic, centralize formatIlia Mirkin2018-02-163-8/+78
| | | | | | | | | | The GBM surface format has to match the DRM mode. Both are used in a couple of places, so unify it so that it's only set in one place. Note that the GBM and DRM formats are identical. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* drm-legacy: fix poll for flip event, actually exit on user inputIlia Mirkin2018-02-061-5/+5
| | | | | | | The select fds have to be reinitialized before each call to select. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robdclark@gmail.com>
* video: fencing to avoid passing frame back to decoder too earlyRob Clark2017-05-081-1/+14
| | | | | | | | | | | | With atomic kms backend, userspace can get further ahead of the gpu. In the decoder, we unref the previous frame when retrieving the current frame. If userspace gets too far ahead, this can happen while the gpu is still sampling from the previous frame. Simple solution is add a fence. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* helper to check for egl entrypointsRob Clark2017-05-085-9/+24
| | | | | | | | | | | | Remove some boilerplate and check more specifically for all the entry- points that different modules need. Ok, I guess it isn't likely for a driver to expose eglCreateImageKHR but not eglDeleteImageKHR.. but otoh kmscube is useful for bringing up drivers. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* drm-atomic: Fix the slashes, dammitBen Widawsky2017-05-021-22/+21
| | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* drm-atomic: Fix print type for modifiersBen Widawsky2017-05-021-1/+2
| | | | | | | | | | | Seems work better than commit 88858d32f2aa86d93397ed68641653cb34d8610b Author: Lucas Stach <l.stach@pengutronix.de> Date: Fri Apr 28 18:18:52 2017 +0200 common: use %llx to print modifier Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* drm-atomic: check for valid GBM BOLucas Stach2017-05-021-0/+4
| | | | | | | | | | | With the modifier support it is possible to force a modifier which isn't compatible with any of the GPU targets. In that case the EGL platform will be unable to allocate the back buffers. Provide an error message in that case, instead of crashing. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Daniel Stone <daniels@collabora.com>
* atomic: Use normal rendering loop for modesetDaniel Stone2017-05-021-20/+10
| | | | | | | | | | | | | | | The initial pattern of: initial_modeset(); while (1) { pageflip(); } was relying on getting a buffer despite not having rendered anything. It would also show undefined content. Replace this with just using the pageflip loop for the initial modeset as well. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* atomic: Use CPU-side KMS fence synchronisationDaniel Stone2017-05-023-1/+22
| | | | | | | | | | | | | | Atomic does not let us have multiple requests in flight at once; if we don't synchronise with the request completion on the CPU side, we can get -EBUSY from the atomic commit. We already have everything required to do this, namely the out-fence from the last commit. Block on that with a CPU-side wait before we call atomic commit, to make sure we'll never attempt to queue an atomic commit before the previous one has completed. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* common: Check for extensions before resolving symbolsDaniel Stone2017-05-021-12/+51
| | | | | | | | | | | | | | eglGetProcAddress is allowed to return any old garbage for symbols it doesn't know about. To avoid any mishaps, check for the appropriate extension presence (split into EGL client extension, EGL display extension, and GL extension, checks) before we look up any symbols through it. The walk through the extension list is taken from libepoxy. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* configure: check for "enable_gbm_modifier"Sinclair Yeh2017-04-291-1/+1
| | | | | | | The proper flag is to check is "enable_gbm_modifier" Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gst-decoder.c: improve buffer_to_image() functionCarlos Rafael Giani2017-04-291-77/+119
| | | | | | | | | | | * Make EGL image attribute specification code more generic, and not specific to certain pixel formats, implicitely gaining support for YUY2 * Better handling of gstbuffers with multiple memory blocks * Print out more information about the stream * Use the GST_VIDEO_INFO_* macros instead of directly accessing the GstVideoInfo fields; this is what the GStreamer documentation recommends Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* configure.ac: Make GStreamer 1.6.0 the minimum requirement for cube-videoCarlos Rafael Giani2017-04-291-1/+1
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: advertise support for GstVideoMetaNicolas Dufresne2017-04-291-0/+25
| | | | | | | | This way, upstream decoder the produce frame with special strides and offsets won't have to copy the frames. This also ensure DMABuf can be delivered to kmscube. Signed-off-by: Nicolas Dufresne <nicolas@ndufresne.ca>
* gst-decoder.c: Improve synchronicity of video outputNicolas Dufresne2017-04-291-0/+4
| | | | | | | | | This is done by setting a max-lateness and enable QoS messaging. This will have the effect that buffer arriving late to the appsink won't will be dropped instead of being queued. This is similar to what GstVideoSink base class would do. Signed-off-by: Nicolas Dufresne <nicolas@ndufresne.ca>
* gst-decoder.c: minor cleanupCarlos Rafael Giani2017-04-291-4/+9
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: add bus watchCarlos Rafael Giani2017-04-291-0/+103
| | | | | | | | | | | | | The bus watch is useful for logging state changes, printing out info/warning/error messages and handling common GStreamer activities like latency redistribution and state change requests (that are sent by elements since they are not allowed to directly change the state). State changes and error messages can also cause a dot graph of the pipeline to be generated if the GST_DEBUG_DUMP_DOT_DIR environment variable is set. See the GST_DEBUG_BIN_TO_DOT_FILE documentation for more. Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: Use element factory name to detect V4L2 video decoderCarlos Rafael Giani2017-04-291-3/+12
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: look at the caps event instead of the allocation queryCarlos Rafael Giani2017-04-291-7/+6
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: add support for YUY2 pixel formatCarlos Rafael Giani2017-04-291-0/+3
| | | | | | This format is used for example by the i.MX6 CODA hardware video codec Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* add "kmscube" GStreamer debug categoryCarlos Rafael Giani2017-04-292-1/+6
| | | | | | | | Without this, the various GST_* log macros won't output anything. To enable, add "kmscube:<loglevel>" to the GST_DEBUG environment variable. Example: GST_DEBUG=kmscube:5 Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* output more and improved information about EGL and OpenGL ES 2.xCarlos Rafael Giani2017-04-291-4/+13
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* common: use %llx to print modifierLucas Stach2017-04-291-1/+1
| | | | | | | | Use long long format when printing the format modifier, as a simple long is only 4 bytes on 32bit systems. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm-atomic: init out_fence_fd to -1Lucas Stach2017-04-291-2/+3
| | | | | | | | | The current initial value of 0 is a valid fd, so this will trip up the GPU submit on the first render, when used as an IN fence for rendering. Reported-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Rob Clark <robdclark@gmail.com>
* common: Give cmdline parameter for forcing modifiersBen Widawsky2017-04-143-10/+32
| | | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* common: use drmModeAddFB2* API over the legacy drmModeAddFB oneBen Widawsky2017-04-143-11/+41
| | | | | | | Note: nothing happens here yet since LINEAR == 0. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* common: Use the create with modifiers interfaceBen Widawsky2017-04-141-0/+22
| | | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* configure: Check for the GBM modifiersBen Widawsky2017-04-141-0/+16
| | | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* drm: Provide a failure path when getting the fbBen Widawsky2017-04-142-0/+17
| | | | | | | | This is helpful for debugging as you will bail early with an error message instead of a random SIGSEGV (or something more obscure). Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* usage: Add missing -V to usage() (trivial)Ben Widawsky2017-04-131-1/+1
|