src/video/kmsdrm/SDL_kmsdrmvideo.c


Log

Author Commit Date CI Message
Sam Lantinga f23022ef 2021-01-25T20:03:21 Removed non-functional window grab implementations
Cameron Gutman a0d3c6c6 2021-01-25T21:42:14 Rename SetWindowGrab() to SetWindowMouseGrab()
Manuel Alfayate Corchete 8e1005f8 2021-01-23T22:47:06 [KMS/DRM] Bugfix for #5489: Non-FULLSCREEN windows incorrecty use videomode changing to look fullscreen.
Manuel Alfayate Corchete ee93f0ed 2021-01-19T15:35:43 [KMS/DRM] Revert unaproved fix for bug #5465.
Manuel Alfayate Corchete 99facb1d 2021-01-17T21:17:01 [KMS/DRM] Fix for bug #5470: ratio correction for fullscreen windows with no matching resolution. Correct bracket position in else statements so they follow the coding style.
Manuel Alfayate Corchete 03665004 2021-01-15T15:00:17 [KMS/DRM] Small fix to KMSDRM_Waitpageflip(). More comments on how it works.
Sam Lantinga 82aafa9a 2021-01-14T14:32:11 Fixed bug 5461 - Add rewritten WSCONS driver for OpenBSD wahil1976 This patch adds a written-from-scratch WSCONS driver for OpenBSD. It does not have hardcoded keymaps, and it features mouse support when wsmux is available. For this to work, it needs access to the /dev/wskbd* devices which are not available to non-root users by default. Access to those can be granted by changing /etc/fbtab to give the logging user the ownership of those devices.
Manuel Alfayate Corchete 1adadc77 2021-01-14T10:18:40 [KMS/DRM] Adjust come return values. Improve comments.
Manuel Alfayate Corchete 57661e42 2021-01-13T20:17:50 [KMS/DRM] Remove unused header.
Manuel Alfayate Corchete ead3c406 2021-01-13T20:11:01 [KMS/DRM] Refactor, improve and re-comment async pageflips code.
Manuel Alfayate Corchete aac74db6 2021-01-13T15:54:26 [KMS/DRM] Enable async pageflips.
Manuel Alfayate Corchete 9384e595 2021-01-12T20:15:37 [KMS/DRM] Add warning comentary to avoid future experiments with scaling.
Manuel Alfayate Corchete 84427549 2021-01-12T00:22:58 [KMS/DRM] Refactor KMSDR_CreateSurface to group all non-Vulkan stuff in a block.
Manuel Alfayate Corchete 87eb734c 2021-01-11T23:59:40 [KMS/DRM] Don't ask SDL to scale image when in Vulkan mode.
Manuel Alfayate Corchete 85e8adf7 2021-01-11T22:28:27 [KMS/DRM] Unused code cleaning.
Manuel Alfayate Corchete 5105ecf8 2021-01-11T21:02:07 [KMS/DRM] Move surface size info to window driverdata, for coherency.
Manuel Alfayate Corchete 2067a7db 2021-01-11T20:29:09 [KMS/DRM] Fix fullscreen to windowed transition. Fix aspect ratio correction without using planes.
Manuel Alfayate Corchete 850d9c8c 2021-01-09T02:25:13 [KMS/DRM] Cleanup remainings from plane/scaling usage.
Manuel Alfayate Corchete 2aeb3177 2021-01-08T22:00:28 [KMS/DRM] Fix vkQuake3 in OpenGL mode.
Manuel Alfayate Corchete b2449473 2021-01-08T18:57:12 [KMS/DRM] Go back to the LEGACY interface only because using planes breaks compatibility with HW, so no advantage on using ATOMIC.
Manuel Alfayate Corchete 940e1b8d 2021-01-08T16:33:50 [KMS/DRM] Small readability changes.
Manuel Alfayate Corchete cef1bd06 2021-01-08T13:14:42 [KMS/DRM] Prevent creating another default cursor everytime a window is created. Other fixes and cleanups.
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Manuel Alfayate Corchete e1fb969b 2020-12-31T01:40:15 [KMS/DRM] Correct comments about last bugfix.
Manuel Alfayate Corchete e34caa97 2020-12-31T01:31:57 [KMS/DRM] Correct EGL/GL library loading on window creation, thus saving window re-creation.
Manuel Alfayate Corchete 427c96ec 2020-12-29T14:24:38 [KMS/DRM] Rework some functions.
Manuel Alfayate Corchete 7539ac80 2020-12-28T18:22:07 [KMS/DRM] Restore hacky code to point to TTY buffer on surface destruction b/c I lack alternatives.
Manuel Alfayate Corchete 0feaf7d1 2020-12-28T14:37:58 [KMS/DRM][Vulkan] Correct non-existing property. Remove hacky surface destruction code (TTY buffer isn't there after a Vulkan window is created).
Manuel Alfayate Corchete 46d31d57 2020-12-27T00:43:06 [KMS/DRM][Vulkan] Fix segfault when changing fullscren mode and permanent cursor when changing between Vulkan and GL renderers in vkQuake3. Tidy up window destruction code.
Manuel Alfayate Corchete 2fc987c2 2020-12-22T14:15:33 [Buildsystem] Add guards for not building with KMSDRM support if EGL is not available.
Sam Lantinga 4cd98160 2020-12-21T09:44:25 Fixed whitespace
Manuel Alfayate Corchete 8766d604 2020-12-21T17:29:24 [Video/KMSDRM] Fix potetial access to freed structure and complete errorchecks.
Manuel Alfayate Corchete b06ef3a1 2020-12-21T01:53:11 [Video/KMSDRM] Manually re-show the cursor on window creation, if needed.
Manuel Alfayate Corchete 2756b0f3 2020-12-20T14:29:58 [Video/KMSDRM] Init and deinit mouse stuff at the same time that GBM stuff.
Manuel Alfayate Corchete cf71e017 2020-12-19T23:32:09 [Video/KMSDRM] Remove auxiliary AMDGPU compatibility workarounds not needed anymore.
Manuel Alfayate Corchete ab3a390e 2020-12-19T17:35:04 [Video/KMSDRM] Better ATOMIC caps testing: patch by Oskan Sezer.
Manuel Alfayate Corchete 436499f3 2020-12-19T02:08:59 [Video/KMSDRM] Comment out some debug info, adjust comments for future work.
Ozkan Sezer 6b81cac4 2020-12-19T01:25:50 remove duplicated SDL_SetError after calling check_atomic_modesetting()
Manuel Alfayate Corchete 8952a613 2020-12-18T23:17:42 [Video/KMSDRM] Re-arrange display members setup.
Manuel Alfayate Corchete f60f8d5d 2020-12-18T22:53:51 [Video/KMSDRM]: Add Vulkan support to the KMSDRM backend.
Ozkan Sezer 6c4ab484 2020-12-18T17:50:02 SDL_kmsdrmvideo.c: check atomic modesetting in check_modesetting() .. so that KMSDRM_CreateDevice() can fail and SDL_VideoInit() would move on to next bootstrap member which is kmsdrm_legacy. hopefully fixes bug #5393.
Ozkan Sezer 90456670 2020-12-17T14:11:00 more "'for' loop initial declarations are only allowed in C99 mode" fixes
Ryan C. Gordon 010d5fba 2020-10-26T09:49:09 kmsdrm: Make this build with significantly older system libraries. This allows one to build Raspberry Pi versions on an ancient version of Raspbian and get both the KMSDRM and RPI video targets built into SDL, giving maximum binary compatibility from linking against an older glibc, etc, but also making one library that can access video on all RPi models and OS releases.
Manuel Alfayate Corchete 5682b066 2020-10-22T19:51:57 kmsdrm: Add comment about KMSDRM_VideoQuit() changes.
Manuel Alfayate Corchete 63b78277 2020-10-22T19:44:38 kmsdrm: properly exit with an error when ATOMIC interface is not yet available, instead of just segfaulting.
Manuel Alfayate Corchete a3262205 2020-10-22T17:55:45 kmsdrm: rearrange init function so we try ATOMIC compatibility first.
Manuel Alfayate Corchete b1ea0be8 2020-10-22T17:06:34 kmsdrm: Add missing checks after SDL_calloc() calls.
Manuel Alfayate Corchete ad9ec8b3 2020-10-22T16:15:34 kmsdrm: Small fix, missing bracket.
Manuel Alfayate Corchete 87a86675 2020-10-22T16:01:51 kmsdrm: Always use spaces for indentation. Always use SDL_calloc() for calloc.
Manuel Alfayate Corchete cca16c9c 2020-10-15T17:56:19 kmsdrm: merge GetDisplayDPI implementation by bms20 <brett@mynah-software.com>
Sam Lantinga 76980e30 2020-10-08T16:42:20 Added events for dynamically connecting and disconnecting displays, with an iOS implementation
Manuel Alfayate Corchete 78c274cb 2020-09-26T19:18:09 kmsdrm: merge patches from Ozkan Sezer for removing c-99'isms and raising libgbm version reqeriments.
Manuel Alfayate Corchete 9c342e76 2020-09-13T21:41:10 kmsdrm: merge heap buffer overflow and cursor creation patches from meyraud705.
Manuel Alfayate Corchete 0cb9bfa5 2020-09-12T15:58:47 kmsdrm: less excessive error checkhing
Manuel Alfayate Corchete 9e9227ad 2020-09-12T04:52:56 kmsdrm: reimplement modesetting for fullscreen window scaling and AR-correction.
Manuel Alfayate Corchete 01b0cf1c 2020-09-12T00:47:00 Backed out changeset 4a45d1a30d25 kmsdrm: Fake KMSDRM_SetDisplayMode() is needed for some programs after all.
Manuel Alfayate Corchete 7b676548 2020-09-12T00:16:08 kmsdrm: don't fool SDL into thinking that changing the physical videomode is done.
Ryan C. Gordon 3c6004fe 2020-09-10T15:07:23 kmsdrm: Choose how to swap buffers based on EGL extension availability.
Ryan C. Gordon 224aa45b 2020-09-10T15:04:35 kmsdrm: Implement GL_DefaultProfileConfig for Raspberry Pi compatibility. If we think this might be a Raspberry Pi device, default to ES2. Otherwise, accept SDL's higher-level defaults.
Manuel Alfayate Corchete 351219bf 2020-09-09T03:18:26 kmsdrm: On VideoQuit(), only destroy dumb buffer if it exists.
Manuel Alfayate Corchete 244d0ad8 2020-09-08T15:30:45 kmsdrm: Tell SDL that mouse has entered the window via artificial event. Fixes sticky mouse in Scummvm.
Manuel Alfayate Corchete 550e1533 2020-09-08T02:42:32 kmsdrm: No need to test for display driverdata when freeing a plane.
Manuel Alfayate Corchete 6e03fab9 2020-09-07T23:15:33 kmsdrm: add temporary RPI4_COMPAT define to try RPI4+current Rasbian compatibility.
Manuel Alfayate Corchete 0f807fd6 2020-09-07T22:54:15 kmsdrm: use a black dumb buffer for keeping the PRIMARY PLANE occupied when we destroy the KMS buffers, instead of using the TTY buffer, to avoid flickering.
Manuel Alfayate Corchete cce6c605 2020-09-07T01:33:04 kmsdrm: fix errors when trying to free up videomode driverdata pointers on quit.
Manuel Alfayate Corchete 9501b1c6 2020-09-07T00:18:13 kmsdrm: fix scaling for SDL_WINDOW_FULLSCREEN windows.
Manuel Alfayate Corchete daa752b1 2020-09-06T23:19:54 kmsdrm: fix first frame display: no need to wait for SwapWindow() for EGL surface creation.
Manuel Alfayate Corchete 68ac9349 2020-09-06T12:48:39 kmsdrm: more coherent returns for SwapWindow.
Manuel Alfayate Corchete d7aebbd5 2020-09-06T12:08:22 kmsdrm: Don't create surfaces until EGL context is available.
Manuel Alfayate Corchete f4e02a5c 2020-08-31T19:17:17 kmsdrm: Do NOT modify window size manually from the backend: doing so caused renderer scaling params miscalculation.
Manuel Alfayate Corchete c09d1cee 2020-08-28T23:04:00 kmsdrm: Apply window reconfiguration in SetWindowSize(), too.
Manuel Alfayate Corchete 31b17945 2020-08-28T22:38:26 kmsdrm: use PLANE and CRTC to do hardware-driven window scaling and AR-correction.
Manuel Alfayate Corchete fe3f9796 2020-08-26T01:37:30 kmsdrm: unload EGL and GL lib only if using them.
Manuel Alfayate Corchete 9b43464d 2020-08-25T16:30:23 kmsdrm: Add programmer credits to the Atomic KMSDRM driver.
Manuel Alfayate Corchete 9316a8d9 2020-08-25T16:18:49 kmsdrm: move FENCE FD props setting to SwapWindow(), where it belongs.
Manuel Alfayate Corchete 3f38009b 2020-08-25T15:40:36 kmsdrm: comment out atomic commit fast-debugging printf.
Manuel Alfayate Corchete 0d16761c 2020-08-25T05:53:13 kmsdrm: fix segfault on quit beacuse of freed _this->egl_data.
Manuel Alfayate Corchete d43e666e 2020-08-25T04:05:36 kmsdrm: Buffer management refactoring. Fixes for compatibility with more video drivers.
Manuel Alfayate Corchete eade05ca 2020-08-24T12:51:20 kmsdrm: Finetune integer type usage. Add some comments.
Manuel Alfayate Corchete 0d593d7e 2020-08-23T23:44:07 kmsdrm: Add error control to plane prop setting function. Do most plane prop setting with a single function.
Manuel Alfayate Corchete e06e9c35 2020-08-23T11:26:55 kmsdrm: move cursor-related atomic helper functions and related struct typedefs to the SDL_kmsdrmmouse unit.
Manuel Alfayate Corchete 0b7b7721 2020-08-23T03:13:50 kmsdrm: remove redundant function, use drm_atomic_setbuffers() for disconnecting planes instead.
Manuel Alfayate Corchete 16c04f26 2020-08-23T02:58:57 kmsdrm: Init cursor surface on SetCursor() ONLY. Removal of dynamic modeset because it causes A LOT of problems with some kernel video drivers. Some refactoring and cleanups.
Manuel Alfayate Corchete 5d32eda9 2020-08-19T01:31:22 kmsdrm: implement smarter surface recreation function to be used in videomode changes. Other minor arrangements.
Manuel Alfayate Corchete f79da817 2020-08-18T01:52:15 kmsdrm: free all connector, crtc and plane memory on KMSDRM_VideoQuit().
Manuel Alfayate Corchete 92cb9192 2020-08-17T18:35:04 kmsdrm: move hardware cursor functionality to the ATOMIC interface. Disconnect the display plane from the GBM surface buffers before destroying the GBM surface.
Manuel Alfayate Corchete c437729b 2020-08-08T14:27:55 kmsdrm: separate requests in different functions so we only need one atomic commit for everything, as expected by atomic design.
Manuel Alfayate Corchete 3b9f1073 2020-08-07T11:53:04 kmsdrm: wait for possible pending atomic commits before destroying surfaces, and before restoring video on quit. Move messages to the SDL_Log* functions.
Manuel Alfayate Corchete 96c99693 2020-08-06T01:36:56 kmsdrm: wait for pending atomic commits before restoring videomode and crtc->buffer on VideoQuit, and simplify double-buffer SwapWindow() implementation.
Manuel Alfayate Corchete 09692b61 2020-08-05T18:55:22 kmsdrm: move videomode restoration on VideoQuit() to using the atomic interface instead of the legacy drmModeSetCrtc() function. Refactoring of get_plane_id().
Manuel Alfayate Corchete fc722b2d 2020-08-05T15:28:51 kmsdrm: free memory for plane, crtc and connector property tables on VideoQuit.
Manuel Alfayate Corchete 2d69ce08 2020-08-05T02:06:59 kmsdrm: double and triple buffered versions of SwapWindow() are now both reimplemented in atomic pageflipping versions, and can be selected via SDL_VIDEO_DOUBLE_BUFFER env variable.
Manuel Alfayate Corchete 8996ee17 2020-08-03T22:24:49 kmsdrm: update SwapWindow fn, moving it to triple-buffer.
Manuel Alfayate Corchete 1a5503ce 2020-07-28T21:11:25 kmsdrm: Moved to the ATOMIC KMS/DRM interface for buffer swapping, leaving DRM-legacy behind.
RALOVICH, Kristof c7eb557d 2020-07-20T10:09:07 kmsdrm: do not leak drmModeConnector Previously conn was leaked on the success path (when available was set to SDL_TRUE).
Manuel Alfayate Corchete 412b21b0 2020-07-20T11:42:23 Rename the gbm device struct from gbm to gbm_dev for better readabilty.
RALOVICH, Kristof 155fdc7a 2020-07-19T21:48:17 kmsdrm: settle with first card that has a connected connector Previously the first card with non-empty connectors, encoders and crtcs would be selected, however KMSDRM_VideoInit could still reject it if the connector was not connected. This allow finding the first card (in a multi GPU setup) that is actually connected to a display.
RALOVICH, Kristof b78b88f7 2020-07-19T21:46:41 kmsdrm: fix typo
Manuel Alfayate Corchete 75fe4b14 2020-07-19T19:53:57 Added comment about window creation behaviour in KMSDRM.
Manuel Alfayate Corchete 2f660c4f 2020-07-19T19:11:02 Delete windata variable no longer needed in KMSDR_SetDisplayMode().