[radeon-alex:amd-staging-4.7 2/14] drivers/gpu/drm/amd/amdgpu/../dal/amdgpu_dm/amdgpu_dm.c:139:24: warning: unused variable 'adev'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-4.7
head:   091705fb62afea9598c29e600bcb211f44e86cec
commit: 019813248ba6cd14c5b315d1c566bf0141551e26 [2/14] drm/amdgpu: fix amdgpu_need_full_reset (v3)
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 019813248ba6cd14c5b315d1c566bf0141551e26
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/../dal/amdgpu_dm/amdgpu_dm.c:27:0:
   drivers/gpu/drm/amd/amdgpu/../dal/dc/dc.h:82:11: warning: 'struct link_training_settings' declared inside parameter list will not be visible outside of this definition or declaration
       struct link_training_settings *lt_settings);
              ^~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../dal/dc/dc.h:562:9: warning: 'struct link_training_settings' declared inside parameter list will not be visible outside of this definition or declaration
     struct link_training_settings *lt_settings);
            ^~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../dal/amdgpu_dm/amdgpu_dm.c: In function 'dm_soft_reset':
>> drivers/gpu/drm/amd/amdgpu/../dal/amdgpu_dm/amdgpu_dm.c:139:24: warning: unused variable 'adev' [-Wunused-variable]
     struct amdgpu_device *adev = (struct amdgpu_device *)handle;
                           ^~~~

vim +/adev +139 drivers/gpu/drm/amd/amdgpu/../dal/amdgpu_dm/amdgpu_dm.c

