backends/drm: Make sure we respect the alpha property range
This is in part a workaround for an issue in Qualcomm drivers where the range for alpha is 0-UINT8_MAX (255). We were setting a value too big and this would make the whole pipeline fail. Instead set the top of the property range which is what we were doing after all, resulting in more explicit code to what we were trying to achieve. Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
parent
b3f7924539
commit
0db46e3966
1 changed files with 2 additions and 2 deletions
|
@ -346,7 +346,7 @@ bool DrmPipeline::prepareAtomicModeset(DrmAtomicCommit *commit)
|
||||||
commit->addEnum(primary->rotation, {DrmPlane::Transformation::Rotate0});
|
commit->addEnum(primary->rotation, {DrmPlane::Transformation::Rotate0});
|
||||||
}
|
}
|
||||||
if (primary->alpha.isValid()) {
|
if (primary->alpha.isValid()) {
|
||||||
commit->addProperty(primary->alpha, 0xFFFF);
|
commit->addProperty(primary->alpha, primary->alpha.maxValue());
|
||||||
}
|
}
|
||||||
if (primary->pixelBlendMode.isValid()) {
|
if (primary->pixelBlendMode.isValid()) {
|
||||||
commit->addEnum(primary->pixelBlendMode, DrmPlane::PixelBlendMode::PreMultiplied);
|
commit->addEnum(primary->pixelBlendMode, DrmPlane::PixelBlendMode::PreMultiplied);
|
||||||
|
@ -356,7 +356,7 @@ bool DrmPipeline::prepareAtomicModeset(DrmAtomicCommit *commit)
|
||||||
commit->addEnum(cursor->rotation, DrmPlane::Transformations(DrmPlane::Transformation::Rotate0));
|
commit->addEnum(cursor->rotation, DrmPlane::Transformations(DrmPlane::Transformation::Rotate0));
|
||||||
}
|
}
|
||||||
if (cursor->alpha.isValid()) {
|
if (cursor->alpha.isValid()) {
|
||||||
commit->addProperty(cursor->alpha, 0xFFFF);
|
commit->addProperty(cursor->alpha, cursor->alpha.maxValue());
|
||||||
}
|
}
|
||||||
if (cursor->pixelBlendMode.isValid()) {
|
if (cursor->pixelBlendMode.isValid()) {
|
||||||
commit->addEnum(cursor->pixelBlendMode, DrmPlane::PixelBlendMode::PreMultiplied);
|
commit->addEnum(cursor->pixelBlendMode, DrmPlane::PixelBlendMode::PreMultiplied);
|
||||||
|
|
Loading…
Reference in a new issue