Skip to content

Tags: NiLuJe/FBInk

Tags

v1.25.0

Toggle v1.25.0's commit message
SoC Puppet

Changes:
  * Update libevdev
  * Update to Cozette 1.18.1
  * Update to Scientifica v2.3
  * Support the Kobo Libra 2
  * Support the Kobo Sage (and document the new sunxi quirks it introduced, e.g., `EINK_NO_MERGE`)
  * Update i2c-tools
  * Identify the PocketBook Inkpad Lite
  * Support Eclipse waveform modes on Kobo Mk.9+
  * Various updates to the DevCaps script to make it more useful when poking at new devices
  * Update to libunibreak 5.0
  * Support the Kindle PW5 (and document the new features of the MTK platform)
  * Identify the PocketBook PB617
  * Identify a new PocketBook Inkpad Pro 3 variant
  * Add the `-K, --animate` flag to the CLI to enable animated refreshes on MTK
  * Update ctrld
  * Identify & support devices running on mainline kernels with fbdev support (mostly NTX boards so far)
  * Support the Kobo Clara 2E
  * Identify the Kindle Basic 4
  * The CLI tool now supports `DUNM` waveform modes on Kindle (MTK only)
  * The CLI tool now supports `DU4`, `GCK16` & `GLKW16` waveform modes on Kobo (Mk.9+)
  * Attempt to detect the Kindle Touch A properly (will only behave with a Nickel version tag)
  * Fix the finger_trace tool on the Kobo Touch A, B & C
  * Identify the Kindle Scribe
  * Minor code cleanups

