mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-12-22 21:49:48 +01:00
DRM: Allow checking no-crtc connectors (#49)
This commit is contained in:
parent
9312aa2827
commit
589346162f
2 changed files with 7 additions and 11 deletions
|
@ -152,7 +152,7 @@ namespace Aquamarine {
|
||||||
struct SDRMCRTC {
|
struct SDRMCRTC {
|
||||||
uint32_t id = 0;
|
uint32_t id = 0;
|
||||||
std::vector<SDRMLayer> layers;
|
std::vector<SDRMLayer> layers;
|
||||||
int32_t refresh = 0;
|
int32_t refresh = 0; // unused
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int gammaSize = 0;
|
int gammaSize = 0;
|
||||||
|
|
|
@ -713,10 +713,10 @@ void Aquamarine::CDRMBackend::scanConnectors() {
|
||||||
|
|
||||||
conn->status = drmConn->connection;
|
conn->status = drmConn->connection;
|
||||||
|
|
||||||
if (!conn->crtc) {
|
// if (!conn->crtc) {
|
||||||
backend->log(AQ_LOG_DEBUG, std::format("drm: Ignoring connector {} because it has no CRTC", connectorID));
|
// backend->log(AQ_LOG_DEBUG, std::format("drm: Ignoring connector {} because it has no CRTC", connectorID));
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
backend->log(AQ_LOG_DEBUG, std::format("drm: Connector {} connection state: {}", connectorID, (int)drmConn->connection));
|
backend->log(AQ_LOG_DEBUG, std::format("drm: Connector {} connection state: {}", connectorID, (int)drmConn->connection));
|
||||||
|
|
||||||
|
@ -1163,7 +1163,7 @@ void Aquamarine::SDRMConnector::connect(drmModeConnector* connector) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
backend->backend->log(AQ_LOG_DEBUG, std::format("drm: Connecting connector {}, CRTC ID {}", szName, crtc ? crtc->id : -1));
|
backend->backend->log(AQ_LOG_DEBUG, std::format("drm: Connecting connector {}, {}", szName, crtc ? std::format("CRTC ID {}", crtc->id) : "no CRTC"));
|
||||||
|
|
||||||
output = SP<CDRMOutput>(new CDRMOutput(szName, backend, self.lock()));
|
output = SP<CDRMOutput>(new CDRMOutput(szName, backend, self.lock()));
|
||||||
output->self = output;
|
output->self = output;
|
||||||
|
@ -1197,8 +1197,6 @@ void Aquamarine::SDRMConnector::connect(drmModeConnector* connector) {
|
||||||
|
|
||||||
//uint64_t modeID = 0;
|
//uint64_t modeID = 0;
|
||||||
// getDRMProp(backend->gpu->fd, crtc->id, crtc->props.mode_id, &modeID);
|
// getDRMProp(backend->gpu->fd, crtc->id, crtc->props.mode_id, &modeID);
|
||||||
|
|
||||||
crtc->refresh = calculateRefresh(drmMode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
backend->backend->log(AQ_LOG_DEBUG,
|
backend->backend->log(AQ_LOG_DEBUG,
|
||||||
|
@ -1206,10 +1204,8 @@ void Aquamarine::SDRMConnector::connect(drmModeConnector* connector) {
|
||||||
aqMode->preferred ? " (preferred)" : ""));
|
aqMode->preferred ? " (preferred)" : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!currentModeInfo && fallbackMode) {
|
if (!currentModeInfo && fallbackMode)
|
||||||
output->state->setMode(fallbackMode);
|
output->state->setMode(fallbackMode);
|
||||||
crtc->refresh = calculateRefresh(fallbackMode->modeInfo.value());
|
|
||||||
}
|
|
||||||
|
|
||||||
output->physicalSize = {(double)connector->mmWidth, (double)connector->mmHeight};
|
output->physicalSize = {(double)connector->mmWidth, (double)connector->mmHeight};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue