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
285285 * Lookup table for converting pixel data after the color conversion
286286 * matrix @ctm. See drm_crtc_enable_color_mgmt(). The blob (if not
287287 * 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.
288292 */
289293 struct drm_property_blob *gamma_lut;
290294
@@ -1075,12 +1079,18 @@ struct drm_crtc { · 784 unmodified lines
10751079 /**
10761080 * @gamma_size: Size of legacy gamma ramp reported to userspace. Set up
10771081 * 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().
10781085 */
10791086 uint32_t gamma_size;
10801087
10811088 /**
10821089 * @gamma_store: Gamma ramp values used by the legacy SETGAMMA and
10831090 * 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().
10841094 */
10851095 uint16_t *gamma_store;
10861096

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