API Changes:
  * Added a `no_merge` field to `FBInkConfig` in order to control the `EINK_NO_MERGE` flag on sunxi
  * Allow `fbink_reinit` usage on Kindle (#67)
  * New `MTK_SWIPE_DIRECTION_INDEX_T` enum
  * Added an `is_animated` field to `FBInkConfig` in order to enable animated refreshed on MTK
  * New `fbink_mtk_set_swipe_data` function to setup the animation settings on MTK
  * New `fbink_wait_for_any_complete` function, mapping to the new `WAIT_FOR_ANY_UPDATE_COMPLETE_MTK` ioctl on MTK
  * New `fbink_mtk_set_halftone` function to setup the checkerboard overlay feature found on MTK
  * New `fbink_mtk_toggle_auto_reagl` function to setup the so-called "fast mode" on MTK
  * New `fbink_mtk_toggle_pen_mode` function, mapping to the new `MXCFB_SET_STYLUS_MODE` ioctl on MTKv3
  * Add an `OK_GRAYSCALE_CHANGE` constant, allowing to detect grayscale flag swaps in `fbink_reinit`
  * New `MAINLINE_DEVICE_ID_E` enum
  * New `DEVICE_UNKNOWN` constant
  * New fields `inverted_grayscale`, `is_kindle_mtk`, `has_eclipse_wfm` & `unreliable_wait_for` in `FBInkState`

ABI Changes:
  * Renamed `fbink_toggle_sunxi_ntx_pen_mode` to `fbink_sunxi_toggle_ntx_pen_mode`

Buildsystem Changes:
  * N/A

v1.24.0

Toggle v1.24.0's commit message
Icarus

Changes:
  * CLI documentation cleanups, thanks to @fulldecent (#59)
  * On plain Linux builds, honor the FRAMEBUFFER env var (#61)
  * PocketBook: ID the PB741
  * Update to Cozette 1.11.3
  * Deal with some Y2K38 shenanigans (#63)
  * Update to Spleen 1.9.1
  * Minor code tweaks & cleanups.
  * Added support for the Kobo Elipsa, and the whole new family of SoCs that came with it (sunxi, w/ disp2 ioctls)...
    There are quite a few quirks involved, see #64 for more details.
    Double-check the API docs, as a few APIs behave differently and/or are no longer usable on sunxi,
    because of technical limitations of the platform.
  * As a part of the sunxi porting effort, a few new PoCs have popped up in the utils folder,
    the most interesting of which is probably finger_trace.c, which implements a quick'n dirty pointer trail
    as a means to test rotation & input shenanigans on Kobo. You can build it via the ftrace make target.
    As well as the sunxigrab.sh script, which allows taking screengrabs on that platform.
  * Update stb
  * The fbdepth utility is now a real boy! Since its feature set has been moved to the API (fbink_set_fb_info),
    it's been rebuilt as a proper API client.
    It has also moved to a dedicated build target, fbdepth.

API Changes:
  * fbink_get_last_rect gained a new argument,
    allowing you to choose whether the coordinates returned are run through the current rotation quirks or not.
    (This only applies to the is_ntx_quirky_landscape state).
    Previously, it behaved as if this new flag was set to true, which didn't make much sense in practice,
    as the cases where you'd actually want that are very few and far between.
  * fbink_cls gained a new argument,
    allowing you to bypass rotation quirks for the supplied coordinates.
    (e.g., you passed a rect that *already* went through said quirks).
    This obviously ties into the previous entry ;).
  * New function: fbink_rect_dump
    Allows dumping a specific rect as-is, with no positioning or rotation trickery.
    (e.g., a rect from fbink_get_last_rect).
  * New function: fbink_toggle_sunxi_ntx_pen_mode
    Allows toggling "pen" refresh mode on Kobo devices with a sunxi SoC.
  * New function: fbink_sunxi_ntx_enforce_rota (with a matching SUNXI_FORCE_ROTA_INDEX_T enum).
    On sunxi, allows controlling how rotation is handled (gyro, gyro w/ constraints, fixed àla linuxfb,
    or even matching the working buffer, provided we have some help from the custom fbdamage kernel module).
  * As a consequence, FBInkState gained a new field, sunxi_force_rota, to reflect the current state.
    It is set to FORCE_ROTA_NOTSUP on unsupported platforms.
  * FBInkState also gained a new field, sunxi_has_fbdamage, to indicate whether fbdamage is loaded or not.
    It is set to false on unsuppoorted platforms.
  * New function: fbink_invert_screen
    Simple helper to fake a nightmode swap on devices without HW inversion support.
  * Added a bunch of public enums to make switches on FBInkState's device_id field more readable:
    CERVANTES_DEVICE_ID_E, KOBO_DEVICE_ID_E, REMARKABLE_DEVICE_ID_E & POCKETBOOK_DEVICE_ID_E
    (Nothing on Kindle, as there are *many* IDs for a single device there...).
  * Added a scanline_stride field to FBInkState (matching fInfo.line_length)
  * New function: fbink_get_fb_pointer
    Exports a pointer to the backing buffer, as well as said buffer's size.
    Low-level API, mostly useful if you're using FBInk in a platform abstraction layer (e.g., a Qt5 QPA).
  * New function: fbink_set_fb_info
    Allows one to control bitdepth & rotation (precisely what used to be available only in the dedicated fbdepth tool).
    Low-level API, beware, and make sure you understand the implications!
  * Every fbink_reinit-like function is now marked warn_unused_result, as checking the return value may be critical.
  * New function: fbink_get_fb_info
    Allows one to return a copy of the *full* vInfo & fInfo structs.
    Low-level API, prefer fbink_get_state unless you really have no other choice!

ABI Changes:
  * Signature updates for:
    * fbink_get_last_rect
    * fbink_cls
  * The "is_pb_sunxi" field in FBInkState has been renamed to "is_sunxi", to accomodate the Kobo Elipsa.

Buildsystem Changes:
  * The fbdepth utility is now built as part of a dedicated target, via make fbdepth.
    You'll want to buil it from a pristine tree (make distclean),
    to prevent it from linking against a larger than necessary library.
  * Added two new modular build flags: DRAW & BITMAP
    This means that bare MINIMAL builds are now *really* bare: they don't feature *any* primitive drawing features.
    Unless you're doing very particular things, anything that previously relied on a bare MINIMAL build probably
    requires a MINIMAL + BITMAP build now.
  * Added a dist target to generate release tarballs.

v1.23.2

Toggle v1.23.2's commit message
Spring Chicken

Changes:
  * Added a --help, -Q flag to the CLI tool (finally ;p).
  * Never clobber the alpha byte @ 32bpp (even on Kobo, as it was interfering with alpha-blending).
  * Human-readable documentation has been added to the public header in order to detail what each waveform mode does, and what they're best used for.
  * Comments about various EPDC quirks throughout the codebase have been cleaned up and updated (e.g., the comment block at the top of refresh_kobo_mk7).
  * Fix the timeout value used by fbink_wait_for_complete on older Kobo devices.
  * Documented various waveform mode quirks on old Kobo devices, and some PocketBook devices.
  * In particular, disable AUTO on PB devices with a B288 SoC.
  * Fix a rather nasty bug in the OT codepath when horizontal padding is enabled, that would result in a rather massive OOB write.
    It may have gone unnoticed at lower bittdepths on devices with an EPDC, but it led to massive memory corruption on the reMarkable 2.
    Many thanks to @mrichards42 for his detailed report in #49!
  * Fixed a corner-case in the OT codepath that could result in a failure to print some hard-to-break lines, because of a computation mismatch between the linebreaking pass and the drawing pass.
  * Made sure stripping was disabled in debug builds.
  * Minor code tweaks & cleanups.

API Changes:
  * Added a few new fields to the FBInkState struct: is_pb_sunxi, is_kindle_legacy & can_hw_invert.

ABI Changes:
  * N/A

v1.23.1

Toggle v1.23.1's commit message
Nightmare Before Christmas

Changes:
  * (Very) minor performance improvements when targeting 32bpp & 16bpp fbs.
  * On PB, where possible, export the actual numerical codename as the deviceId.
  * Fix some potential stupidty in the rM device identification code.
  * Fix a potential OOB-read in parse_simple_md (OT codepath w/ MD formatting).
  * Minor code tweaks & cleanups.

API Changes:
  * fbink_print_raw_data now takes a restricted pointer for the input data (this shouldn't really change anything in practice).

ABI Changes:
  * N/A

v1.23.0

Toggle v1.23.0's commit message
Back To The Lockdown

Changes:
  * In the fixed-cell codepath, don't even try to compute padding on full lines (except when also centering, because that's another kettle of fish).
  * In the fixed-cell codepath, leave some space for the wraparound marker when padding is involved (with or without centering).
    Otherwise, we would blow past the line & region width, and the refresh would (at best) fail.
  * Update libunibreak
  * Initial PocketBook support, thanks to @ezdiy (#47)
    The initialization process will also warn if a device using an AW B288 SoC is detected, because it's known to suffer from a larger than usual amount of quirks.
    On PB, a couple of env vars are honored to handle various platform-sepcific quirks:
      If FBINK_NO_SW_ROTA is set, no rotation trickery will be applied (useful if you already correct it in order to handle hardware roation sanely)
      If FBINK_NO_INKVIEW is set, InkView will not be loaded and called at all. This disables model detection, which is only used to set an accurate DPI value.
  * Update to Cozette 1.9.3
  * Update to Unscii 2.1
  * Update to Unifont 13.0.04
  * Update stb to pickup a GPOS kerning fix
  * Attempt to translate the insane native rotation values to canonical ones on Kobo (see the new API calls below).
      * This means that, on devices with a viewport, it is now accurately computed even in non-standard rotations.
      * fbdepth also has a couple of new flags to set/get rotation based on canonical values, instead of natives ones.
        e.g., the old automagic "put me in Portrait" invocation fbdepth -r -1 can now be done via fbdepth -R UR
      * There's also a new make target (devcap), which generates a small bundle with a shell script that can be run on the device
        in order to collect enough information to (hopefully) correct any issue in this highly volatile piece of logic...
  * Identify the reMarkable 2.0, and warn that FBInk will be unusable there without help from the rm2fb shim.
  * A couple of functions that had a generic error message now print a more detailed one (or are simply tagged with the function name to tell them apart).
  * Minor code tweaks

CLI Changes:
  * Added a 'style' suboption to the -t, --truetype option, to set the default font style to use for an unformatted string.
    The previous behavior was to use the *first* font style loaded.
    If unspecified, defaults to Regular (which means the call may fail if you don't load a Regular font style and fail to specific a default style).
    As a backward compatibility crutch, if only a single non-Regular font style is loaded, it's automatically made the default style.
  * Added new waveform modes on PB: A2IN, A2OUT, GC16HQ & GS16
  * The tool will now abort if it's running on an unsupported device (currently, that only applies on an rM 2 without rm2fb).

API Changes:
  * Added a 'style' field to FBInkOTConfig, to set the default font style to use when is_formatted is false (i.e., the default).
    Previous (undocumented) behavior was to use the first loaded font style.
    The decision is now explicitly in the caller's hands, which makes using multiple font-styles less cumbersome,
    without having to resort to is_formatted & Markdown markup.
    Defaults to FNT_REGULAR (i.e., Regular).
  * Added fbink_add_ot_font_v2, which allows tying a set of loaded fonts to a specific FBInkOTConfig instance,
    instead or relying on a global pool.
  * Added a matching fbink_free_ot_fonts_v2, to release loaded fonts tied to a specific FBInkOTConfig instance.
  * Added a private font pointer to the FBInkOTFonts struct, in order to handle the aforementioned new optional behavior.
    * This means that zero-initializing an FBInkOTConfig struct is now *mandatory*.
  * fbink_init can return -ENOSYS on reMarkable if it's running on an rM 2 without rm2fb.
  * The WFM_MODE_INDEX_E enum has a few new constants for PB support: WFM_A2IN, WFM_A2OUT, WFM_GC16HQ, WFM_GS16
  * Added a pair of Kobo only functions in order to convert the rotation between "native" and "canonical" representations:
    fbink_rota_native_to_canonical & fbink_rota_canonical_to_native
    (They'll return ENOSYS on unsupported platforms).

ABI Changes:
  * N/A

v1.22.2

Toggle v1.22.2's commit message
Back To School

Changes:
  * Added the FBInk version to the list of things returned by fbink_state_dump
  * Update Cozette to v1.9.0
  * Allow bypassing the canHWInvert device cap check via an env var (FBINK_ALLOW_HW_INVERT)
  * Update to libunibreak v4.3
  * Update Spleen to v1.8.2
  * Fail explicitly when a bogus style is passed to fbink_add_ot_font
  * Update stb
  * Prevent trying to decode gigantic images that would never fit in RAM
  * Initial support for the Kobo Nia
  * Minor code tweaks

CLI Changes:
  * N/A

API Changes:
  * N/A

ABI Changes:
  * N/A

v1.22.1

Toggle v1.22.1's commit message
Let It Out

Changes:
  * Added a -H, --nightmode flag to fbdepth to toggle basic nightmode on mxcfb @ 8bpp
  * Support einkfb rotation handling in fbdepth (as well as during the init-time log messages)
  * Made fbdepth behave on Kindle
  * Update to Scientifica v2.0
  * Experimented with Unifont in the fixed-cell codepath, it's now optionally available.
  * Initial import of a new bitmap font in the fixed-cell rendering codepath, Cozette
  * Fix an issue will full-screen fbink_cls calls on rotated 16bpp fbs
  * Minor buildsystem, code & documentaton tweaks.

CLI Changes:
  * N/A

API Changes:
  * Added UNIFONT, UNIFONTDW & COZETTE constants to the FONT_INDEX_E enum.
  * Added OK_LAYOUT_CHANGE consant, for fbink_reinit
  * Revamped the new positive return values for fbink_reinit introduced in v1.22.0:
    it's now actually a bitmask, so all flags are set individually.
    OK_LAYOUT_CHANGE is new, and set when the layout of the fb changes (i.e., Portrait <-> Landscape).

ABI Changes:
  * N/A

v1.22.0

Toggle v1.22.0's commit message
Tic Tac Toe

Changes:
  * Update stb
  * Minor performance improvements with standard rendering modes in the OT codepath (c.f., #43).
  * Don't clobber the alpha value in fill_rect on non-eInk 32bpp fb.
    (We still do on eInk for minor performance gains, as the alpha byte is essentially ignored there anyway).
  * Fix regional fbink_cls calls on quirky NTX 16bpp modes.
  * Make sure fbink_cls stores its own rectangle for fbink_get_last_rect.
    * Make -E, --coordinates work with -k, --cls
  * Allow sending button_scan's output to the syslog.
  * Double the is_on_*_screen timeouts in button_scan to play nice with current FW releases.
  * Fix the kobo make target on strictly posix default shells (e.g., dash) (#45).
  * Make the public header C++ friendly (#45).
  * Allow using is_centered in conjunction with is_rpadded: it now behaves exactly like is_centered + is_padded,
    instead of failing horribly.
  * Minor optimizations around fill_rect & RENDER_GLYPH in the fixed-cell rendering codepath,
    which should make standard (i.e., !(bgless||fgless||overlay)) rendering a tiny bit faster.
  * Minor buildsystem, code & documentaton tweaks.

CLI Changes:
  * N/A

API Changes:
  * Added OK_BPP_CHANGE & OK_ROTA_CHANGE constants.
  * fbink_reinit now returns OK_BPP_CHANGE when it *succcesfully* finished a reinitialization following a bitdepth change.
  * fbink_reinit now returns OK_ROTA_CHANGE when it *succcesfully* finished a reinitialization following a rotation change.
  * New fbink_update_pen_colors function, which can be used to update pen colors
    from the fg_color/bg_color fields of an FBInkCinfig struct without having to go through a full (re)init.
  * New fbink_set_fg_pen_gray/fbink_set_bg_pen_gray/fbink_set_fg_pen_rgba/fbink_set_bg_pen_rgba functions,
    which can be used to set the pen color directly, without relying on FBInk's eInk palette handling
    (e.g., to use arbitrary grayscale or RGBA values you might be getting from somewhere else).
  * New OK_ALREADY_SAME constant as a possible return value for the fbink_set_*_pen_* functions.
  * New fbink_grid_clear function, which behaves exactly like fbink_cls, except it operates on grid coordinates,
    following the exact same behavior as fbink_print.
  * New fbink_grid_refresh function, which behaves exactly like fbink_refresh, except it operates on grid coordinates,
    following the exact same behavior as fbink_print.
  * Switched to explicit typedefs for the few uint8_t fields that were expecting specific constants from a specific enum.
    It's a bit roundabout, but in practice, nothing has changed, this is more of a documentation hint.
  * New fbink_update_verbosity function, which can be used to update the global verbosity flags
    from the is_verbose/is_quiet/to_syslog fields of an FBInkCinfig struct without having to go through a full (re)init.
  * Minor tweak to the FBInkDump struct layout in order to make some tricky stuff slightly less tricky (c.f., utils/dump.c).

ABI Changes:
  * N/A

v1.21.0

Toggle v1.21.0's commit message
noTable?

Changes:
  * Handle padding in the OT/TTF codepath (as in, the background space between the edge of your text, and the limit of your drawing area).
    This allows making sure that padding is always re-painted in the background color, which makes printing strings of various lengths in the same are amuch less quirky.
    There's a new padding suboption in the CLI.
  * Cleaned up the amount of ifdeffery needed to add support for a new platform.
  * Make sure overlay has precedence over bgless in the OT/TTF codepath (matches the fixed-cell codepath, as well as the docs).
  * Allow clearing a *specific* region of screen, instead of only the full-screen (via -k, --cls, which gained suboptions to handle that).
    This effectively allows one to draw filled rectangles at an arbitrary position ;).
    Also, -k, --cls is now properly documented in the CLI.
  * A few getsubopt tweaks have made subopt parsing errors much less cryptic.
  * -s, --refresh; -D, --dither & -k, --cls now properly take *optional* arguments, as they were designed to.
    Some of 'em were recommending crappy workarounds when one wanted to avoid passing any suboption to them before that fix.
    That is no longer needed. You can either pass proper suboptions, or nothing.
    The only quirk left is the obvious one: if you bundle short flags together, these will need to be the last of their respective bundle (i.e., -fs and not -sf)..
    Otherwise whatever comes next would be parsed as a suboption, which will obviously not work.
  * Added support for the reMarkable Tablet, thanks to @tcrs (#41).
  * Minor performance improvements for some use-cases @ RGB565 (mainly, progress bars & fixed-cell rendering).
  * Stop mangling eInk palette colors @ RGB565 (fill_rect was packing non B&W colors twice).
  * Document the fact that most EPDC v1 devices expect REAGL/REAGLD to be flashing to behave properly.
    This is no longer the case on EPDC v2 devices (i.e., Kobo Mk. 7).
    Kindle EPDC v2 devices still do that, though.
  * Honor -w, --wait in conjunction with -k, --cls (or a solo -c, --clear) in the CLI.
  * Disable FORCE_MONOCHROME when (EPDC) dithering is requested, as it's pretty obviously counter-productive then.
  * Never flag a quirky NTX Landscape state on 8bpp modes (there was a quirky check in there aimed at extremely edge-casey KOReader usage that is no longer necessary).
  * Harden Kindle device detection against out of range S/N prefixes.
  * Allow requesting legacy EPDC v1 (software, in-kernel) dithering. This is supported on a slightly wider range of devices,
    unlike true EPDC v2 hardware dithering, but it's also slightly crappier (and never offloaded to the PxP).
    It does yield some interesting results with very low bitdepth waveform modes (f.g., A2 or DU), as well as DU4 or GL4 on Kindle.
    Mk. 6 Kobos possibly have proper dithering for 16 shades of gray waveform modes, but I'm unable to comment on the results,
    as I don't own such a device. Our own software dithering is still likely to be far superior, though.
    Pass LEGACY to -D, --dither on the CLI.
  * Print the hist_*_waveform_mode fields post-ioctl on Kindle (w/ verbose logging).
  * Unbreak ORDERED dithering on Zelda/Rex Kindles w/ GC16 (it was not dithering down to the right amount of shades of gray).
  * On Kobo, you can now request a specific rotation in the doom demo tool.
  * Documented an apparent Kobo Mk. 7 kernel issue where the EPDC may repeatedly ignore the requested flags and/or dither_mode...
  * The fbdepth tool is now shipped with the standalone Kobo packages.
  * The doom demo tool is now shipped with the standalone Kobo & Kindle packages.
  * Also stop mangling eInk palette colors @ RGB565 when clearing the screen (clear_screen was not packing pixels at all).
  * Minor buildsystem, code & documentaton tweaks.

CLI Changes:
  * -D, --dither now takes an *optional* argument. If none are passed, assume ORDERED was passed (the previous behavior).
  * -s, --refresh lost its own dither suboption, since that's not covered by -D, --dither.
  * -k, --cls now takes an *optional* argument (to set the region). If none are passed, assume full-screen (the previous behavior).
  * -s, --refresh now *properly* takes an *optional* argument (and no longer accepts bogus suboptions).

API Changes:
  * There's a new PADDING_INDEX_T enum to control padding behavior with fbink_print_ot().
  * FBInkOTConfig has a new padding (uint8_t) field, which takes a value from the PADDING_INDEX_T enum,
    in order to control padding behavior with fbink_print_ot().
    Additionaly, the struct has seen some internal re-ordering to limit, well, padding ;).
  * fbink_cls() now takes a new, optional, argument: a pointer to an FBInkRect, in order to be able to clear only a specific region of screen.
    Incidentally, this essentially exposes fill_rect() to the API, allowing one to draw filled rectangle at an arbitrary position.
    It's optional in the sense that you can pass an empty rectangle, or more likely a NULL pointer, to request a full-screen clear.
  * There are a couple new values (WFM_UNKNOWN & WFM_INIT2) appended to the WFM_MODE_INDEX_T enum to accomodate the reMarkable.
  * A custom HWD_LEGACY value has been appended to the HW_DITHER_INDEX_T enum to be able to request EPDC v1 dithering.
  * FBInkConfig's is_dithered (bool) field has been replaced by dithering_mode (uint8_t), which takes a value from the HW_DITHER_INDEX_T enum.
  * fbink_refresh() lost its own dithering_mode (uint8_t) argument, since it's now set in FBInkConfig.

ABI Changes:
  * fbink_cls() has a different signature (new argument, a pointer to an FBInkRect).
  * fbink_refresh() has a different signature (dithering_mode (uint8_t) is gone).

v1.20.3

Toggle v1.20.3's commit message
What Am I Gonna Call This One?

Changes:
  * Fix fbdepth on the Libra to actually use the default Portrait orientation when requested.
  * Made per-character verbose logging more accurate in the fixed-cell rendering codepath:
    the byte offset was bogus (it was the offset of the *next* character, not the current one).
    It now also prints the actual UTF-8 glyph in addition to its codepoint.
    And the messages are now properly aligned by way of zero-padding.
  * In the fixed-cell rendering codepath, the missing unicode coverage warning now prints the actual UTF-8 glyph in addition to its codepoint.
  * Buildsystem tweaks to prevent using a bogus FBINK_VERSION define in case git describe fails,
    f.g., because of a shallow clone.
  * Came up with an alt_buffer PoC, for shit'n giggles.
  * Minor code & documentaton tweaks.

API Changes:
  * N/A.

ABI Changes:
  * N/A.