summaryrefslogtreecommitdiff
path: root/src/drm_fb.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-11-30 11:34:15 -0800
committerVito Caputo <vcaputo@pengaru.com>2023-11-30 11:44:14 -0800
commit28d12a899645be09dae7e4cb8c293bf7fc64d6ad (patch)
treead195d50f3d488521add9f81f7fd291fc7d92743 /src/drm_fb.c
parent97b3dd17c1499c7ffd6d429a01d64ceaed233df2 (diff)
til: wire up til_video_setup_t throughout *_fb
Preparatory commit for aspect ratio settings at the fb layer. This slightly reworks how main::setup_video() integrates the selected fb backend's setup_func to better resemble how the module setup_funcs work now, with more clearly separated settings-building and setup-baking/finalizing phases. Which makes inserting the ratio setting in the middle of the front-end and back-end setup_funcs fairly trivial. Not a fan of all the casts, but there will probably be more helpers introduced to take care of that and make til_video_setup_t more of a first-class thing facilitating the fb stuff.
Diffstat (limited to 'src/drm_fb.c')
-rw-r--r--src/drm_fb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/drm_fb.c b/src/drm_fb.c
index 5d7f259..2dd4f98 100644
--- a/src/drm_fb.c
+++ b/src/drm_fb.c
@@ -14,6 +14,7 @@
#include "til_fb.h"
#include "til_settings.h"
#include "til_util.h"
+#include "til_video_setup.h"
/* drm fb backend, everything drm-specific in rototiller resides here. */
typedef struct drm_fb_page_t drm_fb_page_t;
@@ -37,7 +38,7 @@ typedef struct drm_fb_t {
} drm_fb_t;
typedef struct drm_fb_setup_t {
- til_setup_t til_setup;
+ til_video_setup_t til_video_setup;
const char *dev;
const char *connector;
const char *mode;
@@ -330,7 +331,7 @@ static drmModeModeInfo * lookup_mode(drmModeConnector *connector, const char *mo
/* prepare the drm context for use with the supplied settings */
-static int drm_fb_init(const char *title, const til_setup_t *setup, void **res_context)
+static int drm_fb_init(const char *title, const til_video_setup_t *setup, void **res_context)
{
drm_fb_setup_t *s = (drm_fb_setup_t *)setup;
drm_fb_t *c;
@@ -598,7 +599,7 @@ static int drm_fb_setup(const til_settings_t *settings, til_setting_t **res_sett
if (!setup)
return -ENOMEM;
- return til_settings_apply_desc_generators(settings, generators, nelems(generators), &setup->til_setup, res_setting, res_desc, res_setup);
+ return til_settings_apply_desc_generators(settings, generators, nelems(generators), &setup->til_video_setup.til_setup, res_setting, res_desc, res_setup);
}
© All Rights Reserved