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

[Core] Add dirty chunk checking for all RGB and LED drivers #24872

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

Xelus22
Copy link
Contributor

@Xelus22 Xelus22 commented Jan 26, 2025

Description

Replaces #23625

Should this require additional documentation and require an additional #define to enable this?
The file size of increase is only about 100 bytes on AVR

STM32 was tested with OPT=2 bloating the size for build size with this approach. The "bool array" aka bool per chunk is used here instead of a bitfield now after these tests.

image

Above tested on Pachi RGB Rev2 (with OPT=2) and Dawn60 Rev1_QMK

Testing with different chunk sizes (Pachi RGB Rev2 no optimisation)
image

Types of Changes

  • Update all ws2812 drivers to not update if there are no LED updates. There is a single bool check because all of them in the chain are required to be updated.
  • All ISSI drivers updated if they are sent in chunks
  • All other led drivers updated it they are sent in chunks
  • Did not update the AW20216S as that is SPI and sends the entire buffer
  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

  • Adds double buffering and helps with scan rate when indicators are on for most RGB effects

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added the core label Jan 26, 2025
@drashna
Copy link
Member

drashna commented Jan 26, 2025

platforms/avr/drivers/ws2812_bitbang.c:155:1: error: unknown type name 'bool'; did you mean '_Bool'?

Whoops. Looks like something was missed.

@drashna
Copy link
Member

drashna commented Jan 26, 2025

work louder boards break because same variable is introduced twice. It would probably make sense to make the dirty flag static, especially as it's not being used outside of the driver files, from the looks of it.

@Xelus22 Xelus22 force-pushed the calculate_leds_send branch from a8509ac to 2fb81fc Compare January 27, 2025 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants