eglfs/kms: also set windowing properties on planes

The 0 values should be default for X,Y both on plane and crtc.
But atomic implementation can have flaws on some devices so
we don't assume they are defaulted right and set them to 0.

Change-Id: I2f7dc98fdba523eb46eb86b97568d18b6cfd1277
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Lionel CHAZALLON 2018-04-07 10:36:05 +02:00
parent be11f14f5a
commit ead3ca4aef
3 changed files with 16 additions and 0 deletions

View File

@ -816,6 +816,14 @@ void QKmsDevice::discoverPlanes()
plane.crtcwidthPropertyId = prop->prop_id;
} else if (!strcasecmp(prop->name, "crtc_h")) {
plane.crtcheightPropertyId = prop->prop_id;
} else if (!strcasecmp(prop->name, "src_x")) {
plane.srcXPropertyId = prop->prop_id;
} else if (!strcasecmp(prop->name, "src_y")) {
plane.srcYPropertyId = prop->prop_id;
} else if (!strcasecmp(prop->name, "crtc_x")) {
plane.crtcXPropertyId = prop->prop_id;
} else if (!strcasecmp(prop->name, "crtc_y")) {
plane.crtcYPropertyId = prop->prop_id;
}
});

View File

@ -169,6 +169,10 @@ struct QKmsPlane
uint32_t rotationPropertyId = 0;
uint32_t crtcPropertyId = 0;
uint32_t framebufferPropertyId = 0;
uint32_t srcXPropertyId = 0;
uint32_t srcYPropertyId = 0;
uint32_t crtcXPropertyId = 0;
uint32_t crtcYPropertyId = 0;
uint32_t srcwidthPropertyId = 0;
uint32_t srcheightPropertyId = 0;
uint32_t crtcwidthPropertyId = 0;

View File

@ -301,8 +301,12 @@ void QEglFSKmsGbmScreen::flip()
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcPropertyId, op.crtc_id);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcwidthPropertyId,
output().size.width() << 16);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcXPropertyId, 0);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcYPropertyId, 0);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcheightPropertyId,
output().size.height() << 16);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcXPropertyId, 0);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcYPropertyId, 0);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcwidthPropertyId,
m_output.modes[m_output.mode].hdisplay);
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcheightPropertyId,