backends/drm: Complain when we are issuing an invalid drm property
The alternative is silent failures and KWin rendering nothing. The kernel will only be telling us that something went wrong which makes it hard to debug. Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
parent
cd2d5b07d5
commit
70231f2431
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,10 @@ DrmAtomicCommit::DrmAtomicCommit(const QList<DrmPipeline *> &pipelines)
|
|||
|
||||
void DrmAtomicCommit::addProperty(const DrmProperty &prop, uint64_t value)
|
||||
{
|
||||
if (Q_UNLIKELY(!prop.isValid())) {
|
||||
qCWarning(KWIN_DRM) << "Trying to add an invalid property" << prop.name();
|
||||
return;
|
||||
}
|
||||
prop.checkValueInRange(value);
|
||||
m_properties[prop.drmObject()->id()][prop.propId()] = value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue