diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-11 21:46:24 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-11 21:46:24 +0300 |
commit | 9916712a62169606d845510028a3ea6f84bd442f (patch) | |
tree | aca4e1bec39500812111c43a8ecee862edae0002 /kms++/helpers.cpp | |
parent | 736b295100ce441e800457bcbd08cb36db543ff2 (diff) |
kms++: organize into subdirs
Diffstat (limited to 'kms++/helpers.cpp')
-rw-r--r-- | kms++/helpers.cpp | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/kms++/helpers.cpp b/kms++/helpers.cpp deleted file mode 100644 index 715e757..0000000 --- a/kms++/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; -} -} |