Commit Graph

36 Commits

Author SHA1 Message Date
Simon Ser 30aca4df0d backend/drm: introduce wlr_drm_mode_get_info()
This allows compositors to get back the raw drmModeModeInfo and
look at DRM-specific fields and flags.
2023-05-31 22:37:12 +00:00
Simon Ser 3f0487d310 backend/drm: move forward decl up for drmModeModeInfo
This allows doc generators to properly associate the doc comment
with the function instead of the typedef.
2023-05-31 00:08:49 +00:00
Simon Ser 28d89779af Reformat doc comments
Unify the way we document our APIs. See CONTRIBUTING.md for the
rules.
2022-05-25 14:22:58 +00:00
Simon Ser 86f5ecf468 backend/drm: introduce wlr_drm_lease
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3183
2021-11-19 16:06:07 +00:00
Simon Ser 2e12de96ca backend/drm: add support for panel orientation
Expose the panel orientation with wlr_drm_connector_get_panel_orientation.
Leave it to the compositor to consume this information and configure the
output accordingly.

Closes: https://github.com/swaywm/wlroots/issues/1581
2021-09-21 11:40:37 -06:00
Simon Zeni 94ed8f9496 backend/drm: introduce wlr_drm_backend_get_non_master_fd 2021-09-08 11:09:07 +02:00
Simon Zeni e5a949a955 backend/drm: implement drm lease function 2021-09-08 11:09:07 +02:00
Simon Ser f17b0f975d backend/drm: add wlr_drm_connector_get_id
This allows a compositor to get a KMS connector object ID from a
wlr_output. The compositor can then query more information about
the connector via libdrm.

This gives more freedom to compositors and allows them to read
KMS properties that wlroots doesn't know about. For instance,
they could read the EDID or the suggested_{X,Y} properties and
change their output configuration based on that.
2021-01-17 12:42:32 +01:00
Simon Ser 4b03bdc3ab Remove wlr_create_renderer_func_t
This callback allowed compositors to customize the EGL config used by
the renderer. However with renderer v6 EGL configs aren't used anymore.
Instead, buffers are allocated via GBM and GL FBOs are rendered to. So
customizing the EGL config is a no-op.
2020-12-30 17:09:40 +01:00
Simon Ser 44a4792fd8 backend/session: operate on wlr_device
Instead of operating on FDs in {open,close}_device, operate on
wlr_devices. This avoids the device lookup in wlr_session and allows
callers to have access to wlr_device fields.

For now, we use it to remove wlr_session_signal_add and replace it with
a more idiomatic wlr_session.events.change field. In the future, other
events will be added.
2020-11-19 22:47:49 +01:00
Simon Ser 0e57effd38 backend/drm: add support for custom modes
Use the CVT algorithm to create a drmModeModeInfo.
2019-10-27 10:46:47 -04:00
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
nyorain 7b52388424 Rework session handling
Sessions can now be retrieved from a backend in a more general manner.
Multi-backend gets back its `session` field that contains the session
if one was created, removing the interfacing from multi backend with the
drm backend directly. This adds the possibility to use sessions even
without the drm backend.

It additionally fixes the bug that 2 session objects got created when
WLR_BACKENDS were set to "libinput,drm".

To allow vt switching without drm backend (and drm fd) on logind, start
listening to PropertiesChanged signals from dbus and parse the session
"Active" property when no master fd was created (this does not change
current drm backend behaviour in any way).
2018-09-24 23:35:09 +02:00
Ilia Bozhinov 4486b52aa8 move wlr_drm_connector_add_mode to wlr/backend/drm.h 2018-08-13 10:55:42 +03:00
Drew DeVault 211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
Ilia Bozhinov 24cf70ae96 backends: implement custom EGL and renderer initialization
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.

Fixes #987
2018-05-25 14:56:52 +03:00
emersion b0d99f5c67
Remove wlr_ prefix from local symbols 2018-04-25 23:00:46 +01:00
Drew DeVault 8d490fdb34 Write some more docs 2018-03-19 15:46:28 -04:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
Dominique Martinet be95147385 drm backend: add wlr_output_is_drm 2017-12-19 20:13:49 +01:00
Scott Anderson 009c3747a8 Multi-GPU DRM 2017-10-01 22:29:25 +13:00
Scott Anderson fb93628bda Merge wlr_udev into wlr_session 2017-08-26 14:02:04 +12:00
Calvin Lee de66bdb867 Add backend detection functions
Resolves #80
2017-08-13 23:08:33 +02:00
Scott Anderson cb4d50e22c Changed header paths. 2017-08-06 13:25:26 +12:00
Drew DeVault 40b85d992a Refactor udev and drm initialization 2017-06-01 20:29:10 -04:00
Drew DeVault fee409bd0a Generalize DPMS, remove DRM refs from example 2017-05-31 15:38:26 -04:00
Drew DeVault 03c9b46034 Have backend manage opengl context 2017-05-31 15:15:42 -04:00
Scott Anderson 599d1bcbdc DPMS support 2017-05-13 20:37:15 +12:00
Drew DeVault 00931f2f8f Generalize output handling 2017-05-07 12:26:48 -04:00
Drew DeVault 15b1ce9e6c Refactor backend state management 2017-05-07 10:12:54 -04:00
Scott Anderson 7e9feb70a0 Fixed hotplugging + make EGL more chatty. 2017-05-04 21:58:11 +12:00
Scott Anderson ef9768858e Changed modesetting interface. 2017-05-03 22:41:49 +12:00
Scott Anderson d196a79b6c Changed backend to accept wl_display. 2017-05-03 21:28:44 +12:00
Scott Anderson 18387468bb Renamed 'wlr_drm_display' to 'wlr_drm_output' 2017-05-03 17:49:03 +12:00
Scott Anderson 81998fdc98 Removed old session code from DRM backend. 2017-05-03 16:23:07 +12:00
Scott Anderson e446a5300b Added example. 2017-05-02 18:13:17 +12:00