Skip to content

Cannot disable gamma corection for LEDs (RPi5 ws2812-pio-rp1 module) #7108

Closed

Description

@awawa-dev

Describe the bug

Hi
Kernel module for Raspberry Pi 5 PIO ws2812-pio-rp1 module that allows control over ws2812 sk6812 LED strips:

p[0] = ws2812_apply_gamma(state->brightness, w);

Gamma correction is hard-coded. We cannot disable it with any settings. So instead of rendering 256 colors per channel we are able to render max 100-120 due to the gamma compression.

Steps to reproduce the behaviour

awawa-dev/HyperHDR#1317

Device (s)

Raspberry Pi 5

System

System Information

Raspberry Pi 5 Model B Rev 1.0
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"

Linux rpi5 6.12.47+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/Linux

Logs

No response

Additional context

No response

Activity

  1. changed the title [-]Cannot disable gamma corection for LED (RPi5 ws2812-pio-rp1 module)[/-] [+]Cannot disable gamma corection for LEDs (RPi5 ws2812-pio-rp1 module)[/+] on Oct 25, 2025
  2. pelwell commented on Oct 26, 2025

    @pelwell
    Contributor

    That's a fair point. It would be easy to use a magic brightness value - 0, say - to disable the gamma curve. Would that work for you?

  3. pelwell commented on Oct 26, 2025

    @pelwell
    Contributor

    #7110 is an untested implementation of my idea above. To bypass the gamma curve, add the parameter brightness=0 to the dtoverlay line, e.g.:

    dtoverlay=ws2812-pio,gpio=18,num_leds=30,rgbw,brightness=0
    

    By the time you read this you should be able to install a trial kernel using sudo rpi-update pulls/7110. Be careful to back up any important data first, and be extra cautious if you rely on auto_initramfs=1 in order to boot (try booting with it set to 0 before installing the new kernel).

  4. awawa-dev commented on Oct 26, 2025

    @awawa-dev
    Author

    Hi Phil,
    Thank you so much for the quick response. It works great now, I'm using a magic byte to set the brightness to 0 to disable gamma. Updated measurements made using a logic analyzer: awawa-dev/HyperHDR#1317

  5. pelwell commented on Oct 31, 2025

    @pelwell
    Contributor

    This issue has now been resolved.

  6. 125 remaining items

  7. added a commit that references this issue on Oct 26, 2026
  8. added a commit that references this issue on Nov 1, 2026
  9. added a commit that references this issue on Nov 4, 2026
  10. added a commit that references this issue on Nov 13, 2026
  11. added a commit that references this issue on Nov 16, 2026
  12. added a commit that references this issue on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions