All of lore.kernel.org
 help / color / mirror / Atom feed
* [agd5f:drm-next 266/414] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2776 handle_hpd_rx_irq() warn: inconsistent indenting
@ 2021-05-18  3:00 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-18  3:00 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 9590 bytes --]

tree:   https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head:   2117d5f920190bd219e1aca5bf903477781ca161
commit: 509b9a5b4865dee723296f143695a7774fc96c4a [266/414] drm/amd/display: Avoid HPD IRQ in GPU reset state
config: i386-randconfig-m021-20210517 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2776 handle_hpd_rx_irq() warn: inconsistent indenting

Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1345 amdgpu_dm_fini() warn: variable dereferenced before check 'adev->dm.dc' (see line 1329)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5748 create_stream_for_sink() error: we previously assumed 'aconnector->dc_sink' could be null (see line 5612)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8068 handle_cursor_update() error: we previously assumed 'afb' could be null (see line 8027)

vim +2776 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c

4562236b3bc0a28 Harry Wentland    2017-09-12  2730  
4562236b3bc0a28 Harry Wentland    2017-09-12  2731  static void handle_hpd_rx_irq(void *param)
4562236b3bc0a28 Harry Wentland    2017-09-12  2732  {
c84dec2fe8837fa Harry Wentland    2017-09-05  2733  	struct amdgpu_dm_connector *aconnector = (struct amdgpu_dm_connector *)param;
4562236b3bc0a28 Harry Wentland    2017-09-12  2734  	struct drm_connector *connector = &aconnector->base;
4562236b3bc0a28 Harry Wentland    2017-09-12  2735  	struct drm_device *dev = connector->dev;
53cbf65c145450e Tom St Denis      2017-10-17  2736  	struct dc_link *dc_link = aconnector->dc_link;
4562236b3bc0a28 Harry Wentland    2017-09-12  2737  	bool is_mst_root_connector = aconnector->mst_mgr.mst_state;
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01  2738  	bool result = false;
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2739  	enum dc_connection_type new_connection_type = dc_connection_none;
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01  2740  	struct amdgpu_device *adev = drm_to_adev(dev);
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2741  	union hpd_irq_data hpd_irq_data;
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2742  
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2743  	memset(&hpd_irq_data, 0, sizeof(hpd_irq_data));
4562236b3bc0a28 Harry Wentland    2017-09-12  2744  
b972b4f913eee02 Harry Wentland    2020-10-02  2745  	if (adev->dm.disable_hpd_irq)
b972b4f913eee02 Harry Wentland    2020-10-02  2746  		return;
b972b4f913eee02 Harry Wentland    2020-10-02  2747  
b972b4f913eee02 Harry Wentland    2020-10-02  2748  
1f6010a96273c31 David Francis     2018-08-15  2749  	/*
1f6010a96273c31 David Francis     2018-08-15  2750  	 * TODO:Temporary add mutex to protect hpd interrupt not have a gpio
4562236b3bc0a28 Harry Wentland    2017-09-12  2751  	 * conflict, after implement i2c helper, this mutex should be
4562236b3bc0a28 Harry Wentland    2017-09-12  2752  	 * retired.
4562236b3bc0a28 Harry Wentland    2017-09-12  2753  	 */
4562236b3bc0a28 Harry Wentland    2017-09-12  2754  	mutex_lock(&aconnector->hpd_lock);
4562236b3bc0a28 Harry Wentland    2017-09-12  2755  
3083a9845e1258e Qingqing Zhuo     2020-11-23  2756  	read_hpd_rx_irq_data(dc_link, &hpd_irq_data);
3083a9845e1258e Qingqing Zhuo     2020-11-23  2757  
3083a9845e1258e Qingqing Zhuo     2020-11-23  2758  	if ((dc_link->cur_link_settings.lane_count != LANE_COUNT_UNKNOWN) ||
3083a9845e1258e Qingqing Zhuo     2020-11-23  2759  		(dc_link->type == dc_connection_mst_branch)) {
3083a9845e1258e Qingqing Zhuo     2020-11-23  2760  		if (hpd_irq_data.bytes.device_service_irq.bits.UP_REQ_MSG_RDY) {
3083a9845e1258e Qingqing Zhuo     2020-11-23  2761  			result = true;
3083a9845e1258e Qingqing Zhuo     2020-11-23  2762  			dm_handle_hpd_rx_irq(aconnector);
3083a9845e1258e Qingqing Zhuo     2020-11-23  2763  			goto out;
3083a9845e1258e Qingqing Zhuo     2020-11-23  2764  		} else if (hpd_irq_data.bytes.device_service_irq.bits.DOWN_REP_MSG_RDY) {
3083a9845e1258e Qingqing Zhuo     2020-11-23  2765  			result = false;
3083a9845e1258e Qingqing Zhuo     2020-11-23  2766  			dm_handle_hpd_rx_irq(aconnector);
3083a9845e1258e Qingqing Zhuo     2020-11-23  2767  			goto out;
3083a9845e1258e Qingqing Zhuo     2020-11-23  2768  		}
3083a9845e1258e Qingqing Zhuo     2020-11-23  2769  	}
3083a9845e1258e Qingqing Zhuo     2020-11-23  2770  
509b9a5b4865dee Zhan Liu          2021-05-09  2771  	if (!amdgpu_in_reset(adev)) {
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01  2772  		mutex_lock(&adev->dm.dc_lock);
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2773  #ifdef CONFIG_DRM_AMD_DC_HDCP
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01  2774  	result = dc_link_handle_hpd_rx_irq(dc_link, &hpd_irq_data, NULL);
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2775  #else
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01 @2776  	result = dc_link_handle_hpd_rx_irq(dc_link, NULL, NULL);
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2777  #endif
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01  2778  		mutex_unlock(&adev->dm.dc_lock);
509b9a5b4865dee Zhan Liu          2021-05-09  2779  	}
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01  2780  
3083a9845e1258e Qingqing Zhuo     2020-11-23  2781  out:
c8ea79a8a2767e7 Qingqing Zhuo     2020-10-01  2782  	if (result && !is_mst_root_connector) {
4562236b3bc0a28 Harry Wentland    2017-09-12  2783  		/* Downstream Port status changed. */
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2784  		if (!dc_link_detect_sink(dc_link, &new_connection_type))
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2785  			DRM_ERROR("KMS: Failed to detect connector\n");
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2786  
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2787  		if (aconnector->base.force && new_connection_type == dc_connection_none) {
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2788  			emulated_link_detect(dc_link);
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2789  
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2790  			if (aconnector->fake_enable)
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2791  				aconnector->fake_enable = false;
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2792  
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2793  			amdgpu_dm_update_connector_after_detect(aconnector);
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2794  
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2795  
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2796  			drm_modeset_lock_all(dev);
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2797  			dm_restore_drm_connector_state(dev, connector);
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2798  			drm_modeset_unlock_all(dev);
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2799  
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2800  			drm_kms_helper_hotplug_event(dev);
fbbdadf2faf17cd Bhawanpreet Lakha 2018-09-26  2801  		} else if (dc_link_detect(dc_link, DETECT_REASON_HPDRX)) {
88ac3ddab12e2b0 Roman Li          2018-02-09  2802  
88ac3ddab12e2b0 Roman Li          2018-02-09  2803  			if (aconnector->fake_enable)
88ac3ddab12e2b0 Roman Li          2018-02-09  2804  				aconnector->fake_enable = false;
88ac3ddab12e2b0 Roman Li          2018-02-09  2805  
4562236b3bc0a28 Harry Wentland    2017-09-12  2806  			amdgpu_dm_update_connector_after_detect(aconnector);
4562236b3bc0a28 Harry Wentland    2017-09-12  2807  
4562236b3bc0a28 Harry Wentland    2017-09-12  2808  
4562236b3bc0a28 Harry Wentland    2017-09-12  2809  			drm_modeset_lock_all(dev);
4562236b3bc0a28 Harry Wentland    2017-09-12  2810  			dm_restore_drm_connector_state(dev, connector);
4562236b3bc0a28 Harry Wentland    2017-09-12  2811  			drm_modeset_unlock_all(dev);
4562236b3bc0a28 Harry Wentland    2017-09-12  2812  
4562236b3bc0a28 Harry Wentland    2017-09-12  2813  			drm_kms_helper_hotplug_event(dev);
4562236b3bc0a28 Harry Wentland    2017-09-12  2814  		}
4562236b3bc0a28 Harry Wentland    2017-09-12  2815  	}
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2816  #ifdef CONFIG_DRM_AMD_DC_HDCP
e22bb5626cd6cd7 Alex Deucher      2020-02-18  2817  	if (hpd_irq_data.bytes.device_service_irq.bits.CP_IRQ) {
e22bb5626cd6cd7 Alex Deucher      2020-02-18  2818  		if (adev->dm.hdcp_workqueue)
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2819  			hdcp_handle_cpirq(adev->dm.hdcp_workqueue,  aconnector->base.index);
e22bb5626cd6cd7 Alex Deucher      2020-02-18  2820  	}
2a0f92700fe348f Bhawanpreet Lakha 2019-06-10  2821  #endif
4562236b3bc0a28 Harry Wentland    2017-09-12  2822  
b86e7eef91ef119 Nikola Cornij     2021-04-30  2823  	if (dc_link->type != dc_connection_mst_branch)
e86e894751f0420 Hans Verkuil      2018-08-27  2824  		drm_dp_cec_irq(&aconnector->dm_dp_aux.aux);
b86e7eef91ef119 Nikola Cornij     2021-04-30  2825  
4562236b3bc0a28 Harry Wentland    2017-09-12  2826  	mutex_unlock(&aconnector->hpd_lock);
4562236b3bc0a28 Harry Wentland    2017-09-12  2827  }
4562236b3bc0a28 Harry Wentland    2017-09-12  2828  

:::::: The code at line 2776 was first introduced by commit
:::::: c8ea79a8a2767e7948c778237be655a109366eb9 drm/amd/display: NULL pointer error during compliance test

:::::: TO: Qingqing Zhuo <qingqing.zhuo@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32728 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-18  3:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  3:00 [agd5f:drm-next 266/414] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2776 handle_hpd_rx_irq() warn: inconsistent indenting kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.