| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Only wired up for shadertoy mode, other modes aren't likely to be
interesting.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
| |
|
|
|
|
|
| |
Fixes: 87e3ff5683ee54228b3e ("add atomic kms support")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Based mostly on original atomic conversion from Gustavo Padovan.
|
|
|
|
| |
Preping to add new atomic alternative path.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We'll want to add more args in the future, otherwise getopt might be a
bit overkill.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
The msm drm/kms + freedreno gallium driver can run kmscube too.
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Found the original author of the gl cube code, so update the copyright
notice accordingly.
|
|
|