summaryrefslogtreecommitdiff
path: root/src/drm_fb.c
AgeCommit message (Collapse)Author
2021-02-14*fb: improve error propagation out of setup/initVito Caputo
A lot of errors were being conflated as ENOMEM due to the lazy use of NULL pointer returns for errors. This commit reworks a handful of those return paths to instead return an errno-style int, storing the results on success at a supplied result pointer. It's kind of ugly, and I make some assumptions about libdrm setting errno on failure - it too uses this lazy API of returning NULL pointers on failure. Hopefully errno is always set by an underlying ioctl failing. The SDL error API is also pretty gross, being cross-platform it defines its own error codes so I try vaguely map these to errno values. I'm considering this a first approximation at fixing this up, but there are probably bugs as I did it real fast and nasty. It at least seems to all still work OK here in the non-error paths I tested. So it doesn't seem more broken than before at a glance.
2021-02-14drm_fb,sdl_fb: staticify all functionsVito Caputo
Some omissions, nothing in these is public outside of what's explicitly plumbed out via fb_ops_t.
2019-11-24fb: add pitch to fb_fragment_tVito Caputo
The put_pixel helpers really needed reworking to properly handle subframe fragments modules like montage will utilize. I had the stride present as it's convenient for a number of modules that maintain a buf pointer as they progress down a row, but the pitch is more applicable to put_pixel for scaling the y coordinate. Now there's both pitch and stride so everyone's happy with what's most convenient for their needs.
2019-11-10settings: s/setting_desc_new/setting_desc_clone/Vito Caputo
Slight refactor to make call sites less annoying. Now takes a (setting_desc_t *) instead of the members as discrete parameters, and returns an errno on error so callers can simply propagate error codes out rather than having to get access to errno defines, check for NULL and return -ENOMEM etc. It also makes the call sites self documenting by employing designated initializers in compound literals for the supplied setting_desc_t. This is in prep for runtime-configurable module settings.
2018-02-22fb,settings,drm_fb,sd_fb: const settings_t readersVito Caputo
The fb_ops entrypoints and their descendants are purely readers of the settings, so constify their settings_t instances and the operative functions which only read settings.
2018-02-22*: embrace new generic settings paradigmVito Caputo
This should probably be split into multiple commits, but for simplicity sake it's all cut over at once. drm_fb.c sees major changes, migrating the remaining drm-specific bits from drmsetup into it, behind the settings API. rototiller.c sees a bunch of scaffolding surrounding the settings API and wiring it up into the commandline handling and renderers and video backends. fb.[ch] see minor changes as settings get plumbed to the backend drmsetup.[ch] goes bye bye
2018-01-01drm_fb: implement drm fb backendVito Caputo
Largely mechanical copying of the drm code into the new fb_ops_t abstraction. Dormant for now.
© All Rights Reserved