eglfs/kms: Add drm atomic zpos property handling
This adds the ability to specify a ZPOS property for the eglfs plane ZPOS will allow to control the relative position between eglfs layer and the other layers. It is bound to using QT_QPA_EGLFS_KMS_ZPOS environment variable to determine its value. Change-Id: I51986ccb22a9dbaeef20165ac5feb7dbe8047373 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
eac736e0fb
commit
93cf1cf2e5
|
|
@ -824,6 +824,8 @@ void QKmsDevice::discoverPlanes()
|
|||
plane.crtcXPropertyId = prop->prop_id;
|
||||
} else if (!strcasecmp(prop->name, "crtc_y")) {
|
||||
plane.crtcYPropertyId = prop->prop_id;
|
||||
} else if (!strcasecmp(prop->name, "zpos")) {
|
||||
plane.zposPropertyId = prop->prop_id;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ struct QKmsPlane
|
|||
uint32_t srcheightPropertyId = 0;
|
||||
uint32_t crtcwidthPropertyId = 0;
|
||||
uint32_t crtcheightPropertyId = 0;
|
||||
uint32_t zposPropertyId = 0;
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QKmsPlane::Rotations)
|
||||
|
|
|
|||
|
|
@ -311,6 +311,10 @@ void QEglFSKmsGbmScreen::flip()
|
|||
m_output.modes[m_output.mode].hdisplay);
|
||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcheightPropertyId,
|
||||
m_output.modes[m_output.mode].vdisplay);
|
||||
|
||||
static int zpos = qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_ZPOS");
|
||||
if (zpos)
|
||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->zposPropertyId, zpos);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue