From 9e6c1726de883b042725ea6630bc4d95e526879a Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Mon, 1 Jan 2018 23:14:12 -0800 Subject: fb: switch over to fb_ops_t abstraction Remove everything drm-related from fb.c, utilizing the implementation in drm_fb.c instead. --- src/rototiller.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/rototiller.c') diff --git a/src/rototiller.c b/src/rototiller.c index 079b0d4..fb54694 100644 --- a/src/rototiller.c +++ b/src/rototiller.c @@ -9,6 +9,7 @@ #include #include +#include "drm_fb.h" #include "drmsetup.h" #include "fb.h" #include "fps.h" @@ -25,6 +26,8 @@ * just two pages we end up twiddling thumbs until the vsync arrives. */ +extern fb_ops_t drm_fb_ops; + extern rototiller_module_t julia_module; extern rototiller_module_t plasma_module; extern rototiller_module_t roto32_module; @@ -90,12 +93,16 @@ int main(int argc, const char *argv[]) int module; fb_t *fb; void *context = NULL; + drm_fb_t *drm_fb; drm_setup(&drm_fd, &drm_crtc_id, &drm_connector_id, &drm_mode); module_select(&module); - pexit_if(!(fb = fb_new(drm_fd, drm_crtc_id, &drm_connector_id, 1, drm_mode, NUM_FB_PAGES)), - "unable to create fb"); + pexit_if(!(drm_fb = drm_fb_new(drm_fd, drm_crtc_id, &drm_connector_id, 1, drm_mode)), + "unable to create drm fb backend"); + + pexit_if(!(fb = fb_new(&drm_fb_ops, drm_fb, NUM_FB_PAGES)), + "unable to create fb frontend"); pexit_if(!fps_setup(), "unable to setup fps counter"); -- cgit v1.2.1