diff mbox

[v4,06/11] drm: Read DP branch device id

Message ID 1465219753-3737-7-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola June 6, 2016, 1:29 p.m. UTC
Read DisplayPort branch device id string.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 12 ++++++++++++
 include/drm/drm_dp_helper.h     |  2 ++
 2 files changed, 14 insertions(+)

Comments

kernel test robot June 6, 2016, 5:55 p.m. UTC | #1
Hi,

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.7-rc2 next-20160606]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mika-Kahola/drm-i915-DP-branch-devices/20160606-213650
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/i915_irq.c:606: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: Excess function parameter 'dev' description in 'i915_enable_asle_pipestat'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: Excess function parameter 'dev' description in 'i915_reset_and_wakeup'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: Excess function parameter 'dev' description in 'i915_handle_error'
   include/drm/drm_crtc.h:374: warning: No description found for parameter 'mode_blob'
   include/drm/drm_crtc.h:789: warning: No description found for parameter 'name'
   include/drm/drm_crtc.h:1248: warning: No description found for parameter 'connector_id'
   include/drm/drm_crtc.h:1248: warning: No description found for parameter 'tile_blob_ptr'
   include/drm/drm_crtc.h:1287: warning: No description found for parameter 'rotation'
   include/drm/drm_crtc.h:1549: warning: No description found for parameter 'name'
   include/drm/drm_crtc.h:1549: warning: No description found for parameter 'mutex'
   include/drm/drm_crtc.h:1549: warning: No description found for parameter 'helper_private'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tile_idr'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'connector_ida'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'delayed_event'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'edid_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'dpms_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'path_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tile_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'plane_type_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'rotation_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_src_x'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_src_y'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_src_w'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_src_h'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_crtc_x'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_crtc_y'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_crtc_w'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_crtc_h'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_fb_id'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_crtc_id'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_active'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'prop_mode_id'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'dvi_i_subconnector_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'dvi_i_select_subconnector_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_subconnector_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_select_subconnector_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_mode_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_left_margin_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_right_margin_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_top_margin_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_bottom_margin_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_brightness_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_contrast_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_flicker_reduction_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_overscan_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_saturation_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'tv_hue_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'scaling_mode_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'aspect_ratio_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'dirty_info_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'suggested_x_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'suggested_y_property'
   include/drm/drm_crtc.h:2185: warning: No description found for parameter 'allow_fb_modifiers'
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: No description found for parameter 'nonblock'
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: Excess function parameter 'nonblocking' description in 'drm_atomic_helper_commit'
   drivers/gpu/drm/drm_atomic_helper.c:2946: warning: No description found for parameter 'start'
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: No description found for parameter 'nonblock'
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: Excess function parameter 'nonblocking' description in 'drm_atomic_helper_commit'
   drivers/gpu/drm/drm_atomic_helper.c:2946: warning: No description found for parameter 'start'
   drivers/gpu/drm/drm_atomic_helper.c:1: warning: no structured comments found
       Was looking for 'implementing async commit'.
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: No description found for parameter 'nonblock'
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: Excess function parameter 'nonblocking' description in 'drm_atomic_helper_commit'
   drivers/gpu/drm/drm_atomic_helper.c:2946: warning: No description found for parameter 'start'
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: No description found for parameter 'nonblock'
   drivers/gpu/drm/drm_atomic_helper.c:1150: warning: Excess function parameter 'nonblocking' description in 'drm_atomic_helper_commit'
   drivers/gpu/drm/drm_atomic_helper.c:2946: warning: No description found for parameter 'start'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'dev'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'file_priv'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'mode_cmd'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'funcs'
   drivers/gpu/drm/drm_fb_cma_helper.c:233: warning: No description found for parameter 'dev'
   drivers/gpu/drm/drm_fb_cma_helper.c:233: warning: No description found for parameter 'file_priv'
   drivers/gpu/drm/drm_fb_cma_helper.c:233: warning: No description found for parameter 'mode_cmd'
   drivers/gpu/drm/drm_fb_cma_helper.c:285: warning: No description found for parameter 'm'
   drivers/gpu/drm/drm_fb_cma_helper.c:285: warning: No description found for parameter 'arg'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'dev'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'file_priv'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'mode_cmd'
   drivers/gpu/drm/drm_fb_cma_helper.c:173: warning: No description found for parameter 'funcs'
   drivers/gpu/drm/drm_fb_cma_helper.c:233: warning: No description found for parameter 'dev'
   drivers/gpu/drm/drm_fb_cma_helper.c:233: warning: No description found for parameter 'file_priv'
   drivers/gpu/drm/drm_fb_cma_helper.c:233: warning: No description found for parameter 'mode_cmd'
   drivers/gpu/drm/drm_fb_cma_helper.c:285: warning: No description found for parameter 'm'
   drivers/gpu/drm/drm_fb_cma_helper.c:285: warning: No description found for parameter 'arg'
   drivers/gpu/drm/drm_dp_helper.c:451: warning: No description found for parameter 'aux'
