Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for NTX + MTK + Kaleido devices #1779

Merged
merged 31 commits into from
May 9, 2024

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented May 6, 2024

  • Bump LuaJIT to 20240422 (there's a potentially interesting 20-year old memory leak fixed)
  • Update FBInk & KoboUSBMS to handle the new devices properly
  • Update MTK headers for whatever we could glean of the new stuff
  • Add dedicated refresh modes for Kaleido-specific waveform modes (basically, once for images, and one for text/highlights).
  • Implemented a halfway sensible wait_for logic for those new devices
  • Special-cased the Elipsa 2E because it behaves differently.
  • "Fix" nightmode on the Elipsa 2E (thanks to ffi/framebuffer_mxcfb.lua: Fix Night Mode on Kobo Elipsa 2E #1768).
  • And, as usual, workaround a few driver bugs in the process (as far as possible) ;p

This change is Reviewable

NiLuJe added 24 commits May 6, 2024 02:13
Initial support for MTK devices
Support for the new MTK Kobo devices
Useful for kaleido panels, which tend to prefer GCC16 over GC16 for
image content
We only use it for the VK highlights, and we don't need dithering there.

We might actually want to drop it from DU, to be perfectly honest...
As it appears to behave slightly differently than its later brethren
Which is to wait *after* sending an update, rather than *before*

Which, admittedly, makes more sense, at least semantically ;).
Fix some more MTK issues
Workaround an apparent off-by-one... somewhere in the driver.
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 7 of 8 files at r1, all commit messages.
Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on @NiLuJe)


ffi/framebuffer_mxcfb.lua line 296 at r1 (raw file):

    --       c.f., epdc_process_update @ drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c on a Kobo Mk. 7 kernel...).
    -- And regardless of alignment constraints, make sure the rectangle is strictly bounded inside the screen.
    x, y, w, h = bb:getBoundedRect(x, y, w, h, dither and 8 or fb.alignment_contraint)

Looks like a typo, one that's older I assume but still distracting

@Frenzie Frenzie changed the title Initial suppoort for NTX + MTK + Kaleido devices Initial support for NTX + MTK + Kaleido devices May 6, 2024
@Frenzie
Copy link
Member

Frenzie commented May 6, 2024

LuaJIT changes for those interested:
LuaJIT/LuaJIT@d06beb0...5790d25

@benoit-pierre
Copy link
Contributor

benoit-pierre commented May 6, 2024

Could this be included NiLuJe/FBInk#78?

There's a similar patch for kobo-usbms: https://github.com/benoit-pierre/koreader-base/blob/dev/thirdparty/kobo-usbms/fix_make_-n.patch

@NiLuJe
Copy link
Member Author

NiLuJe commented May 6, 2024

Looks like a typo, one that's older I assume but still distracting

Err, where?

@NiLuJe
Copy link
Member Author

NiLuJe commented May 6, 2024

Could this be included NiLuJe/FBInk#78?

There's a similar patch for kobo-usbms: https://github.com/benoit-pierre/koreader-base/blob/dev/thirdparty/kobo-usbms/fix_make_-n.patch

Welp. Somehow managed to miss email notification for this, my bad.

@Frenzie
Copy link
Member

Frenzie commented May 6, 2024

contrain vs constrain ;-)

@NiLuJe
Copy link
Member Author

NiLuJe commented May 6, 2024

contrain vs constrain ;-)

Oh, yeah, that one's new, lol ;D.

NiLuJe added 7 commits May 7, 2024 00:43
Merge @benoit-pierre's patch, and fix Kindle FBInk build
(Yay for code completion, they all matched :D).
Fix behavior when running after Nickel's already started a USBMS session
once (i.e., make it work :D)
It's unhelpful and often horribly outdated anyway.
@NiLuJe NiLuJe requested a review from Frenzie May 9, 2024 00:56
Copy link
Member Author

@NiLuJe NiLuJe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 8 files at r1, 3 of 3 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Frenzie)


ffi/framebuffer_mxcfb.lua line 296 at r1 (raw file):

Previously, Frenzie (Frans de Jonge) wrote…

Looks like a typo, one that's older I assume but still distracting

Done.

@NiLuJe NiLuJe merged commit 9795451 into koreader:master May 9, 2024
2 of 3 checks passed
NiLuJe added a commit to c0eos/koreader that referenced this pull request May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants