eglfs/kms: Add drm atomic blend_op property handling
Add support for specifying the blend operation used when alpha- blending KMS planes. Only available with atomic modesetting. Set the environment variable QT_QPA_EGLFS_KMS_BLEND_OP to the enum value of the 'blend_op' property. Task-number: QTBUG-75659 Change-Id: If0ef5ba314b88adb530113b608d20fc9c027c5ec Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
8d302aea33
commit
181e5382e7
@ -854,6 +854,8 @@ void QKmsDevice::discoverPlanes()
|
||||
plane.crtcYPropertyId = prop->prop_id;
|
||||
} else if (!strcasecmp(prop->name, "zpos")) {
|
||||
plane.zposPropertyId = prop->prop_id;
|
||||
} else if (!strcasecmp(prop->name, "blend_op")) {
|
||||
plane.blendOpPropertyId = prop->prop_id;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -178,6 +178,7 @@ struct QKmsPlane
|
||||
uint32_t crtcwidthPropertyId = 0;
|
||||
uint32_t crtcheightPropertyId = 0;
|
||||
uint32_t zposPropertyId = 0;
|
||||
uint32_t blendOpPropertyId = 0;
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QKmsPlane::Rotations)
|
||||
|
@ -331,6 +331,9 @@ void QEglFSKmsGbmScreen::flip()
|
||||
static int zpos = qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_ZPOS");
|
||||
if (zpos)
|
||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->zposPropertyId, zpos);
|
||||
static uint blendOp = uint(qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_BLEND_OP"));
|
||||
if (blendOp)
|
||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->blendOpPropertyId, blendOp);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user