drm/doc: Interlink color manager docs better
Subsystems (2)
PATCH 1/1 drm/doc: Interlink color manager docs better
Motivated by a request from Eric.
--- drivers/gpu/drm/drm_atomic_helper.c | 3 ++- drivers/gpu/drm/drm_color_mgmt.c | 9 ++++++--- include/drm/drm_crtc.h | 31 +++++++++++++++++++++++++------ 3 files changed, 33 insertions(+), 10 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +2 -1
@@ -3518,7 +3518,8 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state);* * Implements support for legacy gamma correction table for drivers * that support color management through the DEGAMMA_LUT/GAMMA_LUT -* properties. +* properties. See drm_crtc_enable_color_mgmt() and the containing chapter for +* how the atomic color management and gamma tables work. */ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue,
drivers/gpu/drm/drm_color_mgmt.c +6 -3
@@ -43,7 +43,8 @@* * Setting this to NULL (blob property value set to 0) means a * linear/pass-thru gamma table should be used. This is generally the -* driver boot-up state too. +* driver boot-up state too. Drivers can access this blob through +* &drm_crtc_state.degamma_lut. * * “DEGAMMA_LUT_SIZE”: * Unsinged range property to give the size of the lookup table to be set
@@ -60,7 +61,8 @@* * Setting this to NULL (blob property value set to 0) means a * unit/pass-thru matrix should be used. This is generally the driver -* boot-up state too. +* boot-up state too. Drivers can access the blob for the color conversion +* matrix through &drm_crtc_state.ctm. * * “GAMMA_LUT”: * Blob property to set the gamma lookup table (LUT) mapping pixel data
@@ -72,7 +74,8 @@* * Setting this to NULL (blob property value set to 0) means a * linear/pass-thru gamma table should be used. This is generally the -* driver boot-up state too. +* driver boot-up state too. Drivers can access this blob through +* &drm_crtc_state.gamma_lut. * * “GAMMA_LUT_SIZE”: * Unsigned range property to give the size of the lookup table to be set
include/drm/drm_crtc.h +25 -6
@@ -93,11 +93,6 @@ struct drm_plane_helper_funcs;* @adjusted_mode: for use by helpers and drivers to compute adjusted mode timings * @mode: current mode timings * @mode_blob: &drm_property_blob for @mode -* @degamma_lut: Lookup table for converting framebuffer pixel data -* before apply the conversion matrix -* @ctm: Transformation matrix -* @gamma_lut: Lookup table for converting pixel data after the -* conversion matrix * @state: backpointer to global drm_atomic_state * * Note that the distinction between @enable and @active is rather subtile:
@@ -144,9 +139,27 @@ struct drm_crtc_state {/* blob property to expose current mode to atomic userspace */ struct drm_property_blob *mode_blob; -/* blob property to expose color management to userspace */ +/** +* @degamma_lut: +* +* Lookup table for converting framebuffer pixel data before apply the +* color conversion matrix @ctm. See drm_crtc_enable_color_mgmt(). +*/ struct drm_property_blob *degamma_lut; + +/** +* @ctm: +* +* Color transformation matrix. See drm_crtc_enable_color_mgmt(). +*/ struct drm_property_blob *ctm; + +/** +* @gamma_lut: +* +* Lookup table for converting pixel data after the color conversion +* matrix @ctm. See drm_crtc_enable_color_mgmt(). +*/ struct drm_property_blob *gamma_lut;/**
@@ -313,6 +326,12 @@ struct drm_crtc_funcs {* * This callback is optional. * +* Atomic drivers who want to support gamma tables should implement the +* atomic color management support, enabled by calling +* drm_crtc_enable_color_mgmt(), which then supports the legacy gamma +* interface through the drm_atomic_helper_legacy_gamma_set() +* compatibility implementation. +* * NOTE: * * Drivers that support gamma tables and also fbdev emulation through
Signature · 6 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✓ Fi.CI.BAT: success for drm/doc: Interlink color manager docs better
== Series Details ==
== Series Details ==
Series: drm/doc: Interlink color manager docs better
URL : https://patchwork.freedesktop.org/series/22935/
State : success
== Summary ==
Series 22935v1 drm/doc: Interlink color manager docs better
https://patchwork.freedesktop.org/api/1.0/series/22935/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) fdo#100125
Test kms_flip:
Subgroup basic-flip-vs-modeset:
dmesg-warn -> PASS (fi-byt-j1900) fdo#100652fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fdo#100652 https://bugs.freedesktop.org/show_bug.cgi?id=100652
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:434s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:430s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:579s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:506s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time:560s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:487s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:481s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:409s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:405s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:424s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:492s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:465s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:461s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:569s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:450s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:567s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:457s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:494s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:430s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:534s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:407s
a428480d2c4f63cf97da04b4e2f461de6249fe28 drm-tip: 2017y-04m-12d-14h-13m-44s UTC integration manifest a5f562a drm/doc: Interlink color manager docs better
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4494/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
I have a tiny suggestion down there. Regardless this is :
Quoted 76 lines · Daniel Vetter
Motivated by a request from Eric.
Cc Eric Anholt <[email protected]>Cc Lionel Landwerlin <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 3 ++- drivers/gpu/drm/drm_color_mgmt.c | 9 ++++++--- include/drm/drm_crtc.h | 31 +++++++++++++++++++++++++------ 3 files changed, 33 insertions(+), 10 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +2
-1@@ -3518,7 +3518,8 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state);* * Implements support for legacy gamma correction table for drivers * that support color management through the DEGAMMA_LUT/GAMMA_LUT -* properties. +* properties. See drm_crtc_enable_color_mgmt() and the containing chapter for +* how the atomic color management and gamma tables work. */ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue,drivers/gpu/drm/drm_color_mgmt.c +6
-3@@ -43,7 +43,8 @@* * Setting this to NULL (blob property value set to 0) means a * linear/pass-thru gamma table should be used. This is generally the -* driver boot-up state too. +* driver boot-up state too. Drivers can access this blob through +* &drm_crtc_state.degamma_lut. * * “DEGAMMA_LUT_SIZE”: * Unsinged range property to give the size of the lookup table to be set @@ -60,7 +61,8 @@* * Setting this to NULL (blob property value set to 0) means a * unit/pass-thru matrix should be used. This is generally the driver -* boot-up state too. +* boot-up state too. Drivers can access the blob for the color conversion +* matrix through &drm_crtc_state.ctm. * * “GAMMA_LUT”: * Blob property to set the gamma lookup table (LUT) mapping pixel data @@ -72,7 +74,8 @@* * Setting this to NULL (blob property value set to 0) means a * linear/pass-thru gamma table should be used. This is generally the -* driver boot-up state too. +* driver boot-up state too. Drivers can access this blob through +* &drm_crtc_state.gamma_lut. * * “GAMMA_LUT_SIZE”: * Unsigned range property to give the size of the lookup table to be set include/drm/drm_crtc.h +0
-5@@ -93,11 +93,6 @@ struct drm_plane_helper_funcs;* @adjusted_mode: for use by helpers and drivers to compute adjusted mode timings * @mode: current mode timings * @mode_blob: &drm_property_blob for @mode -* @degamma_lut: Lookup table for converting framebuffer pixel data -* before apply the conversion matrix -* @ctm: Transformation matrix -* @gamma_lut: Lookup table for converting pixel data after the -* conversion matrix * @state: backpointer to global drm_atomic_state * * Note that the distinction between @enable and @active is rather subtile:
include/drm/drm_crtc.h struct drm_crtc_state { · line 146
Quoted 9 lines
include/drm/drm_crtc.h +5
-1@@ -144,9 +139,27 @@ struct drm_crtc_state {/* blob property to expose current mode to atomic userspace */ struct drm_property_blob *mode_blob; -/* blob property to expose color management to userspace */ +/** +* @degamma_lut: +* +* Lookup table for converting framebuffer pixel data before apply the +* color conversion matrix @ctm. See drm_crtc_enable_color_mgmt().
Maybe you can add that the blob is either NULL or an array of drm_color_lut.
include/drm/drm_crtc.h struct drm_crtc_state { · line 153
Quoted 7 lines
include/drm/drm_crtc.h +6
-0+*/ struct drm_property_blob *degamma_lut; + +/** +* @ctm: +* +* Color transformation matrix. See drm_crtc_enable_color_mgmt().
Here is blob is drm_color_ctm.
include/drm/drm_crtc.h struct drm_crtc_state { · line 161
Quoted 8 lines
include/drm/drm_crtc.h +7
-0+*/ struct drm_property_blob *ctm; + +/** +* @gamma_lut: +* +* Lookup table for converting pixel data after the color conversion +* matrix @ctm. See drm_crtc_enable_color_mgmt().
Here again NULL or an array of drm_color_lut.
Quoted 7 lines
include/drm/drm_crtc.h +1
-0+*/ struct drm_property_blob *gamma_lut;/** @@ -313,6 +326,12 @@ struct drm_crtc_funcs {* * This callback is optional.
include/drm/drm_crtc.h struct drm_crtc_funcs { · line 337
Quoted 10 lines
include/drm/drm_crtc.h +6
-0* +* Atomic drivers who want to support gamma tables should implement the +* atomic color management support, enabled by calling +* drm_crtc_enable_color_mgmt(), which then supports the legacy gamma +* interface through the drm_atomic_helper_legacy_gamma_set() +* compatibility implementation. +* * NOTE: * * Drivers that support gamma tables and also fbdev emulation through
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 3 lines · Lionel Landwerlin
I have a tiny suggestion down there. Regardless this is :
Reviewed-by Lionel Landwerlin <[email protected]>
Thanks for the suggestions, polished while applying the patch. -Daniel
Quoted 128 lines · Daniel Vetter
Quoted 76 lines
Motivated by a request from Eric.
Cc Eric Anholt <[email protected]>Cc Lionel Landwerlin <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 3 ++- drivers/gpu/drm/drm_color_mgmt.c | 9 ++++++--- include/drm/drm_crtc.h | 31 +++++++++++++++++++++++++------ 3 files changed, 33 insertions(+), 10 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +2
-1@@ -3518,7 +3518,8 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state);* * Implements support for legacy gamma correction table for drivers * that support color management through the DEGAMMA_LUT/GAMMA_LUT -* properties. +* properties. See drm_crtc_enable_color_mgmt() and the containing chapter for +* how the atomic color management and gamma tables work. */ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue,drivers/gpu/drm/drm_color_mgmt.c +6
-3@@ -43,7 +43,8 @@* * Setting this to NULL (blob property value set to 0) means a * linear/pass-thru gamma table should be used. This is generally the -* driver boot-up state too. +* driver boot-up state too. Drivers can access this blob through +* &drm_crtc_state.degamma_lut. * * “DEGAMMA_LUT_SIZE”: * Unsinged range property to give the size of the lookup table to be set @@ -60,7 +61,8 @@* * Setting this to NULL (blob property value set to 0) means a * unit/pass-thru matrix should be used. This is generally the driver -* boot-up state too. +* boot-up state too. Drivers can access the blob for the color conversion +* matrix through &drm_crtc_state.ctm. * * “GAMMA_LUT”: * Blob property to set the gamma lookup table (LUT) mapping pixel data @@ -72,7 +74,8 @@* * Setting this to NULL (blob property value set to 0) means a * linear/pass-thru gamma table should be used. This is generally the -* driver boot-up state too. +* driver boot-up state too. Drivers can access this blob through +* &drm_crtc_state.gamma_lut. * * “GAMMA_LUT_SIZE”: * Unsigned range property to give the size of the lookup table to be set include/drm/drm_crtc.h +0
-5@@ -93,11 +93,6 @@ struct drm_plane_helper_funcs;* @adjusted_mode: for use by helpers and drivers to compute adjusted mode timings * @mode: current mode timings * @mode_blob: &drm_property_blob for @mode -* @degamma_lut: Lookup table for converting framebuffer pixel data -* before apply the conversion matrix -* @ctm: Transformation matrix -* @gamma_lut: Lookup table for converting pixel data after the -* conversion matrix * @state: backpointer to global drm_atomic_state * * Note that the distinction between @enable and @active is rather subtile: include/drm/drm_crtc.h struct drm_crtc_state { · line 145
Quoted 8 lines
include/drm/drm_crtc.h +5
-1@@ -144,9 +139,27 @@ struct drm_crtc_state {/* blob property to expose current mode to atomic userspace */ struct drm_property_blob *mode_blob; -/* blob property to expose color management to userspace */ +/** +* @degamma_lut: +* +* Lookup table for converting framebuffer pixel data before apply the +* color conversion matrix @ctm. See drm_crtc_enable_color_mgmt(). Maybe you can add that the blob is either NULL or an array of
drm_color_lut.include/drm/drm_crtc.h struct drm_crtc_state { · line 153
Quoted 7 lines
include/drm/drm_crtc.h +6
-0+*/ struct drm_property_blob *degamma_lut; + +/** +* @ctm: +* +* Color transformation matrix. See drm_crtc_enable_color_mgmt(). Here is blob is
drm_color_ctm.include/drm/drm_crtc.h struct drm_crtc_state { · line 161
Quoted 8 lines
include/drm/drm_crtc.h +7
-0+*/ struct drm_property_blob *ctm; + +/** +* @gamma_lut: +* +* Lookup table for converting pixel data after the color conversion +* matrix @ctm. See drm_crtc_enable_color_mgmt(). Here again NULL or an array of
drm_color_lut.Quoted 16 lines
include/drm/drm_crtc.h +7
-0+*/ struct drm_property_blob *gamma_lut;/** @@ -313,6 +326,12 @@ struct drm_crtc_funcs {* * This callback is optional. * +* Atomic drivers who want to support gamma tables should implement the +* atomic color management support, enabled by calling +* drm_crtc_enable_color_mgmt(), which then supports the legacy gamma +* interface through the drm_atomic_helper_legacy_gamma_set() +* compatibility implementation. +* * NOTE: * * Drivers that support gamma tables and also fbdev emulation through
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx