-
Notifications
You must be signed in to change notification settings - Fork 5.2k
drm: Check whether the gamma lut has changed before updating #4664
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
Conversation
drm_crtc_legacy_gamma_set updates the gamma_lut blob unconditionally, which leads to unnecessary reprogramming of hardware. Check whether the blob contents has actually changed before signalling that it has been updated. Signed-off-by: Dave Stevenson <[email protected]>
@mripard Thoughts? Is it better to skip the |
Shame you have to do so much work before not doing the actual change. Can the change be rejected earlier in any way? |
Not within the kernel AFAIK. If you could patch X to not try set the gamma parameter seemingly every time you open a new window, then that would be nicer, but I'm not going hacking in X. |
That looks good to me |
Your view on killing the drm_atomic_commit as well? Worth it or not? The easiest abort is actually to flip it around to
which does the puts for us. It'd be worth renaming |
I was thinking earlier in the function itself, but I suspect you need to build the blob in order to test it quickly. Not looked hard enough to see if its possible. |
No.
Without running through the for loop you don't have the data in the same format to memcmp. |
Side discussion with Maxime. drm_atomic_commit has other side effects, so safest to execute it even though nothing has changed. That means that means that this PR is complete as is. |
kernel: drm: Check whether the gamma lut has changed before updating See: raspberrypi/linux#4664 kernel: brcmfmac: Protect against reprobing See: #1644 firmware: platform: Fix incorrect turbo voltage scaling on Pi0 See: raspberrypi/documentation#2255
kernel: drm: Check whether the gamma lut has changed before updating See: raspberrypi/linux#4664 kernel: brcmfmac: Protect against reprobing See: raspberrypi/firmware#1644 firmware: platform: Fix incorrect turbo voltage scaling on Pi0 See: raspberrypi/documentation#2255
drm_crtc_legacy_gamma_set updates the gamma_lut blob unconditionally,
which leads to unnecessary reprogramming of hardware.
Check whether the blob contents has actually changed before
signalling that it has been updated.
Signed-off-by: Dave Stevenson [email protected]
See #4435.