[Intel-gfx] [PATCH] drm/i915/lspcon: Fix Parade LSPCON scrambling fail

kbuild test robot lkp at intel.com
Fri Oct 12 21:39:09 UTC 2018


Hi Ville,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.19-rc7 next-20181012]
[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/Ville-Syrjala/drm-i915-lspcon-Fix-Parade-LSPCON-scrambling-fail/20181013-044614
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x005-201840 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/i915/intel_hdmi.c: In function 'intel_hdmi_handle_sink_scrambling':
>> drivers/gpu//drm/i915/intel_hdmi.c:2144:27: error: unused variable 'dev_priv' [-Werror=unused-variable]
     struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
                              ^~~~~~~~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
   Cyclomatic Complexity 4 include/linux/string.h:memcpy
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 3 include/linux/ktime.h:ktime_compare
   Cyclomatic Complexity 1 include/linux/ktime.h:ktime_after
   Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 5 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 1 include/drm/drm_modeset_helper_vtables.h:drm_connector_helper_add
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/i915_utils.h:yesno
   Cyclomatic Complexity 7 drivers/gpu//drm/i915/intel_display.h:port_identifier
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/i915_drv.h:to_i915
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_drv.h:intel_info
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/i915_drv.h:intel_gmbus_is_forced_bit
   Cyclomatic Complexity 1 include/media/cec-notifier.h:cec_notifier_phys_addr_invalidate
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_drv.h:intel_get_crtc_for_pipe
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_drv.h:intel_attached_encoder
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_drv.h:intel_encoder_is_dig_port
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_drv.h:enc_to_dig_port
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_drv.h:hdmi_to_dig_port
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_drv.h:intel_wait_for_vblank
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_drv.h:intel_wait_for_vblank_if_active
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_to_dev
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:g4x_infoframe_enabled
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:hsw_infoframe_enabled
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:hdmi_sink_is_deep_color
   Cyclomatic Complexity 12 drivers/gpu//drm/i915/intel_hdmi.c:gcp_default_phase_possible
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:vlv_enable_hdmi
   Cyclomatic Complexity 7 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_source_max_tmds_clock
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:hdmi_port_clock_limit
   Cyclomatic Complexity 8 drivers/gpu//drm/i915/intel_hdmi.c:hdmi_port_clock_valid
   Cyclomatic Complexity 23 drivers/gpu//drm/i915/intel_hdmi.c:hdmi_deep_color_possible
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_ycbcr420_config
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:cpt_infoframe_enabled
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:assert_hdmi_port_disabled
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:g4x_infoframe_index
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:g4x_infoframe_enable
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:assert_hdmi_transcoder_func_disabled
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:hsw_dip_data_reg
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:hsw_infoframe_enable
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:hsw_write_infoframe
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:g4x_write_infoframe
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:chv_port_to_ddc_pin
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:bxt_port_to_ddc_pin
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:cnp_port_to_ddc_pin
   Cyclomatic Complexity 8 drivers/gpu//drm/i915/intel_hdmi.c:icl_port_to_ddc_pin
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:g4x_port_to_ddc_pin
   Cyclomatic Complexity 7 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_ddc_pin
   Cyclomatic Complexity 7 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_set_gcp_infoframe
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_write_infoframe
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_set_spd_infoframe
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_set_hdmi_infoframe
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:cpt_write_infoframe
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:ibx_infoframe_enabled
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:ibx_write_infoframe
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:vlv_infoframe_enabled
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:vlv_write_infoframe
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_toggle_signalling
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_read
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_read_v_prime_part
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_read_ksv_fifo
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_read_ksv_ready
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_read_ri_prime
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_check_link
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_repeater_present
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_read_bstatus
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_read_bksv
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_write
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_hdcp_write_an_aksv
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_get_modes
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_add_properties
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:intel_enable_hdmi_audio
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:vlv_hdmi_post_disable
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:chv_hdmi_post_pll_disable
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:chv_hdmi_post_disable
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:pch_disable_hdmi
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:enc_to_intel_hdmi
   Cyclomatic Complexity 27 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_compute_config
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_set_avi_infoframe
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:cpt_set_infoframes
   Cyclomatic Complexity 7 drivers/gpu//drm/i915/intel_hdmi.c:ibx_set_infoframes
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:hsw_set_infoframes
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:g4x_set_infoframes
   Cyclomatic Complexity 7 drivers/gpu//drm/i915/intel_hdmi.c:vlv_set_infoframes
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:intel_attached_hdmi
   Cyclomatic Complexity 13 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_mode_valid
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_destroy
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_unset_edid
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_dp_dual_mode_detect
   Cyclomatic Complexity 6 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_set_edid
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_force
   Cyclomatic Complexity 5 drivers/gpu//drm/i915/intel_hdmi.c:intel_hdmi_detect
   Cyclomatic Complexity 3 drivers/gpu//drm/i915/intel_hdmi.c:g4x_enable_hdmi
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:vlv_hdmi_pre_enable
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_hdmi.c:chv_hdmi_pre_enable

vim +/dev_priv +2144 drivers/gpu//drm/i915/intel_hdmi.c

55b7d6e8c Chris Wilson    2010-09-19  2118  
159536378 Shashank Sharma 2017-03-13  2119  /*
159536378 Shashank Sharma 2017-03-13  2120   * intel_hdmi_handle_sink_scrambling: handle sink scrambling/clock ratio setup
159536378 Shashank Sharma 2017-03-13  2121   * @encoder: intel_encoder
159536378 Shashank Sharma 2017-03-13  2122   * @connector: drm_connector
98706eef6 Ville Syrjälä   2018-10-12  2123   * @adapter: i2c adapter for the ddc bus
159536378 Shashank Sharma 2017-03-13  2124   * @high_tmds_clock_ratio = bool to indicate if the function needs to set
159536378 Shashank Sharma 2017-03-13  2125   *  or reset the high tmds clock ratio for scrambling
159536378 Shashank Sharma 2017-03-13  2126   * @scrambling: bool to Indicate if the function needs to set or reset
159536378 Shashank Sharma 2017-03-13  2127   *  sink scrambling
159536378 Shashank Sharma 2017-03-13  2128   *
159536378 Shashank Sharma 2017-03-13  2129   * This function handles scrambling on HDMI 2.0 capable sinks.
159536378 Shashank Sharma 2017-03-13  2130   * If required clock rate is > 340 Mhz && scrambling is supported by sink
159536378 Shashank Sharma 2017-03-13  2131   * it enables scrambling. This should be called before enabling the HDMI
159536378 Shashank Sharma 2017-03-13  2132   * 2.0 port, as the sink can choose to disable the scrambling if it doesn't
159536378 Shashank Sharma 2017-03-13  2133   * detect a scrambled clock within 100 ms.
277ab5abc Ville Syrjälä   2018-03-22  2134   *
277ab5abc Ville Syrjälä   2018-03-22  2135   * Returns:
277ab5abc Ville Syrjälä   2018-03-22  2136   * True on success, false on failure.
159536378 Shashank Sharma 2017-03-13  2137   */
277ab5abc Ville Syrjälä   2018-03-22  2138  bool intel_hdmi_handle_sink_scrambling(struct intel_encoder *encoder,
159536378 Shashank Sharma 2017-03-13  2139  				       struct drm_connector *connector,
98706eef6 Ville Syrjälä   2018-10-12  2140  				       struct i2c_adapter *adapter,
159536378 Shashank Sharma 2017-03-13  2141  				       bool high_tmds_clock_ratio,
159536378 Shashank Sharma 2017-03-13  2142  				       bool scrambling)
159536378 Shashank Sharma 2017-03-13  2143  {
277ab5abc Ville Syrjälä   2018-03-22 @2144  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
159536378 Shashank Sharma 2017-03-13  2145  	struct drm_scrambling *sink_scrambling =
159536378 Shashank Sharma 2017-03-13  2146  		&connector->display_info.hdmi.scdc.scrambling;
159536378 Shashank Sharma 2017-03-13  2147  
159536378 Shashank Sharma 2017-03-13  2148  	if (!sink_scrambling->supported)
277ab5abc Ville Syrjälä   2018-03-22  2149  		return true;
159536378 Shashank Sharma 2017-03-13  2150  
277ab5abc Ville Syrjälä   2018-03-22  2151  	DRM_DEBUG_KMS("[CONNECTOR:%d:%s] scrambling=%s, TMDS bit clock ratio=1/%d\n",
277ab5abc Ville Syrjälä   2018-03-22  2152  		      connector->base.id, connector->name,
277ab5abc Ville Syrjälä   2018-03-22  2153  		      yesno(scrambling), high_tmds_clock_ratio ? 40 : 10);
159536378 Shashank Sharma 2017-03-13  2154  
277ab5abc Ville Syrjälä   2018-03-22  2155  	/* Set TMDS bit clock ratio to 1/40 or 1/10, and enable/disable scrambling */
277ab5abc Ville Syrjälä   2018-03-22  2156  	return drm_scdc_set_high_tmds_clock_ratio(adapter,
277ab5abc Ville Syrjälä   2018-03-22  2157  						  high_tmds_clock_ratio) &&
277ab5abc Ville Syrjälä   2018-03-22  2158  		drm_scdc_set_scrambling(adapter, scrambling);
159536378 Shashank Sharma 2017-03-13  2159  }
159536378 Shashank Sharma 2017-03-13  2160  

:::::: The code at line 2144 was first introduced by commit
:::::: 277ab5abc68df2f6f8fac7a46e50105b6648f432 drm/i915: Don't spew errors when resetting HDMI scrambling/bit clock ratio fails

:::::: TO: Ville Syrjälä <ville.syrjala at linux.intel.com>
:::::: CC: Ville Syrjälä <ville.syrjala at linux.intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35372 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20181013/7f614689/attachment-0001.gz>


More information about the Intel-gfx mailing list