mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-13 13:29:44 -05:00
backend/drm: add support for custom modes
Use the CVT algorithm to create a drmModeModeInfo.
This commit is contained in:
parent
e97c2c3639
commit
0e57effd38
5 changed files with 307 additions and 6 deletions
13
include/backend/drm/cvt.h
Normal file
13
include/backend/drm/cvt.h
Normal 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
|
||||
|
|
@ -32,6 +32,7 @@ bool wlr_output_is_drm(struct wlr_output *output);
|
|||
* Add mode to the list of available modes
|
||||
*/
|
||||
typedef struct _drmModeModeInfo drmModeModeInfo;
|
||||
bool wlr_drm_connector_add_mode(struct wlr_output *output, const drmModeModeInfo *mode);
|
||||
struct wlr_output_mode *wlr_drm_connector_add_mode(struct wlr_output *output,
|
||||
const drmModeModeInfo *mode);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue