Skip to content

Commit

Permalink
allow no-crtc outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Aug 15, 2024
1 parent 9312aa2 commit 28b5ccd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion include/aquamarine/backend/DRM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ namespace Aquamarine {
struct SDRMCRTC {
uint32_t id = 0;
std::vector<SDRMLayer> layers;
int32_t refresh = 0;

struct {
int gammaSize = 0;
Expand Down
14 changes: 8 additions & 6 deletions src/backend/drm/DRM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,10 @@ void Aquamarine::CDRMBackend::scanConnectors() {

conn->status = drmConn->connection;

if (!conn->crtc) {
backend->log(AQ_LOG_DEBUG, std::format("drm: Ignoring connector {} because it has no CRTC", connectorID));
continue;
}
// if (!conn->crtc) {
// backend->log(AQ_LOG_DEBUG, std::format("drm: Ignoring connector {} because it has no CRTC", connectorID));
// continue;
// }

backend->log(AQ_LOG_DEBUG, std::format("drm: Connector {} connection state: {}", connectorID, (int)drmConn->connection));

Expand Down Expand Up @@ -1198,7 +1198,8 @@ void Aquamarine::SDRMConnector::connect(drmModeConnector* connector) {
//uint64_t modeID = 0;
// getDRMProp(backend->gpu->fd, crtc->id, crtc->props.mode_id, &modeID);

crtc->refresh = calculateRefresh(drmMode);
//if (crtc)
// crtc->refresh = calculateRefresh(drmMode);
}

backend->backend->log(AQ_LOG_DEBUG,
Expand All @@ -1208,7 +1209,8 @@ void Aquamarine::SDRMConnector::connect(drmModeConnector* connector) {

if (!currentModeInfo && fallbackMode) {
output->state->setMode(fallbackMode);
crtc->refresh = calculateRefresh(fallbackMode->modeInfo.value());
//if (crtc)
// crtc->refresh = calculateRefresh(fallbackMode->modeInfo.value());
}

output->physicalSize = {(double)connector->mmWidth, (double)connector->mmHeight};
Expand Down

0 comments on commit 28b5ccd

Please sign in to comment.