>> drivers/gpu/drm/drm_dp_helper.c:548: warning: No description found for parameter 'id[6]'
   include/drm/drm_dp_helper.h:754: warning: No description found for parameter 'i2c_nack_count'
   include/drm/drm_dp_helper.h:754: warning: No description found for parameter 'i2c_defer_count'
   drivers/gpu/drm/drm_dp_helper.c:451: warning: No description found for parameter 'aux'
>> drivers/gpu/drm/drm_dp_helper.c:548: warning: No description found for parameter 'id[6]'
   drivers/gpu/drm/drm_dp_mst_topology.c:2383: warning: No description found for parameter 'connector'
   include/drm/drm_dp_mst_helper.h:92: warning: No description found for parameter 'cached_edid'
   include/drm/drm_dp_mst_helper.h:92: warning: No description found for parameter 'has_audio'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'max_dpcd_transaction_bytes'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'sink_count'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'total_slots'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'avail_slots'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'total_pbn'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'qlock'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'tx_msg_downq'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'tx_down_in_progress'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'payload_lock'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'proposed_vcpis'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'payloads'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'payload_mask'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'vcpi_mask'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'tx_waitq'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'work'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'tx_work'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'destroy_connector_list'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'destroy_connector_lock'
   include/drm/drm_dp_mst_helper.h:466: warning: No description found for parameter 'destroy_connector_work'
   drivers/gpu/drm/drm_dp_mst_topology.c:2383: warning: No description found for parameter 'connector'
   drivers/gpu/drm/drm_irq.c:158: warning: No description found for parameter 'flags'
   include/drm/drmP.h:169: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:185: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:203: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:248: warning: No description found for parameter 'dev'
   include/drm/drmP.h:248: warning: No description found for parameter 'data'
   include/drm/drmP.h:248: warning: No description found for parameter 'file_priv'
   include/drm/drmP.h:281: warning: No description found for parameter 'ioctl'
   include/drm/drmP.h:281: warning: No description found for parameter '_func'
   include/drm/drmP.h:281: warning: No description found for parameter '_flags'
   include/drm/drmP.h:363: warning: cannot understand function prototype: 'struct drm_lock_data '
   include/drm/drmP.h:411: warning: cannot understand function prototype: 'struct drm_driver '
   include/drm/drmP.h:677: warning: cannot understand function prototype: 'struct drm_info_list '
   include/drm/drmP.h:687: warning: cannot understand function prototype: 'struct drm_info_node '
   include/drm/drmP.h:697: warning: cannot understand function prototype: 'struct drm_minor '
   include/drm/drmP.h:745: warning: cannot understand function prototype: 'struct drm_device '
   drivers/gpu/drm/i915/intel_runtime_pm.c:2416: warning: No description found for parameter 'resume'
   drivers/gpu/drm/i915/intel_runtime_pm.c:2416: warning: No description found for parameter 'resume'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: Excess function parameter 'dev' description in 'i915_enable_asle_pipestat'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: Excess function parameter 'dev' description in 'i915_reset_and_wakeup'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: Excess function parameter 'dev' description in 'i915_handle_error'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: Excess function parameter 'dev' description in 'i915_enable_asle_pipestat'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: Excess function parameter 'dev' description in 'i915_reset_and_wakeup'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: Excess function parameter 'dev' description in 'i915_handle_error'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: Excess function parameter 'dev' description in 'i915_enable_asle_pipestat'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: Excess function parameter 'dev' description in 'i915_reset_and_wakeup'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: Excess function parameter 'dev' description in 'i915_handle_error'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:606: warning: Excess function parameter 'dev' description in 'i915_enable_asle_pipestat'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2538: warning: Excess function parameter 'dev' description in 'i915_reset_and_wakeup'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2700: warning: Excess function parameter 'dev' description in 'i915_handle_error'
   drivers/gpu/drm/i915/i915_vgpu.c:62: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_vgpu.c:62: warning: Excess function parameter 'dev' description in 'i915_check_vgpu'
   drivers/gpu/drm/i915/i915_vgpu.c:181: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_vgpu.c:181: warning: Excess function parameter 'dev_priv' description in 'intel_vgt_balloon'
   drivers/gpu/drm/i915/i915_vgpu.c:62: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_vgpu.c:62: warning: Excess function parameter 'dev' description in 'i915_check_vgpu'
   drivers/gpu/drm/i915/i915_vgpu.c:181: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_vgpu.c:181: warning: Excess function parameter 'dev_priv' description in 'intel_vgt_balloon'
   drivers/gpu/drm/i915/i915_gem.c:416: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:416: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:416: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:681: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:681: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:681: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:762: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:762: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:762: warning: No description found for parameter 'args'
   drivers/gpu/drm/i915/i915_gem.c:762: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1025: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1025: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1025: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1231: warning: No description found for parameter 'rps'
   drivers/gpu/drm/i915/i915_gem.c:1452: warning: No description found for parameter 'req'
   drivers/gpu/drm/i915/i915_gem.c:1479: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:1479: warning: No description found for parameter 'readonly'
   drivers/gpu/drm/i915/i915_gem.c:1596: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1596: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1596: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1659: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1659: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1659: warning: No description found for parameter 'file'

