backend/drm: add support for custom modes

Use the CVT algorithm to create a drmModeModeInfo.
This commit is contained in:
Simon Ser 2019-10-26 22:35:51 +02:00 committed by Drew DeVault
parent e97c2c3639
commit 0e57effd38
5 changed files with 307 additions and 6 deletions

13
include/backend/drm/cvt.h Normal file
View file

@ -0,0 +1,13 @@
#ifndef BACKEND_DRM_CVT_H
#define BACKEND_DRM_CVT_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <xf86drmMode.h>
void generate_cvt_mode(drmModeModeInfo *mode, int hdisplay, int vdisplay,
float vrefresh, bool reduced, bool interlaced);
#endif