diff mbox

[01/22] drm: Create Color Management DRM properties

Message ID 1444418952-5671-2-git-send-email-shashank.sharma@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sharma, Shashank Oct. 9, 2015, 7:28 p.m. UTC
Color Management is an extension to DRM framework. It allows
abstraction of hardware color correction and enhancement capabilities
by virtue of DRM properties.

There are two major types of color correction supported by DRM
color manager:
- CTM: color transformation matrix, properties where a correction
       matrix is used for color correction.
- Palette correction: Where direct LUT values are sent to be applied
       on a color palette.

This patch initializes color management framework by:
1. Introducing new pointers in DRM mode_config structure to
   carry CTM and Palette color correction properties.
2. Creating these DRM properties in DRM standard properties creation
   sequence.

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com>
---
 drivers/gpu/drm/drm_crtc.c | 19 +++++++++++++++++++
 include/drm/drm_crtc.h     |  5 +++++
 2 files changed, 24 insertions(+)

Comments

kernel test robot Oct. 9, 2015, 7:48 p.m. UTC | #1
Hi Shashank,

[auto build test WARNING on next-20151009 -- if it's inappropriate base, please ignore]

reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'fmt'
   include/drm/drm_crtc.h:310: warning: No description found for parameter 'mode_blob'
   include/drm/drm_crtc.h:742: warning: No description found for parameter 'tile_blob_ptr'
   include/drm/drm_crtc.h:781: warning: No description found for parameter 'rotation'
   include/drm/drm_crtc.h:877: warning: No description found for parameter 'mutex'
   include/drm/drm_crtc.h:877: warning: No description found for parameter 'helper_private'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tile_idr'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'delayed_event'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'edid_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'dpms_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'path_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tile_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'plane_type_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'rotation_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_src_x'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_src_y'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_src_w'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_src_h'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_crtc_x'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_crtc_y'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_crtc_w'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_crtc_h'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_fb_id'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_crtc_id'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_active'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'prop_mode_id'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'dvi_i_subconnector_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'dvi_i_select_subconnector_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_subconnector_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_select_subconnector_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_mode_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_left_margin_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_right_margin_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_top_margin_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_bottom_margin_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_brightness_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_contrast_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_flicker_reduction_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_overscan_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_saturation_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'tv_hue_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'scaling_mode_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'aspect_ratio_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'dirty_info_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'suggested_x_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'suggested_y_property'
>> include/drm/drm_crtc.h:1167: warning: No description found for parameter 'cm_palette_before_ctm_property'
>> include/drm/drm_crtc.h:1167: warning: No description found for parameter 'cm_palette_after_ctm_property'
>> include/drm/drm_crtc.h:1167: warning: No description found for parameter 'cm_ctm_property'
   include/drm/drm_crtc.h:1167: warning: No description found for parameter 'allow_fb_modifiers'
   include/drm/drm_fb_helper.h:148: warning: No description found for parameter 'connector_info'
   include/drm/drm_dp_helper.h:713: warning: No description found for parameter 'i2c_nack_count'
   include/drm/drm_dp_helper.h:713: warning: No description found for parameter 'i2c_defer_count'
   drivers/gpu/drm/drm_dp_mst_topology.c:2226: warning: No description found for parameter 'connector'
   include/drm/drm_dp_mst_helper.h:97: warning: No description found for parameter 'cached_edid'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'max_dpcd_transaction_bytes'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'sink_count'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'total_slots'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'avail_slots'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'total_pbn'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'qlock'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_msg_downq'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_msg_upq'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_down_in_progress'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_up_in_progress'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'payload_lock'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'proposed_vcpis'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'payloads'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'payload_mask'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'vcpi_mask'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_waitq'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'work'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_work'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'destroy_connector_list'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'destroy_connector_lock'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'destroy_connector_work'
   drivers/gpu/drm/drm_dp_mst_topology.c:2226: warning: No description found for parameter 'connector'
   drivers/gpu/drm/drm_irq.c:173: warning: No description found for parameter 'flags'
   include/drm/drmP.h:164: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:180: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:198: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:238: warning: No description found for parameter 'dev'
   include/drm/drmP.h:238: warning: No description found for parameter 'data'
   include/drm/drmP.h:238: warning: No description found for parameter 'file_priv'
   include/drm/drmP.h:271: warning: No description found for parameter 'ioctl'
   include/drm/drmP.h:271: warning: No description found for parameter '_func'
   include/drm/drmP.h:271: warning: No description found for parameter '_flags'
   include/drm/drmP.h:344: warning: cannot understand function prototype: 'struct drm_lock_data '
   include/drm/drmP.h:397: warning: cannot understand function prototype: 'struct drm_driver '
   include/drm/drmP.h:647: warning: cannot understand function prototype: 'struct drm_info_list '
   include/drm/drmP.h:657: warning: cannot understand function prototype: 'struct drm_info_node '
   include/drm/drmP.h:667: warning: cannot understand function prototype: 'struct drm_minor '
   include/drm/drmP.h:715: warning: cannot understand function prototype: 'struct drm_device '
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2582: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_gem.c:421: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:421: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:421: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:686: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:686: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:686: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:767: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:767: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:767: warning: No description found for parameter 'args'
   drivers/gpu/drm/i915/i915_gem.c:767: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1029: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1029: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1029: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1194: warning: No description found for parameter 'rps'
   drivers/gpu/drm/i915/i915_gem.c:1400: warning: No description found for parameter 'req'
   drivers/gpu/drm/i915/i915_gem.c:1435: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:1435: warning: No description found for parameter 'readonly'
   drivers/gpu/drm/i915/i915_gem.c:1558: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1558: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1558: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1621: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1621: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1621: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1666: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1666: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1666: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1954: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1954: warning: No description found for parameter 'size'
   drivers/gpu/drm/i915/i915_gem.c:1954: warning: No description found for parameter 'tiling_mode'
   drivers/gpu/drm/i915/i915_gem.c:1954: warning: No description found for parameter 'fenced'
   drivers/gpu/drm/i915/i915_gem.c:1954: warning: Excess function parameter 'obj' description in 'i915_gem_get_gtt_alignment'
   drivers/gpu/drm/i915/i915_gem.c:2816: warning: No description found for parameter 'ring'
   drivers/gpu/drm/i915/i915_gem.c:2945: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:2995: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:2995: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:2995: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:2995: warning: Excess function parameter 'DRM_IOCTL_ARGS' description in 'i915_gem_wait_ioctl'
   drivers/gpu/drm/i915/i915_gem.c:3364: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:3364: warning: No description found for parameter 'vm'
   drivers/gpu/drm/i915/i915_gem.c:3364: warning: No description found for parameter 'ggtt_view'
   drivers/gpu/drm/i915/i915_gem.c:3364: warning: No description found for parameter 'alignment'
   drivers/gpu/drm/i915/i915_gem.c:3364: warning: No description found for parameter 'flags'
   drivers/gpu/drm/i915/i915_gem.c:3599: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:3599: warning: No description found for parameter 'write'
   drivers/gpu/drm/i915/i915_gem.c:3891: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:3891: warning: No description found for parameter 'write'
   drivers/gpu/drm/i915/intel_lrc.c:871: warning: No description found for parameter 'params'
   drivers/gpu/drm/i915/intel_lrc.c:871: warning: Excess function parameter 'dev' description in 'intel_execlists_submission'

vim +/cm_palette_before_ctm_property +1167 include/drm/drm_crtc.h

9302c2fa Shashank Sharma 2015-10-10  1151  	/* Color Management Properties */
9302c2fa Shashank Sharma 2015-10-10  1152  	struct drm_property *cm_palette_before_ctm_property;
9302c2fa Shashank Sharma 2015-10-10  1153  	struct drm_property *cm_palette_after_ctm_property;
9302c2fa Shashank Sharma 2015-10-10  1154  	struct drm_property *cm_ctm_property;
9302c2fa Shashank Sharma 2015-10-10  1155  
019d96cb Dave Airlie     2011-09-29  1156  	/* dumb ioctl parameters */
019d96cb Dave Airlie     2011-09-29  1157  	uint32_t preferred_depth, prefer_shadow;
62f2104f Keith Packard   2013-07-22  1158  
62f2104f Keith Packard   2013-07-22  1159  	/* whether async page flip is supported or not */
62f2104f Keith Packard   2013-07-22  1160  	bool async_page_flip;
8716ed4e Alex Deucher    2014-02-12  1161  
e3eb3250 Rob Clark       2015-02-05  1162  	/* whether the driver supports fb modifiers */
e3eb3250 Rob Clark       2015-02-05  1163  	bool allow_fb_modifiers;
e3eb3250 Rob Clark       2015-02-05  1164  
8716ed4e Alex Deucher    2014-02-12  1165  	/* cursor size */
8716ed4e Alex Deucher    2014-02-12  1166  	uint32_t cursor_width, cursor_height;
f453ba04 Dave Airlie     2008-11-07 @1167  };
f453ba04 Dave Airlie     2008-11-07  1168  
dd275956 Rob Clark       2014-11-25  1169  /**
dd275956 Rob Clark       2014-11-25  1170   * drm_for_each_plane_mask - iterate over planes specified by bitmask
dd275956 Rob Clark       2014-11-25  1171   * @plane: the loop cursor
dd275956 Rob Clark       2014-11-25  1172   * @dev: the DRM device
dd275956 Rob Clark       2014-11-25  1173   * @plane_mask: bitmask of plane indices
dd275956 Rob Clark       2014-11-25  1174   *
dd275956 Rob Clark       2014-11-25  1175   * Iterate over all planes specified by bitmask.

:::::: The code at line 1167 was first introduced by commit
:::::: f453ba0460742ad027ae0c4c7d61e62817b3e7ef DRM: add mode setting support

:::::: TO: Dave Airlie <airlied@redhat.com>
:::::: CC: Dave Airlie <airlied@linux.ie>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index e600a5f..30bd43d 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1472,6 +1472,25 @@  static int drm_mode_create_standard_properties(struct drm_device *dev)
 		return -ENOMEM;
 	dev->mode_config.prop_mode_id = prop;
 
+	/* Color Management properties */
+	prop = drm_property_create(dev,
+			DRM_MODE_PROP_BLOB, "PALETTE_AFTER_CTM", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.cm_palette_after_ctm_property = prop;
+
+	prop = drm_property_create(dev,
+			DRM_MODE_PROP_BLOB, "PALETTE_BEFORE_CTM", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.cm_palette_before_ctm_property = prop;
+
+	prop = drm_property_create(dev,
+			DRM_MODE_PROP_BLOB, "CTM", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.cm_ctm_property = prop;
+
 	return 0;
 }
 
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 683f142..debd6c2 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1146,6 +1146,11 @@  struct drm_mode_config {
 	struct drm_property *suggested_x_property;
 	struct drm_property *suggested_y_property;
 
+	/* Color Management Properties */
+	struct drm_property *cm_palette_before_ctm_property;
+	struct drm_property *cm_palette_after_ctm_property;
+	struct drm_property *cm_ctm_property;
+
 	/* dumb ioctl parameters */
 	uint32_t preferred_depth, prefer_shadow;