drm: Make hardware rotation opt-in
The current implementation sometimes will leave the screens unusable, therefore KWIN_DRM_SW_ROTATIONS_ONLY=1 is default. Use KWIN_DRM_SW_ROTATIONS_ONLY=0 to test hardware DRM operations.
This commit is contained in:
parent
d11b4c8084
commit
2ef53e7350
1 changed files with 4 additions and 2 deletions
|
@ -307,8 +307,10 @@ void DrmOutput::updateTransform(Transform transform)
|
|||
{
|
||||
setTransformInternal(transform);
|
||||
const auto planeTransform = outputToPlaneTransform(transform);
|
||||
if (!qEnvironmentVariableIsSet("KWIN_DRM_SW_ROTATIONS_ONLY")
|
||||
&& !m_pipeline->setTransformation(planeTransform)) {
|
||||
static bool valid;
|
||||
// If not set or wrong value, assume KWIN_DRM_SW_ROTATIONS_ONLY=1 until DRM transformations are reliable
|
||||
static int envOnlySoftwareRotations = qEnvironmentVariableIntValue("KWIN_DRM_SW_ROTATIONS_ONLY", &valid) != 0;
|
||||
if (valid && !envOnlySoftwareRotations && !m_pipeline->setTransformation(planeTransform)) {
|
||||
qCDebug(KWIN_DRM) << "setting transformation to" << planeTransform << "failed!";
|
||||
// just in case, if we had any rotation before, clear it
|
||||
m_pipeline->setTransformation(DrmPlane::Transformation::Rotate0);
|
||||
|
|
Loading…
Reference in a new issue