mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
drm: legacy: issue a NULL modeset on disable
The DRM subsystem needs a NULL modeset for connectors which disappear from the system to disable the hardware pipes, otherwise the pixels get rendered but are sent nowhere. The atomic backend does the equivalent by removing the properties and issuing a commit. Fixes #1706
This commit is contained in:
parent
6dfe238ff1
commit
96e9c0f9c8
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,12 @@ static bool legacy_conn_enable(struct wlr_drm_backend *drm,
|
|||
struct wlr_drm_connector *conn, bool enable) {
|
||||
int ret = drmModeConnectorSetProperty(drm->fd, conn->id, conn->props.dpms,
|
||||
enable ? DRM_MODE_DPMS_ON : DRM_MODE_DPMS_OFF);
|
||||
|
||||
if (!enable) {
|
||||
drmModeSetCrtc(drm->fd, conn->crtc->id, 0, 0, 0, NULL, 0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
return ret >= 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue