diff --git a/src/drm.cpp b/src/drm.cpp index da64aec..fc916ee 100644 --- a/src/drm.cpp +++ b/src/drm.cpp @@ -348,7 +348,7 @@ static bool get_properties(struct drm_t *drm, uint32_t obj_id, uint32_t obj_type } -int init_drm(struct drm_t *drm, const char *device, const char *mode_str, unsigned int vrefresh) +int init_drm(struct drm_t *drm, const char *device) { drmModeRes *resources; drmModeConnector *connector = NULL; @@ -393,22 +393,6 @@ int init_drm(struct drm_t *drm, const char *device, const char *mode_str, unsign return -1; } - /* find user requested mode: */ - if (mode_str && *mode_str) { - for (i = 0; i < connector->count_modes; i++) { - drmModeModeInfo *current_mode = &connector->modes[i]; - - if (strcmp(current_mode->name, mode_str) == 0) { - if (vrefresh == 0 || current_mode->vrefresh == vrefresh) { - drm->mode = current_mode; - break; - } - } - } - if (!drm->mode) - fprintf(stderr, "requested mode not found, using default mode!\n"); - } - /* find preferred mode or the highest resolution mode: */ if (!drm->mode) { for (i = 0, area = 0; i < connector->count_modes; i++) { diff --git a/src/drm.hpp b/src/drm.hpp index fb47e98..83b7c5c 100644 --- a/src/drm.hpp +++ b/src/drm.hpp @@ -102,7 +102,7 @@ extern bool g_bUseLayers; extern bool g_bRotated; extern bool g_bDebugLayers; -int init_drm(struct drm_t *drm, const char *device, const char *mode_str, unsigned int vrefresh); +int init_drm(struct drm_t *drm, const char *device); int drm_atomic_commit(struct drm_t *drm, struct Composite_t *pComposite, struct VulkanPipeline_t *pPipeline ); uint32_t drm_fbid_from_dmabuf( struct drm_t *drm, struct wlr_buffer *buf, struct wlr_dmabuf_attributes *dma_buf ); void drm_drop_fbid( struct drm_t *drm, uint32_t fbid ); diff --git a/src/main.cpp b/src/main.cpp index 7e5b288..69e3b2b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -237,7 +237,7 @@ int initOutput(void) } else { - return init_drm( &g_DRM, nullptr, nullptr, 0 ); + return init_drm( &g_DRM, nullptr ); } }