History

drm/docs: Document where the C8 color lut is stored

Also add notes that for atomic drivers it's really somewhere else and no longer in struct drm_crtc. Maybe we should put a bigger warning here that this is confusing, since the pixel format is a plane property, but the GAMMA_LUT property is on the crtc. But I think we can fix this if/when someone finds a need for a per-plane CLUT, since I'm not sure such hw even exists. I'm also not sure whether even hardware with a CLUT and a full color correction pipeline with degamm/cgm/gamma exists. Motivated by comments from Geert that we have a gap here. v2: More names for color luts (Laurent).

Daniel Vetter committed 4 years ago

Commit 4fd5e721 parent 8b250cd2 files · +14 −0Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/drm/drm_crtc.h+10−0
@@ -285,6 +285,10 @@ struct drm_crtc_state { · 284 unmodified lines
285 * Lookup table for converting pixel data after the color conversion285 * Lookup table for converting pixel data after the color conversion
286 * matrix @ctm. See drm_crtc_enable_color_mgmt(). The blob (if not286 * matrix @ctm. See drm_crtc_enable_color_mgmt(). The blob (if not
287 * NULL) is an array of &struct drm_color_lut.287 * NULL) is an array of &struct drm_color_lut.
288 *
289 * Note that for mostly historical reasons stemming from Xorg heritage,
290 * this is also used to store the color map (also sometimes color lut,
291 * CLUT or color palette) for indexed formats like DRM_FORMAT_C8.
288 */292 */
289 struct drm_property_blob *gamma_lut;293 struct drm_property_blob *gamma_lut;
290 294
@@ -1075,12 +1079,18 @@ struct drm_crtc { · 784 unmodified lines
1075 /**1079 /**
1076 * @gamma_size: Size of legacy gamma ramp reported to userspace. Set up1080 * @gamma_size: Size of legacy gamma ramp reported to userspace. Set up
1077 * by calling drm_mode_crtc_set_gamma_size().1081 * by calling drm_mode_crtc_set_gamma_size().
1082 *
1083 * Note that atomic drivers need to instead use
1084 * &drm_crtc_state.gamma_lut. See drm_crtc_enable_color_mgmt().
1078 */1085 */
1079 uint32_t gamma_size;1086 uint32_t gamma_size;
1080 1087
1081 /**1088 /**
1082 * @gamma_store: Gamma ramp values used by the legacy SETGAMMA and1089 * @gamma_store: Gamma ramp values used by the legacy SETGAMMA and
1083 * GETGAMMA IOCTls. Set up by calling drm_mode_crtc_set_gamma_size().1090 * GETGAMMA IOCTls. Set up by calling drm_mode_crtc_set_gamma_size().
1091 *
1092 * Note that atomic drivers need to instead use
1093 * &drm_crtc_state.gamma_lut. See drm_crtc_enable_color_mgmt().
1084 */1094 */
1085 uint16_t *gamma_store;1095 uint16_t *gamma_store;
1086 1096

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t