kms: Rename the plane index workaround vars appropriately
...and purge support from eglfs_kms. That path never worked, the environment variable was meant for the NVIDIA backend only. Task-number: QTBUG-63058 Change-Id: I8cf47168d5878e18eb22c839d56e2d48cbb4fdad Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
parent
9378bce442
commit
d6c828c65a
@ -376,9 +376,9 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
|
||||
output.subpixel = connector->subpixel;
|
||||
output.dpms_prop = connectorProperty(connector, QByteArrayLiteral("DPMS"));
|
||||
output.edid_blob = connectorPropertyBlob(connector, QByteArrayLiteral("EDID"));
|
||||
output.wants_plane = false;
|
||||
output.plane_id = 0;
|
||||
output.plane_set = false;
|
||||
output.wants_forced_plane = false;
|
||||
output.forced_plane_id = 0;
|
||||
output.forced_plane_set = false;
|
||||
output.drm_format = drmFormat;
|
||||
output.clone_source = cloneSource;
|
||||
|
||||
@ -390,8 +390,8 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
|
||||
if (idx >= 0 && idx < int(planeResources->count_planes)) {
|
||||
drmModePlane *plane = drmModeGetPlane(m_dri_fd, planeResources->planes[idx]);
|
||||
if (plane) {
|
||||
output.wants_plane = true;
|
||||
output.plane_id = plane->plane_id;
|
||||
output.wants_forced_plane = true;
|
||||
output.forced_plane_id = plane->plane_id;
|
||||
qCDebug(qLcKmsDebug, "Forcing plane index %d, plane id %u (belongs to crtc id %u)",
|
||||
idx, plane->plane_id, plane->crtc_id);
|
||||
drmModeFreePlane(plane);
|
||||
|
@ -113,9 +113,9 @@ struct QKmsOutput
|
||||
int subpixel = DRM_MODE_SUBPIXEL_UNKNOWN;
|
||||
drmModePropertyPtr dpms_prop = nullptr;
|
||||
drmModePropertyBlobPtr edid_blob = nullptr;
|
||||
bool wants_plane = false;
|
||||
uint32_t plane_id = 0;
|
||||
bool plane_set = false;
|
||||
bool wants_forced_plane = false;
|
||||
uint32_t forced_plane_id = 0;
|
||||
bool forced_plane_set = false;
|
||||
uint32_t drm_format = DRM_FORMAT_XRGB8888;
|
||||
QString clone_source;
|
||||
|
||||
|
@ -191,8 +191,6 @@ void QEglFSKmsGbmScreen::ensureModeSet(uint32_t fb)
|
||||
{
|
||||
QKmsOutput &op(output());
|
||||
const int fd = device()->fd();
|
||||
const uint32_t w = op.modes[op.mode].hdisplay;
|
||||
const uint32_t h = op.modes[op.mode].vdisplay;
|
||||
|
||||
if (!op.mode_set) {
|
||||
op.mode_set = true;
|
||||
@ -225,19 +223,6 @@ void QEglFSKmsGbmScreen::ensureModeSet(uint32_t fb)
|
||||
qErrnoWarning(errno, "Could not set DRM mode for screen %s", qPrintable(name()));
|
||||
}
|
||||
}
|
||||
|
||||
if (!op.plane_set) {
|
||||
op.plane_set = true;
|
||||
if (op.wants_plane) {
|
||||
qCDebug(qLcEglfsKmsDebug, "Setting plane %u", op.plane_id);
|
||||
int ret = drmModeSetPlane(fd, op.plane_id, op.crtc_id,
|
||||
uint32_t(-1), 0,
|
||||
0, 0, w, h,
|
||||
0 << 16, 0 << 16, w << 16, h << 16);
|
||||
if (ret)
|
||||
qErrnoWarning(errno, "drmModeSetPlane failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QEglFSKmsGbmScreen::waitForFlip()
|
||||
|
@ -180,7 +180,7 @@ void QEglFSKmsEglDeviceWindow::resetSurface()
|
||||
QEglFSKmsEglDeviceScreen *cur_screen = static_cast<QEglFSKmsEglDeviceScreen *>(screen());
|
||||
Q_ASSERT(cur_screen);
|
||||
QKmsOutput &output(cur_screen->output());
|
||||
const uint32_t wantedId = !output.wants_plane ? output.crtc_id : output.plane_id;
|
||||
const uint32_t wantedId = !output.wants_forced_plane ? output.crtc_id : output.forced_plane_id;
|
||||
qCDebug(qLcEglfsKmsDebug, "Searching for id: %d", wantedId);
|
||||
|
||||
EGLOutputLayerEXT layer = EGL_NO_OUTPUT_LAYER_EXT;
|
||||
|
@ -105,12 +105,12 @@ void QEglFSKmsEglDeviceScreen::waitForFlip()
|
||||
qErrnoWarning(errno, "drmModeSetCrtc failed");
|
||||
}
|
||||
|
||||
if (!op.plane_set) {
|
||||
op.plane_set = true;
|
||||
if (!op.forced_plane_set) {
|
||||
op.forced_plane_set = true;
|
||||
|
||||
if (op.wants_plane) {
|
||||
qCDebug(qLcEglfsKmsDebug, "Setting plane %u", op.plane_id);
|
||||
int ret = drmModeSetPlane(fd, op.plane_id, op.crtc_id, uint32_t(-1), 0,
|
||||
if (op.wants_forced_plane) {
|
||||
qCDebug(qLcEglfsKmsDebug, "Setting plane %u", op.forced_plane_id);
|
||||
int ret = drmModeSetPlane(fd, op.forced_plane_id, op.crtc_id, uint32_t(-1), 0,
|
||||
0, 0, w, h,
|
||||
0 << 16, 0 << 16, w << 16, h << 16);
|
||||
if (ret == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user