backends/drm: set hdr metadata to 0
Otherwise we might have broken colors from leftover state of other compositors
This commit is contained in:
parent
af24f5b011
commit
6bb4ebdf04
3 changed files with 6 additions and 1 deletions
|
@ -113,7 +113,8 @@ DrmConnector::DrmConnector(DrmGpu *gpu, uint32_t connectorId)
|
|||
{QByteArrayLiteral("Good"), QByteArrayLiteral("Bad")}),
|
||||
PropertyDefinition(QByteArrayLiteral("content type"), Requirement::Optional,
|
||||
{QByteArrayLiteral("No Data"), QByteArrayLiteral("Graphics"), QByteArrayLiteral("Photo"), QByteArrayLiteral("Cinema"), QByteArrayLiteral("Game")}),
|
||||
PropertyDefinition(QByteArrayLiteral("panel orientation"), Requirement::Optional, {QByteArrayLiteral("Normal"), QByteArrayLiteral("Upside Down"), QByteArrayLiteral("Left Side Up"), QByteArrayLiteral("Right Side Up")})},
|
||||
PropertyDefinition(QByteArrayLiteral("panel orientation"), Requirement::Optional, {QByteArrayLiteral("Normal"), QByteArrayLiteral("Upside Down"), QByteArrayLiteral("Left Side Up"), QByteArrayLiteral("Right Side Up")}),
|
||||
PropertyDefinition(QByteArrayLiteral("HDR_OUTPUT_METADATA"), Requirement::Optional)},
|
||||
DRM_MODE_OBJECT_CONNECTOR)
|
||||
, m_pipeline(std::make_unique<DrmPipeline>(this))
|
||||
, m_conn(drmModeGetConnector(gpu->fd(), connectorId))
|
||||
|
|
|
@ -66,6 +66,7 @@ public:
|
|||
LinkStatus = 11,
|
||||
ContentType = 12,
|
||||
PanelOrientation = 13,
|
||||
HdrMetadata = 14,
|
||||
Count
|
||||
};
|
||||
|
||||
|
|
|
@ -261,6 +261,9 @@ void DrmPipeline::prepareAtomicModeset()
|
|||
}
|
||||
bpc->setPending(std::min(bpc->maxValue(), preferred));
|
||||
}
|
||||
if (const auto hdr = m_connector->getProp(DrmConnector::PropertyIndex::HdrMetadata)) {
|
||||
hdr->setPending(0);
|
||||
}
|
||||
|
||||
m_pending.crtc->setPending(DrmCrtc::PropertyIndex::Active, 1);
|
||||
m_pending.crtc->setPending(DrmCrtc::PropertyIndex::ModeId, m_pending.mode->blobId());
|
||||
|
|
Loading…
Reference in a new issue