mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Add atomic gamma lut size fetching
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.
This commit is contained in:
parent
cc1229e75e
commit
ab011406ad
7 changed files with 37 additions and 8 deletions
|
|
@ -65,6 +65,10 @@ bool legacy_crtc_set_gamma(struct wlr_drm_backend *drm,
|
|||
return !drmModeCrtcSetGamma(drm->fd, crtc->id, size, r, g, b);
|
||||
}
|
||||
|
||||
uint32_t legacy_crtc_get_gamma_size(struct wlr_drm_backend *drm,
|
||||
struct wlr_drm_crtc *crtc) {
|
||||
return crtc->legacy_crtc->gamma_size;
|
||||
}
|
||||
|
||||
const struct wlr_drm_interface legacy_iface = {
|
||||
.conn_enable = legacy_conn_enable,
|
||||
|
|
@ -72,4 +76,5 @@ const struct wlr_drm_interface legacy_iface = {
|
|||
.crtc_set_cursor = legacy_crtc_set_cursor,
|
||||
.crtc_move_cursor = legacy_crtc_move_cursor,
|
||||
.crtc_set_gamma = legacy_crtc_set_gamma,
|
||||
.crtc_get_gamma_size = legacy_crtc_get_gamma_size,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue