Sign in
Join now
pumpkin-os
pds.dad
/
Star
Starred
Star
Something went wrong. Try again.
Fork
0
Eye filled
Watch
Watching
Watch
A fork of pulp-os for the xteink4 adding custom apps
Star
Starred
Star
Something went wrong. Try again.
Fork
Eye filled
Watch
Watching
Watch
Overview
Overview
Issues
Issues
Pulls
Pulls
Pipelines
Pipelines
pumpkin-os
/
kernel
/
src
/
drivers
7 files
at
main
hansmrtn
·
whoops: cargo fmt
·
7mo ago
445755fe
battery.rs
style fixes, bugs, dedup
7mo ago
input.rs
feat: proportional image display with inline scaling and precache fixes Replace the fixed IMAGE_DISPLAY_H (200px) cap with a proportional system that scales inline images to 40% of the text area while preserving aspect ratio, and decodes fullscreen images at the full text area budget. Image dimension pre-scan: - Add prescan_image_heights() to scan page buffers for IMG_REF markers and resolve each image's display height before wrapping - peek_cached_image_size() reads the 4-byte cache header (no pixel data) for already-decoded dimensions - peek_source_dimensions() peeks PNG IHDR (29 bytes) or JPEG SOF (up to 32KB header) directly from stored ZIP entries, computes the decoder's integer downscale output height; deflate-compressed entries fall back to DEFAULT_IMG_H (350px) Proportional line reservation: - wrap_proportional() takes an img_heights slice and reserves the exact number of lines each image needs at its actual height - Inline heights capped to inline_img_max_h() (40% of text area, ~308px on default theme); fullscreen bypass uses full budget Decode-time scaling: - decode_page_images() uses the inline budget for non-fullscreen pages, full text_area_h for fullscreen - Oversized cache hits (precached at full budget) are skipped and re-decoded at the inline budget so images are properly scaled rather than clipped Vertical centering: - Inline images are centered within their reserved line block instead of top-aligned, eliminating excess bottom margin Precache reliability: - Add work_queue::can_submit() to check channel capacity before expensive ZIP extraction; prevents wasted deflate + alloc when the worker channel is already full - Change queue-full race from permanent skip to retry on next poll - Add OOM retry for streaming decode: release ch_cache (~96KB) and retry once, matching the existing pattern in decode_page_images
7mo ago
mod.rs
feat: pull kernel to its own crate
7mo ago
sdcard.rs
Remove smol-epub from kernel crate; improve EpubState encapsulation Or if you want a two-line version with a body: Remove smol-epub from kernel crate; improve EpubState encapsulation Inline fnv1a_icase, define DecodedImage locally, make image decode pluggable via registered callback. Move epub pipeline methods to impl EpubState and privatize internal fields (name_hash, archive_size, chapter_sizes). Kernel now compiles with zero format-specific dependencies.
7mo ago
ssd1677.rs
perf: comprehensive speed, memory, and power optimizations Speed: - Swap blit_1bpp_270 loop order (x-outer/y-inner) for sequential strip buffer writes; batch source byte reads (strip.rs) - Batch ASCII advance in wrap_proportional with direct glyph array indexing, bypassing per-byte function call chain (paging.rs) - Skip prescan_image_heights for text-only pages via fast MARKER byte scan before expensive ZIP/SD setup (images.rs) - Remove redundant 4KB replay buffer copy in phase 3 RED RAM write; send strip data directly (ssd1677.rs) - Skip phase 3 sync when a deferred transition is queued, avoiding ~15ms of rendering that will be immediately overdrawn (scheduler.rs) Memory (~35KB static savings): - Heap-alloc EpubToc on demand via Option<Box<EpubToc>> (~13KB) - Heap-alloc prefetch buffer as Vec<u8> instead of [u8; 8192] (~8KB) - Reduce TITLE_CAP 96→64 across DirEntry/BmListEntry/EpubMeta (~4.6KB) - Reduce ZipIndex MAX_ENTRIES 512→256 (~4.5KB) - Free BootConsole after boot via heap Box instead of static (~3KB) - Reduce MAX_PAGES 1024→512 (~2KB) - Shrink title_len/max_lines/qa_count from usize to u8 Power: - Adaptive input polling: 10ms during active input, 50ms when idle after 1 second, reducing ADC wakeups by ~80% during reading
7mo ago
storage.rs
perf: comprehensive speed, memory, and power optimizations Speed: - Swap blit_1bpp_270 loop order (x-outer/y-inner) for sequential strip buffer writes; batch source byte reads (strip.rs) - Batch ASCII advance in wrap_proportional with direct glyph array indexing, bypassing per-byte function call chain (paging.rs) - Skip prescan_image_heights for text-only pages via fast MARKER byte scan before expensive ZIP/SD setup (images.rs) - Remove redundant 4KB replay buffer copy in phase 3 RED RAM write; send strip data directly (ssd1677.rs) - Skip phase 3 sync when a deferred transition is queued, avoiding ~15ms of rendering that will be immediately overdrawn (scheduler.rs) Memory (~35KB static savings): - Heap-alloc EpubToc on demand via Option<Box<EpubToc>> (~13KB) - Heap-alloc prefetch buffer as Vec<u8> instead of [u8; 8192] (~8KB) - Reduce TITLE_CAP 96→64 across DirEntry/BmListEntry/EpubMeta (~4.6KB) - Reduce ZipIndex MAX_ENTRIES 512→256 (~4.5KB) - Free BootConsole after boot via heap Box instead of static (~3KB) - Reduce MAX_PAGES 1024→512 (~2KB) - Shrink title_len/max_lines/qa_count from usize to u8 Power: - Adaptive input polling: 10ms during active input, 50ms when idle after 1 second, reducing ADC wakeups by ~80% during reading
7mo ago
strip.rs
whoops: cargo fmt
7mo ago