platforms/drm: fix legacy mode
CCBUG: 441253
This commit is contained in:
parent
fff32f64e6
commit
092660613a
1 changed files with 12 additions and 2 deletions
|
@ -29,6 +29,8 @@
|
|||
#include "drm_buffer_gbm.h"
|
||||
#endif
|
||||
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
|
@ -548,12 +550,20 @@ bool DrmPipeline::isConnected() const
|
|||
|
||||
bool DrmPipeline::isFormatSupported(uint32_t drmFormat) const
|
||||
{
|
||||
return m_primaryPlane->formats().contains(drmFormat);
|
||||
if (m_gpu->atomicModeSetting()) {
|
||||
return m_primaryPlane->formats().contains(drmFormat);
|
||||
} else {
|
||||
return drmFormat == DRM_FORMAT_XRGB8888 || DRM_FORMAT_ARGB8888;
|
||||
}
|
||||
}
|
||||
|
||||
QVector<uint64_t> DrmPipeline::supportedModifiers(uint32_t drmFormat) const
|
||||
{
|
||||
return m_primaryPlane->formats()[drmFormat];
|
||||
if (m_gpu->atomicModeSetting()) {
|
||||
return m_primaryPlane->formats()[drmFormat];
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
static void printProps(DrmObject *object)
|
||||
|
|
Loading…
Reference in a new issue