vim +548 drivers/gpu/drm/drm_dp_helper.c

   445	 *
   446	 * returns size of the port capabilites
   447	 */
   448	int drm_dp_downstream_port_cap(struct drm_dp_aux *aux,
   449				       const u8 dpcd[DP_RECEIVER_CAP_SIZE],
   450				       u8 port_cap[4])
 > 451	{
   452		int size;
   453		bool detailed_cap_info = dpcd[DP_DOWNSTREAMPORT_PRESENT] &
   454			DP_DETAILED_CAP_INFO_AVAILABLE;
   455	
   456		if (detailed_cap_info) {
   457			size = 4;
   458			drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, port_cap, size);
   459		} else {
   460			size = 1;
   461			drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, &port_cap[0], size);
   462		}
   463	
   464		return size;
   465	}
   466	EXPORT_SYMBOL(drm_dp_downstream_port_cap);
   467	
   468	/**
   469	 * drm_dp_downstream_type() - extract downstream port type
   470	 * @dpcd: DisplayPort configuration data
   471	 * @port_cap: port capabilities
   472	 *
   473	 * Returns type in success or negative error code on failure
   474	 */
   475	int drm_dp_downstream_type(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
   476				   const u8 port_cap[4])
   477	{
   478		return port_cap[0] & DP_DS_PORT_TYPE_MASK;
   479	}
   480	EXPORT_SYMBOL(drm_dp_downstream_type);
   481	
   482	/**
   483	 * drm_dp_downstream_max_clock() - extract branch device max
   484	 *                                 pixel rate for legacy VGA
   485	 *                                 converter or max TMDS clock
   486	 *                                 rate for others
   487	 * @dpcd: DisplayPort configuration data
   488	 * @port_cap: port capabilities
   489	 *
   490	 * Returns max clock in kHz on success or negative error code on failure
   491	 */
   492	int drm_dp_downstream_max_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
   493	                               const u8 port_cap[4])
   494	{
   495		int type = drm_dp_downstream_type(dpcd, port_cap);
   496		bool detailed_cap_info = dpcd[DP_DOWNSTREAMPORT_PRESENT] &
   497			DP_DETAILED_CAP_INFO_AVAILABLE;
   498	
   499		if (detailed_cap_info) {
   500			if (type == DP_DS_PORT_TYPE_VGA)
   501				return port_cap[1] * 8 * 1000;
   502			else if (type != DP_DS_PORT_TYPE_WIRELESS)
   503				return port_cap[1] * 2500;
   504		}
   505	
   506		return -EINVAL;
   507	}
   508	EXPORT_SYMBOL(drm_dp_downstream_max_clock);
   509	
   510	/**
   511	 * drm_dp_downstream_max_bpc() - extract branch device max
   512	 *                               bits per component
   513	 * @dpcd: DisplayPort configuration data
   514	 * @port_cap: port capabilities
   515	 *
   516	 * Returns max bpc on success or negative error code on failure
   517	 */
   518	int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
   519	                              const u8 port_cap[4])
   520	{
   521		int type = drm_dp_downstream_type(dpcd, port_cap);
   522		bool detailed_cap_info = dpcd[DP_DOWNSTREAMPORT_PRESENT] &
   523			DP_DETAILED_CAP_INFO_AVAILABLE;
   524	
   525		if (detailed_cap_info) {
   526			if (type != DP_DS_PORT_TYPE_WIRELESS) {
   527				int tmp;
   528				tmp = port_cap[2] & DP_DS_VGA_MAX_BPC_MASK;
   529	
   530				if (tmp == 0)
   531					return 8;
   532				else
   533					return 8 + (1<<tmp);
   534			}
   535		}
   536	
   537		return -EINVAL;
   538	}
   539	EXPORT_SYMBOL(drm_dp_downstream_max_bpc);
   540	
   541	/**
   542	 * drm_dp_downstream_id() - identify branch device
   543	 * @aux: DisplayPort AUX channel
   544	 *
   545	 * Returns branch device id on success or NULL on failure
   546	 */
   547	int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6])
 > 548	{
   549		return drm_dp_dpcd_read(aux, DP_BRANCH_ID, id, 6);
   550	}
   551	EXPORT_SYMBOL(drm_dp_downstream_id);

