summaryrefslogtreecommitdiff
path: root/src/rototiller.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-01-01 23:14:12 -0800
committerVito Caputo <vcaputo@pengaru.com>2018-01-01 23:14:12 -0800
commit9e6c1726de883b042725ea6630bc4d95e526879a (patch)
tree36573bc9591947d7a21e67c0ee525c1361273e3c /src/rototiller.c
parent9618a7cca221e8959a920ec13148a7e6bd2e9b7a (diff)
fb: switch over to fb_ops_t abstraction
Remove everything drm-related from fb.c, utilizing the implementation in drm_fb.c instead.
Diffstat (limited to 'src/rototiller.c')
-rw-r--r--src/rototiller.c11
1 files changed, 9 insertions, 2 deletions
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 <xf86drm.h>
#include <xf86drmMode.h>
+#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");
© All Rights Reserved