diff options
author | emersion <contact@emersion.fr> | 2018-10-29 22:22:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 22:22:40 +0100 |
commit | 11dc1f65d216acf31e81addb9817091e8d9ba9a6 (patch) | |
tree | fd58c272421385639dfffe4c719fc366516b2e81 /backend/drm/atomic.c | |
parent | 659d39baaaa51e27c3e078390e3f1b588f390aa3 (diff) | |
parent | 443a38bd3f62864677779e983d7f565d41054d25 (diff) |
Merge pull request #1344 from emersion/no-atomic-gamma
backend/drm: add WLR_DRM_NO_ATOMIC_GAMMA env variable
Diffstat (limited to 'backend/drm/atomic.c')
-rw-r--r-- | backend/drm/atomic.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index ad80f2fd..fc649d68 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -208,10 +208,12 @@ static bool atomic_crtc_set_gamma(struct wlr_drm_backend *drm, struct wlr_drm_crtc *crtc, size_t size, uint16_t *r, uint16_t *g, uint16_t *b) { // Fallback to legacy gamma interface when gamma properties are not available - // (can happen on older intel gpu's that support gamma but not degamma) - // TEMP: This is broken on AMDGPU. Always fallback to legacy until they get - // it fixed. Ref https://bugs.freedesktop.org/show_bug.cgi?id=107459 - if (crtc->props.gamma_lut == 0 || true) { + // (can happen on older Intel GPUs that support gamma but not degamma). + // TEMP: This is broken on AMDGPU. Provide a fallback to legacy until they + // get it fixed. Ref https://bugs.freedesktop.org/show_bug.cgi?id=107459 + const char *no_atomic_str = getenv("WLR_DRM_NO_ATOMIC_GAMMA"); + bool no_atomic = no_atomic_str != NULL && strcmp(no_atomic_str, "1") == 0; + if (crtc->props.gamma_lut == 0 || no_atomic) { return legacy_iface.crtc_set_gamma(drm, crtc, size, r, g, b); } |