---
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_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index bac0ccc..c25bed9 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -538,6 +538,18 @@  int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
 }
 EXPORT_SYMBOL(drm_dp_downstream_max_bpc);
 
+/**
+ * drm_dp_downstream_id() - identify branch device
+ * @aux: DisplayPort AUX channel
+ *
+ * Returns branch device id on success or NULL on failure
+ */
+int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6])
+{
+	return drm_dp_dpcd_read(aux, DP_BRANCH_ID, id, 6);
+}
+EXPORT_SYMBOL(drm_dp_downstream_id);
+
 /*
  * I2C-over-AUX implementation
  */
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index d4abc38..37293a8 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -445,6 +445,7 @@ 
 #define DP_SOURCE_OUI			    0x300
 #define DP_SINK_OUI			    0x400
 #define DP_BRANCH_OUI			    0x500
+#define DP_BRANCH_ID                        0x503
 
 #define DP_SET_POWER                        0x600
 # define DP_SET_POWER_D0                    0x1
@@ -814,6 +815,7 @@  int drm_dp_downstream_max_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
                                 const u8 port_cap[4]);
 int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
                               const u8 port_cap[4]);
+int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]);
 
 int drm_dp_aux_register(struct drm_dp_aux *aux);
 void drm_dp_aux_unregister(struct drm_dp_aux *aux);