summaryrefslogtreecommitdiff
path: root/kmscube.c
Commit message (Collapse)AuthorAgeFilesLines
* surfaceless supportRob Clark2020-09-021-4/+11
|
* kmscube: add AMD_performance_monitor supportRob Clark2020-03-071-2/+18
| | | | | Only wired up for shadertoy mode, other modes aren't likely to be interesting.
* kmscube: add option to run for specified # of framesRob Clark2020-03-071-3/+9
|
* add shadertoy modeRob Clark2020-03-071-2/+10
| | | | | | Doesn't handle shadertoy shaders which use textures for inputs. That probably wouldn't be straightforward without using the web API to fetch and introspect the shader. But that sounds like a lot more work.
* clean up arg parsingRob Clark2020-03-071-3/+3
|
* kmscube: make fb/gl config format settable on cmdlineIlia Mirkin2019-08-301-1/+19
| | | | | | | | Instead of changing the code each time, allow the fourcc to be passed in as an argument. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robdclark@gmail.com>
* drm: Find a proper modeset device, is none is providedEzequiel Garcia2019-07-301-1/+1
| | | | | | | | | | | | | | | | Instead of having a fixed /dev/dri/card0 default, iterate over primary devices until one with modeset capabilities is found. This is quite useful when a render-only driver (such as lima or panfrost) was registered before the modeset driver, taking over /dev/dri/card0. While here, add a warning for devices explicitly set via -D, by checking if they look like a modeset device. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* kmscube: add command-line selection of video modeAntonio Borneo2019-07-231-5/+25
| | | | | | | | | | | | | | The mode of type "DRM_MODE_TYPE_PREFERED" can be miss-configured, making kmscube not working. Plus, user could need to test the other available video modes at the connector. Add a command line flag to specify the video mode. If the mode is not present, print an informative message and fall-back to the default behaviour (preferred mode or highest resolution mode). Signed-off-by: Antonio Borneo <antonio.borneo@st.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* De-duplicate ARRAY_SIZE macroRob Clark2019-01-101-2/+0
|
* add MSAARob Clark2018-06-191-3/+9
| | | | | Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* Rework default modifier handlingEmil Velikov2018-04-021-1/+1
| | | | | | | | | | | | | 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>
* add "kmscube" GStreamer debug categoryCarlos Rafael Giani2017-04-291-1/+3
| | | | | | | | 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>
* common: Give cmdline parameter for forcing modifiersBen Widawsky2017-04-141-3/+11
| | | | | 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
|
* kmscube: map --atomic to atomic modesetting :)Eric Engestrom2017-04-081-1/+1
| | | | | Fixes: 87e3ff5683ee54228b3e ("add atomic kms support") Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* add video cubeRob Clark2017-03-271-2/+18
| | | | | | | | | | | | | | 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>
* kmscube: Remove unneeded bracketsFabio Estevam2017-03-191-3/+2
| | | | | | | | 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>
* kmscube.c: don't return uninitialized variableEric Engestrom2017-03-151-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>
* Rename drm.[ch] to drm-common.[ch]Emil Velikov2017-03-131-1/+1
| | | | | | | | 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>
* add atomic kms supportRob Clark2017-02-251-4/+13
| | | | Based mostly on original atomic conversion from Gustavo Padovan.
* split out legacy (pageflip) kmsRob Clark2017-02-221-265/+6
| | | | Preping to add new atomic alternative path.
* add yuv/rgb tex modeRob Clark2017-02-211-4/+30
|
* split out smooth-shaded cubeRob Clark2017-02-211-317/+7
|
* split out get_program() helperRob Clark2017-02-211-69/+8
|
* split gbm outRob Clark2017-02-211-32/+16
|
* make eglGetPlatformDisplayEXT optionalRob Clark2017-02-211-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.
* add cmdline arg to specify kms deviceRob Clark2017-02-211-4/+34
| | | | | We'll want to add more args in the future, otherwise getopt might be a bit overkill.
* Don't check for every kind of DRM driver. Just use the CARD !Myy2017-01-121-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>
* Used eglGetPlatformDisplayEXT in order to use this sample with MaliMyy2017-01-111-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>
* add vc4Eric Anholt2016-09-201-1/+10
|
* Make search for a crtc more robustNicholas Bishop2016-09-071-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/
* also print GL extensionsRob Clark2016-08-301-0/+1
|
* misc cleanupRob Clark2016-08-301-27/+33
|
* fix typoRob Clark2016-08-301-4/+4
|
* add virtio_gpuGustavo Padovan2016-08-141-1/+1
|
* add tegraChristoph Haag2016-08-141-1/+1
|
* Prefer mode of type "DRM_MODE_TYPE_PREFERED"Gabriel Laskar2014-11-041-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>
* add msmRob Clark2013-11-131-1/+1
| | | | | | The msm drm/kms + freedreno gallium driver can run kmscube too. Signed-off-by: Rob Clark <robdclark@gmail.com>
* Put vertex attribute data into a VBO.Jesse Barker2012-10-241-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>
* update copyrightRob Clark2012-09-041-0/+3
| | | | | Found the original author of the gl cube code, so update the copyright notice accordingly.
* initial commitRob Clark2012-09-031-0/+641