5508d4f4 Harry Wentland 2015-11-25   21   *
5508d4f4 Harry Wentland 2015-11-25   22   * Authors: AMD
5508d4f4 Harry Wentland 2015-11-25   23   *
5508d4f4 Harry Wentland 2015-11-25   24   */
5508d4f4 Harry Wentland 2015-11-25   25  
94844f33 Harry Wentland 2016-01-29   26  #include "dm_services_types.h"
5508d4f4 Harry Wentland 2015-11-25  @27  #include "dc.h"
5508d4f4 Harry Wentland 2015-11-25   28  
5508d4f4 Harry Wentland 2015-11-25   29  #include "vid.h"
5508d4f4 Harry Wentland 2015-11-25   30  #include "amdgpu.h"
5508d4f4 Harry Wentland 2015-11-25   31  #include "atom.h"
5508d4f4 Harry Wentland 2015-11-25   32  #include "amdgpu_dm.h"
5508d4f4 Harry Wentland 2015-11-25   33  #include "amdgpu_dm_types.h"
5508d4f4 Harry Wentland 2015-11-25   34  
5508d4f4 Harry Wentland 2015-11-25   35  #include "amd_shared.h"
5508d4f4 Harry Wentland 2015-11-25   36  #include "amdgpu_dm_irq.h"
94844f33 Harry Wentland 2016-01-29   37  #include "dm_helpers.h"
5508d4f4 Harry Wentland 2015-11-25   38  
fbef3a46 Alex Deucher   2016-02-25   39  #ifdef CONFIG_DRM_AMDGPU_CIK
8721a530 Alex Deucher   2016-04-21   40  #include "dce_v8_0.h"
fbef3a46 Alex Deucher   2016-02-25   41  #endif
8721a530 Alex Deucher   2016-04-21   42  #include "dce_v10_0.h"
8721a530 Alex Deucher   2016-04-21   43  #include "dce_v11_0.h"
5508d4f4 Harry Wentland 2015-11-25   44  
8721a530 Alex Deucher   2016-04-21   45  #include "ivsrcid/ivsrcid_vislands30.h"
5508d4f4 Harry Wentland 2015-11-25   46  
5508d4f4 Harry Wentland 2015-11-25   47  #include <linux/module.h>
5508d4f4 Harry Wentland 2015-11-25   48  #include <linux/moduleparam.h>
31d128cd Mykola Lysenko 2016-03-28   49  #include <linux/version.h>
5508d4f4 Harry Wentland 2015-11-25   50  
5508d4f4 Harry Wentland 2015-11-25   51  #include <drm/drm_atomic.h>
5508d4f4 Harry Wentland 2015-11-25   52  #include <drm/drm_atomic_helper.h>
5508d4f4 Harry Wentland 2015-11-25   53  #include <drm/drm_dp_mst_helper.h>
5508d4f4 Harry Wentland 2015-11-25   54  
28194577 Vitaly Prosyak 2016-05-31   55  #include "modules/inc/mod_freesync.h"
28194577 Vitaly Prosyak 2016-05-31   56  
5508d4f4 Harry Wentland 2015-11-25   57  /* Define variables here
5508d4f4 Harry Wentland 2015-11-25   58   * These values will be passed to DAL for feature enable purpose
5508d4f4 Harry Wentland 2015-11-25   59   * Disable ALL for HDMI light up
5508d4f4 Harry Wentland 2015-11-25   60   * TODO: follow up if need this mechanism*/
5508d4f4 Harry Wentland 2015-11-25   61  struct dal_override_parameters display_param = {
5508d4f4 Harry Wentland 2015-11-25   62  	.bool_param_enable_mask = 0,
5508d4f4 Harry Wentland 2015-11-25   63  	.bool_param_values = 0,
5508d4f4 Harry Wentland 2015-11-25   64  };
5508d4f4 Harry Wentland 2015-11-25   65  
5508d4f4 Harry Wentland 2015-11-25   66  /* Debug facilities */
5508d4f4 Harry Wentland 2015-11-25   67  #define AMDGPU_DM_NOT_IMPL(fmt, ...) \
5508d4f4 Harry Wentland 2015-11-25   68  	DRM_INFO("DM_NOT_IMPL: " fmt, ##__VA_ARGS__)
5508d4f4 Harry Wentland 2015-11-25   69  
5508d4f4 Harry Wentland 2015-11-25   70  /*
5508d4f4 Harry Wentland 2015-11-25   71   * dm_vblank_get_counter
5508d4f4 Harry Wentland 2015-11-25   72   *
5508d4f4 Harry Wentland 2015-11-25   73   * @brief
5508d4f4 Harry Wentland 2015-11-25   74   * Get counter for number of vertical blanks
5508d4f4 Harry Wentland 2015-11-25   75   *
5508d4f4 Harry Wentland 2015-11-25   76   * @param
5508d4f4 Harry Wentland 2015-11-25   77   * struct amdgpu_device *adev - [in] desired amdgpu device
5508d4f4 Harry Wentland 2015-11-25   78   * int disp_idx - [in] which CRTC to get the counter from
5508d4f4 Harry Wentland 2015-11-25   79   *
5508d4f4 Harry Wentland 2015-11-25   80   * @return
5508d4f4 Harry Wentland 2015-11-25   81   * Counter for vertical blanks
5508d4f4 Harry Wentland 2015-11-25   82   */
5508d4f4 Harry Wentland 2015-11-25   83  static u32 dm_vblank_get_counter(struct amdgpu_device *adev, int crtc)
5508d4f4 Harry Wentland 2015-11-25   84  {
5508d4f4 Harry Wentland 2015-11-25   85  	if (crtc >= adev->mode_info.num_crtc)
5508d4f4 Harry Wentland 2015-11-25   86  		return 0;
5508d4f4 Harry Wentland 2015-11-25   87  	else {
5508d4f4 Harry Wentland 2015-11-25   88  		struct amdgpu_crtc *acrtc = adev->mode_info.crtcs[crtc];
5508d4f4 Harry Wentland 2015-11-25   89  
5508d4f4 Harry Wentland 2015-11-25   90  		if (NULL == acrtc->target) {
5508d4f4 Harry Wentland 2015-11-25   91  			DRM_ERROR("dc_target is NULL for crtc '%d'!\n", crtc);
5508d4f4 Harry Wentland 2015-11-25   92  			return 0;
5508d4f4 Harry Wentland 2015-11-25   93  		}
5508d4f4 Harry Wentland 2015-11-25   94  
5508d4f4 Harry Wentland 2015-11-25   95  		return dc_target_get_vblank_counter(acrtc->target);
5508d4f4 Harry Wentland 2015-11-25   96  	}
5508d4f4 Harry Wentland 2015-11-25   97  }
5508d4f4 Harry Wentland 2015-11-25   98  
5508d4f4 Harry Wentland 2015-11-25   99  static int dm_crtc_get_scanoutpos(struct amdgpu_device *adev, int crtc,
5508d4f4 Harry Wentland 2015-11-25  100  					u32 *vbl, u32 *position)
5508d4f4 Harry Wentland 2015-11-25  101  {
5508d4f4 Harry Wentland 2015-11-25  102  	if ((crtc < 0) || (crtc >= adev->mode_info.num_crtc))
5508d4f4 Harry Wentland 2015-11-25  103  		return -EINVAL;
dafdecfa Jordan Lazare  2016-03-22  104  	else {
dafdecfa Jordan Lazare  2016-03-22  105  		struct amdgpu_crtc *acrtc = adev->mode_info.crtcs[crtc];
dafdecfa Jordan Lazare  2016-03-22  106  
dafdecfa Jordan Lazare  2016-03-22  107  		if (NULL == acrtc->target) {
dafdecfa Jordan Lazare  2016-03-22  108  			DRM_ERROR("dc_target is NULL for crtc '%d'!\n", crtc);
dafdecfa Jordan Lazare  2016-03-22  109  			return 0;
dafdecfa Jordan Lazare  2016-03-22  110  		}
dafdecfa Jordan Lazare  2016-03-22  111  
dafdecfa Jordan Lazare  2016-03-22  112  		return dc_target_get_scanoutpos(acrtc->target, vbl, position);
dafdecfa Jordan Lazare  2016-03-22  113  	}
5508d4f4 Harry Wentland 2015-11-25  114  
5508d4f4 Harry Wentland 2015-11-25  115  	return 0;
5508d4f4 Harry Wentland 2015-11-25  116  }
5508d4f4 Harry Wentland 2015-11-25  117  
5508d4f4 Harry Wentland 2015-11-25  118  static bool dm_is_idle(void *handle)
5508d4f4 Harry Wentland 2015-11-25  119  {
5508d4f4 Harry Wentland 2015-11-25  120  	/* XXX todo */
5508d4f4 Harry Wentland 2015-11-25  121  	return true;
5508d4f4 Harry Wentland 2015-11-25  122  }
5508d4f4 Harry Wentland 2015-11-25  123  
5508d4f4 Harry Wentland 2015-11-25  124  static int dm_wait_for_idle(void *handle)
5508d4f4 Harry Wentland 2015-11-25  125  {
5508d4f4 Harry Wentland 2015-11-25  126  	/* XXX todo */
5508d4f4 Harry Wentland 2015-11-25  127  	return 0;
5508d4f4 Harry Wentland 2015-11-25  128  }
5508d4f4 Harry Wentland 2015-11-25  129  
01981324 Alex Deucher   2016-10-13  130  static bool dm_check_soft_reset(void *handle)
d86ac4aa Chunming Zhou  2016-07-20  131  {
d86ac4aa Chunming Zhou  2016-07-20  132  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
d86ac4aa Chunming Zhou  2016-07-20  133  
01981324 Alex Deucher   2016-10-13  134  	return amdgpu_display_is_display_hung(adev);
d86ac4aa Chunming Zhou  2016-07-20  135  }
d86ac4aa Chunming Zhou  2016-07-20  136  
5508d4f4 Harry Wentland 2015-11-25  137  static int dm_soft_reset(void *handle)
5508d4f4 Harry Wentland 2015-11-25  138  {
d86ac4aa Chunming Zhou  2016-07-20 @139  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
d86ac4aa Chunming Zhou  2016-07-20  140  
8721a530 Alex Deucher   2016-04-21  141  	/* XXX todo */
5508d4f4 Harry Wentland 2015-11-25  142  	return 0;

:::::: The code at line 139 was first introduced by commit
:::::: d86ac4aaabf05f7866fb1241e41075022c1c08c3 drm/amdgpu: add dm check_soft_reset

:::::: TO: Chunming Zhou <David1.Zhou@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux