aboutsummaryrefslogtreecommitdiff
path: root/include/backend/drm/drm.h
AgeCommit message (Collapse)Author
2019-01-29backend/drm: fix GBM format mismatchemersion
We create the EGL config with GBM_FORMAT_ARGB8888, but then initialize GBM BOs with GBM_FORMAT_XRGB8888. This mismatch confuses Mesa. Instead, we can always use GBM_FORMAT_ARGB8888, and use DRM_FORMAT_XRGB8888 when calling drmModeAddFB2. Fixes https://github.com/swaywm/wlroots/issues/1438
2018-10-04backend: add get_present_clockemersion
2018-10-03backend/drm: reset gamma table on VT switchemersion
2018-09-28backend/drm: don't free connector immediatelyemersion
When a pageflip is pending, we'll get a DRM event for the connector in the future. We don't want to free the connector immediately otherwise we'll use-after-free in the pageflip handler. This commit adds a new state, "DISAPPEARED". This asks the pageflip handler to destroy the output after it's done pageflipping.
2018-09-18backend/drm: add assertionsemersion
2018-09-15backend/drm: steal CRTCs from disabled outputsemersion
This commit allows outputs that need a CRTC to steal it from user-disabled outputs. Note that in the case there are enough CRTCs, disabled outputs don't loose it (so there's no modeset and plane initialization needed after DPMS). CRTC allocation still prefers to keep the old configuration, even if that means allocating an extra CRTC to a disabled output. CRTC reallocation now happen when enabling/disabling an output as well as when trying to modeset. When enabling an output without a CRTC, we realloc to try to steal a CRTC from a disabled output (that doesn't really need the CRTC). When disabling an output, we try to give our CRTC to an output that needs one. Modesetting is similar to enabling. A new DRM connector field has been added: `desired_enabled`. Outputs without CRTCs get automatically disabled. This field keeps track of the state desired by the user, allowing to automatically re-enable outputs when a CRTC becomes free. This required some changes to the allocation algorithm. Previously, the algorithm tried to keep the previous configuration even if a new configuration with a better score was possible (it only changed configuration when the old one didn't work anymore). This is now changed and the old configuration (still preferred) is only retained without considering new possibilities when it's perfect (all outputs have CRTCs). User-disabled outputs now have `possible_crtcs` set to 0, meaning they can only retain a previous CRTC (not acquire a new one). The allocation algorithm has been updated to do not bump the score when assigning a CRTC to a disabled output.
2018-09-14output: make wlr_output_enable return a boolemersion
2018-09-04backend/drm: better hotplug handlingemersion
This commit handles better situations in which the number of connected outputs is greater than the number of available CRTCs. It'll enable as many outputs as possible, and transfer CRTCs to outputs that need one on unplug. This changes CRTC and plane reallocation to happen after scanning DRM connectors instead of on modeset. This cleanups CRTCs and planes on unplug to allow them to be re-used for other outputs. On modeset, if an output doesn't have a CRTC, the desired mode is saved and used later when the output gains a CRTC. Future work includes giving priority to enabled outputs over disabled ones for CRTC allocation. This requires the compositor to know about all outputs (even outputs without CRTCs) to properly modeset outputs enabled in the compositor config file and disable outputs disabled in the config file.
2018-08-13move wlr_drm_connector_add_mode to wlr/backend/drm.hIlia Bozhinov
2018-07-07drm: Allow to add additional modesGuido Günther
This allows to add additional modes to the list of available video modes using VESA Coordinated Video Timing information. Closes #1080
2018-04-25Make sure we don't use others' prefixesemersion
2018-04-25Remove wlr_ prefix from local symbolsemersion
2018-03-24Redesign wlr_textureemersion
- Textures are now immutable (apart from those created from raw pixels), no more invalid textures - Move all wl_drm stuff in wlr_renderer - Most of wlr_texture fields are now private - Remove some duplicated DMA-BUF code in the DRM backend - Add more assertions - Stride is now always given as bytes rather than pixels - Drop wl_shm functions Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-15matrix: use 2D matricesemersion
2018-02-26restore dpms state on drm resumeMarkus Ongyerth
If there is no current mode, set outputs to dpms off in drm resume. Sets current mode to null on disable to ensure this can be checked.
2018-02-12Reformat all #include directivesemersion
2018-02-09Add atomic gamma lut size fetchingVincent Vanlaer
Legacy gamma lut size now uses the new legacy_crtc member of wlr_drm_crtc. This was Previously doen using old_crtc in wlr_drm_connector, but since this refers to the crtc that was connected to the ouput, this could give the wrong result.
2018-02-09Add atomic gamma settingVincent Vanlaer
2018-02-02backend/drm: support updating cursor when session is pausedemersion
2017-12-19remove session from multibackendTony Crisci
2017-12-19drm backend: add wlr_output_is_drmDominique Martinet
2017-12-07Listen to display destroy in backendsemersion
2017-11-19Refactor wlr_list inside wlrootsemersion
2017-10-31Fix cursor hotspot with rotated outputs on DRM backendemersion
2017-10-26Do not set hw cursor if disabled when switching VTemersion
2017-10-21Merge branch 'master' into heghe/wl_listDrew DeVault
2017-10-22Remove drm field from wlr_drm_connectorScott Anderson
2017-10-22Remove unnecesary wlr_renderersScott Anderson
2017-10-22Move egl.h to render/egl.hScott Anderson
2017-10-20Replace list_t with wl_list in wlr_drm_backendHeghedus Razvan
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-01Multi-GPU DRMScott Anderson
2017-09-30Rename wlr_drm_output to wlr_drm_connectorScott Anderson
2017-09-30Add pointer to backend from DRM outputsScott Anderson
2017-09-30Split DRM rendering to its own fileScott Anderson
2017-09-30Split DRM internal interface to its own headerScott Anderson
2017-09-30Rename files to remove pointless drm prefixScott Anderson
2017-06-10Combine internal DRM headers into oneDrew DeVault
Everything always just included both anyway
2017-06-09Fixed rendering bug: Delay calling gbm_surface_release_buffer until itScott Anderson
has been scanned out.
2017-06-08Filled out more wlr_output fields.Scott Anderson
2017-06-01Merge branch 'master' into sessionascent12
2017-05-31Generalize DPMS, remove DRM refs from exampleDrew DeVault
2017-05-14Refactored renderer startup to function.Scott Anderson
2017-05-14Working commitScott Anderson
2017-05-13DPMS supportScott Anderson
2017-05-07Generalize output handlingDrew DeVault
2017-05-07Refactor backend state managementDrew DeVault
2017-05-03Removed unused fields.Scott Anderson
2017-05-03Changed modesetting interface.Scott Anderson
2017-05-03Changed backend to accept wl_display.Scott Anderson
2017-05-03Renamed 'wlr_drm_display' to 'wlr_drm_output'Scott Anderson