summaryrefslogtreecommitdiff
path: root/drm-legacy.c
Commit message (Collapse)AuthorAgeFilesLines
* surfaceless supportRob Clark2020-09-021-5/+21
|
* kmscube: add AMD_performance_monitor supportRob Clark2020-03-071-0/+5
| | | | | Only wired up for shadertoy mode, other modes aren't likely to be interesting.
* kmscube: also print final fps stat at exitRob Clark2020-03-071-0/+6
|
* kmscube: add option to run for specified # of framesRob Clark2020-03-071-3/+4
|
* add fps reportingRob Clark2020-03-071-0/+20
|
* kmscube: add command-line selection of video modeAntonio Borneo2019-07-231-2/+2
| | | | | | | | | | | | | | 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>
* 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>
* drm: Provide a failure path when getting the fbBen Widawsky2017-04-141-0/+8
| | | | | | | | 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>
* drm-legacy: Use correct DRM event context versionDaniel Stone2017-04-071-1/+1
| | | | | | | | | | | | | | | 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>
* drm-legacy: Include <sys/select.h>Fabio Estevam2017-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* drm-legacy.c: suppress 'unused parameter' warningsEric Engestrom2017-03-151-0/+3
| | | | | 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>
* split out legacy (pageflip) kmsRob Clark2017-02-221-0/+124
Preping to add new atomic alternative path.