summaryrefslogtreecommitdiff
path: root/libkms++/helpers.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
commit17d180891f1e237ea5d25835999a8b23a6e7946d (patch)
tree5963fe4d338f6272daf55c76ed355effb47afc71 /libkms++/helpers.cpp
parent38a71ee72c47f3287c327113ce411f236cac05ef (diff)
rename dirs
Diffstat (limited to 'libkms++/helpers.cpp')
-rw-r--r--libkms++/helpers.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/libkms++/helpers.cpp b/libkms++/helpers.cpp
deleted file mode 100644
index 715e757..0000000
--- a/libkms++/helpers.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-
-#include "connector.h"
-#include "helpers.h"
-#include <cstring>
-
-#define CPY(field) dst.field = src.field
-
-namespace kms
-{
-Videomode drm_mode_to_video_mode(const drmModeModeInfo& drmmode)
-{
- Videomode mode = { };
-
- auto& src = drmmode;
- auto& dst = mode;
-
- CPY(clock);
-
- CPY(hdisplay);
- CPY(hsync_start);
- CPY(hsync_end);
- CPY(htotal);
- CPY(hskew);
-
- CPY(vdisplay);
- CPY(vsync_start);
- CPY(vsync_end);
- CPY(vtotal);
- CPY(vscan);
-
- CPY(vrefresh);
-
- CPY(flags);
- CPY(type);
-
- mode.name = drmmode.name;
-
- return mode;
-}
-
-drmModeModeInfo video_mode_to_drm_mode(const Videomode& mode)
-{
- drmModeModeInfo drmmode = { };
-
- auto& src = mode;
- auto& dst = drmmode;
-
- CPY(clock);
-
- CPY(hdisplay);
- CPY(hsync_start);
- CPY(hsync_end);
- CPY(htotal);
- CPY(hskew);
-
- CPY(vdisplay);
- CPY(vsync_start);
- CPY(vsync_end);
- CPY(vtotal);
- CPY(vscan);
-
- CPY(vrefresh);
-
- CPY(flags);
- CPY(type);
-
- strncpy(drmmode.name, mode.name.c_str(), sizeof(drmmode.name));
- drmmode.name[sizeof(drmmode.name) - 1] = 0;
-
- return drmmode;
-}
-}