Commit b495faf9 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

backends/drm: Fix mode comparison

Some modes can have the exact frame timings but different flags.
Currently, the mode comparison function doesn't take that into account
which can result in the drm backend setting the current mode flag
incorrectly.
parent 52c1155b
Pipeline #161389 passed with stage
in 16 minutes and 13 seconds
......@@ -20,24 +20,14 @@
#include <KConfigGroup>
#include <cerrno>
#include <cstring>
namespace KWin
{
static bool checkIfEqual(const drmModeModeInfo *one, const drmModeModeInfo *two)
{
return one->clock == two->clock
&& one->hdisplay == two->hdisplay
&& one->hsync_start == two->hsync_start
&& one->hsync_end == two->hsync_end
&& one->htotal == two->htotal
&& one->hskew == two->hskew
&& one->vdisplay == two->vdisplay
&& one->vsync_start == two->vsync_start
&& one->vsync_end == two->vsync_end
&& one->vtotal == two->vtotal
&& one->vscan == two->vscan
&& one->vrefresh == two->vrefresh;
return std::memcmp(one, two, sizeof(drmModeModeInfo)) == 0;
}
static quint64 refreshRateForMode(_drmModeModeInfo *m)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment