Message ID | 1465219753-3737-3-git-send-email-mika.kahola@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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' include/drm/drm_dp_helper.h:753: warning: No description found for parameter 'i2c_nack_count' include/drm/drm_dp_helper.h:753: 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_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 +/aux +451 drivers/gpu/drm/drm_dp_helper.c 435 return err; 436 437 return 0; 438 } 439 EXPORT_SYMBOL(drm_dp_link_configure); 440 441 /** 442 * drm_dp_downstream_port_cap() - read downstream port capabilities 443 * @dpcd: DisplayPort configuration data 444 * @port_cap: port capabilities 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 { --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
On Mon, Jun 06, 2016 at 04:29:04PM +0300, Mika Kahola wrote: > Read DisplayPort downstream port capabilities. Depending on > the DP port the capabilities are defined in length of 1 byte > or 4 bytes depending if the detailed capability information is > available. > > Signed-off-by: Mika Kahola <mika.kahola@intel.com> > --- > drivers/gpu/drm/drm_dp_helper.c | 27 +++++++++++++++++++++++++++ > include/drm/drm_dp_helper.h | 3 +++ > 2 files changed, 30 insertions(+) > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c > index eeaf5a7..c4149fd 100644 > --- a/drivers/gpu/drm/drm_dp_helper.c > +++ b/drivers/gpu/drm/drm_dp_helper.c > @@ -438,6 +438,33 @@ int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link) > } > EXPORT_SYMBOL(drm_dp_link_configure); > > +/** > + * drm_dp_downstream_port_cap() - read downstream port capabilities > + * @dpcd: DisplayPort configuration data > + * @port_cap: port capabilities > + * > + * returns size of the port capabilites > + */ > +int drm_dp_downstream_port_cap(struct drm_dp_aux *aux, > + const u8 dpcd[DP_RECEIVER_CAP_SIZE], > + u8 port_cap[4]) > +{ > + int size; > + bool detailed_cap_info = dpcd[DP_DOWNSTREAMPORT_PRESENT] & > + DP_DETAILED_CAP_INFO_AVAILABLE; > + > + if (detailed_cap_info) { > + size = 4; > + drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, port_cap, size); > + } else { > + size = 1; > + drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, &port_cap[0], size); > + } Could avoid a bit of duplicatetion. Eg.: if (dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DETAILED_CAP_INFO_AVAILABLE) size = 4; else size = 1; return drm_dp_dpcd_read(...); Though perhaps we should just read out the entire 4/16 bytes to get the caps for all the ports? > + > + return size; > +} > +EXPORT_SYMBOL(drm_dp_downstream_port_cap); > + > /* > * I2C-over-AUX implementation > */ > diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h > index e384c7f..db8d3d47 100644 > --- a/include/drm/drm_dp_helper.h > +++ b/include/drm/drm_dp_helper.h > @@ -806,6 +806,9 @@ int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link); > int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link); > int drm_dp_link_power_down(struct drm_dp_aux *aux, struct drm_dp_link *link); > int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link); > +int drm_dp_downstream_port_cap(struct drm_dp_aux *aux, > + const u8 dpcd[DP_RECEIVER_CAP_SIZE], > + u8 port_cap[4]); > > int drm_dp_aux_register(struct drm_dp_aux *aux); > void drm_dp_aux_unregister(struct drm_dp_aux *aux); > -- > 1.9.1
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index eeaf5a7..c4149fd 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -438,6 +438,33 @@ int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link) } EXPORT_SYMBOL(drm_dp_link_configure); +/** + * drm_dp_downstream_port_cap() - read downstream port capabilities + * @dpcd: DisplayPort configuration data + * @port_cap: port capabilities + * + * returns size of the port capabilites + */ +int drm_dp_downstream_port_cap(struct drm_dp_aux *aux, + const u8 dpcd[DP_RECEIVER_CAP_SIZE], + u8 port_cap[4]) +{ + int size; + bool detailed_cap_info = dpcd[DP_DOWNSTREAMPORT_PRESENT] & + DP_DETAILED_CAP_INFO_AVAILABLE; + + if (detailed_cap_info) { + size = 4; + drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, port_cap, size); + } else { + size = 1; + drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, &port_cap[0], size); + } + + return size; +} +EXPORT_SYMBOL(drm_dp_downstream_port_cap); + /* * I2C-over-AUX implementation */ diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index e384c7f..db8d3d47 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -806,6 +806,9 @@ int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link); int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link); int drm_dp_link_power_down(struct drm_dp_aux *aux, struct drm_dp_link *link); int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link); +int drm_dp_downstream_port_cap(struct drm_dp_aux *aux, + const u8 dpcd[DP_RECEIVER_CAP_SIZE], + u8 port_cap[4]); int drm_dp_aux_register(struct drm_dp_aux *aux); void drm_dp_aux_unregister(struct drm_dp_aux *aux);
Read DisplayPort downstream port capabilities. Depending on the DP port the capabilities are defined in length of 1 byte or 4 bytes depending if the detailed capability information is available. Signed-off-by: Mika Kahola <mika.kahola@intel.com> --- drivers/gpu/drm/drm_dp_helper.c | 27 +++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 3 +++ 2 files changed, 30 insertions(+)