mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-12-22 11:39:49 +01:00
drm: add AQ_NO_MODIFIERS to try to mitigate hardware limitations (#77)
This commit is contained in:
parent
aac97a1fd1
commit
a8eb8ae014
2 changed files with 9 additions and 3 deletions
|
@ -7,6 +7,7 @@ Unless specified otherwise, a variable is enabled if and only if it's set to `1`
|
||||||
`AQ_DRM_DEVICES` -> Set an explicit list of DRM devices (GPUs) to use. It's a colon-separated list of paths, with the first being the primary. E.g. `/dev/dri/card1:/dev/dri/card0`
|
`AQ_DRM_DEVICES` -> Set an explicit list of DRM devices (GPUs) to use. It's a colon-separated list of paths, with the first being the primary. E.g. `/dev/dri/card1:/dev/dri/card0`
|
||||||
`AQ_NO_ATOMIC` -> Disables drm atomic modesetting
|
`AQ_NO_ATOMIC` -> Disables drm atomic modesetting
|
||||||
`AQ_MGPU_NO_EXPLICIT` -> Disables explicit syncing on mgpu buffers
|
`AQ_MGPU_NO_EXPLICIT` -> Disables explicit syncing on mgpu buffers
|
||||||
|
`AQ_NO_MODIFIERS` -> Disables modifiers for DRM buffers
|
||||||
|
|
||||||
### Debugging
|
### Debugging
|
||||||
|
|
||||||
|
|
|
@ -382,9 +382,14 @@ bool Aquamarine::CDRMBackend::checkFeatures() {
|
||||||
}
|
}
|
||||||
|
|
||||||
drmProps.supportsAsyncCommit = drmGetCap(gpu->fd, DRM_CAP_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
drmProps.supportsAsyncCommit = drmGetCap(gpu->fd, DRM_CAP_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
||||||
drmProps.supportsAddFb2Modifiers = drmGetCap(gpu->fd, DRM_CAP_ADDFB2_MODIFIERS, &cap) == 0 && cap == 1;
|
|
||||||
drmProps.supportsTimelines = drmGetCap(gpu->fd, DRM_CAP_SYNCOBJ_TIMELINE, &cap) == 0 && cap == 1;
|
drmProps.supportsTimelines = drmGetCap(gpu->fd, DRM_CAP_SYNCOBJ_TIMELINE, &cap) == 0 && cap == 1;
|
||||||
|
|
||||||
|
if (envEnabled("AQ_NO_MODIFIERS")) {
|
||||||
|
backend->log(AQ_LOG_WARNING, "drm: AQ_NO_MODIFIERS enabled, disabling modifiers for DRM buffers.");
|
||||||
|
drmProps.supportsAddFb2Modifiers = false;
|
||||||
|
} else
|
||||||
|
drmProps.supportsAddFb2Modifiers = drmGetCap(gpu->fd, DRM_CAP_ADDFB2_MODIFIERS, &cap) == 0 && cap == 1;
|
||||||
|
|
||||||
if (envEnabled("AQ_NO_ATOMIC")) {
|
if (envEnabled("AQ_NO_ATOMIC")) {
|
||||||
backend->log(AQ_LOG_WARNING, "drm: AQ_NO_ATOMIC enabled, using the legacy drm iface");
|
backend->log(AQ_LOG_WARNING, "drm: AQ_NO_ATOMIC enabled, using the legacy drm iface");
|
||||||
impl = makeShared<CDRMLegacyImpl>(self.lock());
|
impl = makeShared<CDRMLegacyImpl>(self.lock());
|
||||||
|
|
Loading…
Reference in a new issue