[drm:not-butter 2/12] drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:20:6: error: unused variable 'ret'

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

 



tree:   git://people.freedesktop.org/~airlied/linux.git not-butter
head:   f9de02ab2d4b7fc8d05e5fff0d5b4d8e474bbba5
commit: 9ef551714e1c0e9a800143eb927c68b6eadb87cb [2/12] flesh out mgrs a bit
config: i386-randconfig-m021-20200630 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

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

All errors (new ones prefixed by >>):

      72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
         |                                ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
      67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
         |                                ^~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:551: warning: Function parameter or member 'hwmgr' not described in 'vega10_get_evv_voltages'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'hwmgr' not described in 'vega10_patch_with_vdd_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'voltage' not described in 'vega10_patch_with_vdd_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'leakage_table' not described in 'vega10_patch_with_vdd_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'hwmgr' not described in 'vega10_patch_lookup_table_with_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'lookup_table' not described in 'vega10_patch_lookup_table_with_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'leakage_table' not described in 'vega10_patch_lookup_table_with_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1013: warning: Function parameter or member 'hwmgr' not described in 'vega10_trim_voltage_table'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1013: warning: Function parameter or member 'vol_table' not described in 'vega10_trim_voltage_table'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1160: warning: Function parameter or member 'hwmgr' not described in 'vega10_construct_voltage_tables'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'hwmgr' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'gfx_clock' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'current_gfxclk_level' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'acg_freq' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1613: warning: Cannot understand  * @brief Populates single SMC SOCCLK structure using the provided clock.
    on line 1613 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1667: warning: Function parameter or member 'hwmgr' not described in 'vega10_populate_all_graphic_levels'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1750: warning: Cannot understand  * @brief Populates single SMC GFXCLK structure using the provided clock.
    on line 1750 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1811: warning: Cannot understand  * @brief Populates all SMC MCLK levels' structure based on the trimmed allowed dpm memory clock states.
    on line 1811 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:2496: warning: Function parameter or member 'hwmgr' not described in 'vega10_init_smc_table'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:2867: warning: Cannot understand  * @brief Tell SMC to enabled the supported DPMs.
    on line 2867 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_is_dpm_running':
   drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:1141:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    1141 |  int ret = 0;
         |      ^~~
   In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:32:
   At top level:
   drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smu_v11_0.h:68:43: warning: 'smu11_thermal_policy' defined but not used [-Wunused-const-variable=]
      68 | static const struct smu_temperature_range smu11_thermal_policy[] =
         |                                           ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:26:
   drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:190:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
     190 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
         |                  ^~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
                    from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
                    from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:65,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:26:
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
      76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
         |                                ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
      75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
         |                                ^~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
      74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
         |                                ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
      73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
         |                                ^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
      72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
         |                                ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
      67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
         |                                ^~~~~~~~~~~~~
   make[4]: *** [drivers/gpu/drm/i915/Makefile:307: drivers/gpu/drm/i915/ttm/i915_ttm.hdrtest] Error 1
   In file included from drivers/gpu/drm/i915/ttm/i915_ttm.h:4,
                    from <command-line>:
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:5:23: error: field 'bdev' has incomplete type
       5 |  struct ttm_bo_device bdev;
         |                       ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:6:2: error: unknown type name 'bool'
       6 |  bool mem_global_referenced;
         |  ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:7:2: error: unknown type name 'bool'
       7 |  bool initialized;
         |  ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:11:27: error: field 'base' has incomplete type
      11 |  struct ttm_buffer_object base;
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:12:23: error: field 'placement' has incomplete type
      12 |  struct ttm_placement placement;
         |                       ^~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h: In function 'ttm_to_i915_object':
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:17:9: error: implicit declaration of function 'container_of' [-Werror=implicit-function-declaration]
      17 |  return container_of(tbo, struct i915_ttm_object, base);
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:17:27: error: expected expression before 'struct'
      17 |  return container_of(tbo, struct i915_ttm_object, base);
         |                           ^~~~~~
   In file included from <command-line>:
   drivers/gpu/drm/i915/ttm/i915_ttm.h: At top level:
   drivers/gpu/drm/i915/ttm/i915_ttm.h:8:26: error: 'struct drm_i915_private' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
       8 | int i915_ttm_init(struct drm_i915_private *i915);
         |                          ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm.h:9:27: error: 'struct drm_i915_private' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
       9 | void i915_ttm_fini(struct drm_i915_private *i915);
         |                           ^~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_init':
>> drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:20:6: error: unused variable 'ret' [-Werror=unused-variable]
      20 |  int ret;
         |      ^~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:17:27: error: unused variable 'i915' [-Werror=unused-variable]
      17 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_fini':
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:35:27: error: unused variable 'i915' [-Werror=unused-variable]
      35 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: At top level:
>> drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:52:6: error: no previous prototype for 'i915_ttm_gtt_mgr_has_gart_addr' [-Werror=missing-prototypes]
      52 | bool i915_ttm_gtt_mgr_has_gart_addr(struct ttm_mem_reg *mem)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_alloc':
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:64:27: error: unused variable 'i915' [-Werror=unused-variable]
      64 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_new':
>> drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:105:17: error: unused variable 'mm' [-Werror=unused-variable]
     105 |  struct drm_mm *mm = &mgr->mm;
         |                 ^~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:103:27: error: unused variable 'i915' [-Werror=unused-variable]
     103 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_del':
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:148:27: error: unused variable 'i915' [-Werror=unused-variable]
     148 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   cc1: all warnings being treated as errors
   make[4]: *** [scripts/Makefile.build:280: drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.o] Error 1
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_init':
>> drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:16:6: error: unused variable 'ret' [-Werror=unused-variable]
      16 |  int ret;
         |      ^~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:13:27: error: unused variable 'i915' [-Werror=unused-variable]
      13 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_fini':
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:31:27: error: unused variable 'i915' [-Werror=unused-variable]
      31 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_new':
>> drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:53:22: error: unused variable 'max_bytes' [-Werror=unused-variable]
      53 |  uint64_t mem_bytes, max_bytes;
         |                      ^~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:47:27: error: unused variable 'i915' [-Werror=unused-variable]
      47 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_del':
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:144:22: error: unused variable 'nodes' [-Werror=unused-variable]
     144 |  struct drm_mm_node *nodes = mem->mm_node;
         |                      ^~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:143:28: error: unused variable 'mgr' [-Werror=unused-variable]
     143 |  struct i915_ttm_vram_mgr *mgr = man->priv;
         |                            ^~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:142:27: error: unused variable 'i915' [-Werror=unused-variable]
     142 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   cc1: all warnings being treated as errors
   make[4]: *** [scripts/Makefile.build:280: drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.o] Error 1
   drivers/gpu/drm/i915/ttm/i915_ttm.c: In function 'i915_ttm_init_mem_type':
   drivers/gpu/drm/i915/ttm/i915_ttm.c:28:27: error: unused variable 'i915' [-Werror=unused-variable]
      28 |  struct drm_i915_private *i915 = to_i915_ttm_dev(bdev);
         |                           ^~~~
   cc1: all warnings being treated as errors
   make[4]: *** [scripts/Makefile.build:280: drivers/gpu/drm/i915/ttm/i915_ttm.o] Error 1
   make[4]: Target '__build' not remade because of errors.
   make[3]: *** [scripts/Makefile.build:497: drivers/gpu/drm/i915] Error 2
   make[3]: Target '__build' not remade because of errors.
   make[2]: *** [scripts/Makefile.build:497: drivers/gpu/drm] Error 2
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1756: drivers/gpu] Error 2
   make[1]: Target '__all' not remade because of errors.
--
      72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
         |                                ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
      67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
         |                                ^~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:551: warning: Function parameter or member 'hwmgr' not described in 'vega10_get_evv_voltages'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'hwmgr' not described in 'vega10_patch_with_vdd_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'voltage' not described in 'vega10_patch_with_vdd_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'leakage_table' not described in 'vega10_patch_with_vdd_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'hwmgr' not described in 'vega10_patch_lookup_table_with_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'lookup_table' not described in 'vega10_patch_lookup_table_with_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'leakage_table' not described in 'vega10_patch_lookup_table_with_leakage'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1013: warning: Function parameter or member 'hwmgr' not described in 'vega10_trim_voltage_table'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1013: warning: Function parameter or member 'vol_table' not described in 'vega10_trim_voltage_table'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1160: warning: Function parameter or member 'hwmgr' not described in 'vega10_construct_voltage_tables'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'hwmgr' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'gfx_clock' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'current_gfxclk_level' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'acg_freq' not described in 'vega10_populate_single_gfx_level'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1613: warning: Cannot understand  * @brief Populates single SMC SOCCLK structure using the provided clock.
    on line 1613 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1667: warning: Function parameter or member 'hwmgr' not described in 'vega10_populate_all_graphic_levels'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1750: warning: Cannot understand  * @brief Populates single SMC GFXCLK structure using the provided clock.
    on line 1750 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:1811: warning: Cannot understand  * @brief Populates all SMC MCLK levels' structure based on the trimmed allowed dpm memory clock states.
    on line 1811 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:2496: warning: Function parameter or member 'hwmgr' not described in 'vega10_init_smc_table'
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:2867: warning: Cannot understand  * @brief Tell SMC to enabled the supported DPMs.
    on line 2867 - I thought it was a doc line
   drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_is_dpm_running':
   drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:1141:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    1141 |  int ret = 0;
         |      ^~~
   In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:32:
   At top level:
   drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smu_v11_0.h:68:43: warning: 'smu11_thermal_policy' defined but not used [-Wunused-const-variable=]
      68 | static const struct smu_temperature_range smu11_thermal_policy[] =
         |                                           ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:26:
   drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:190:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
     190 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
         |                  ^~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
                    from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
                    from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:65,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:26:
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
      76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
         |                                ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
      75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
         |                                ^~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
      74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
         |                                ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
      73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
         |                                ^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
      72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
         |                                ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
      67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
         |                                ^~~~~~~~~~~~~
   make[4]: *** [drivers/gpu/drm/i915/Makefile:307: drivers/gpu/drm/i915/ttm/i915_ttm.hdrtest] Error 1
   In file included from drivers/gpu/drm/i915/ttm/i915_ttm.h:4,
                    from <command-line>:
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:5:23: error: field 'bdev' has incomplete type
       5 |  struct ttm_bo_device bdev;
         |                       ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:6:2: error: unknown type name 'bool'
       6 |  bool mem_global_referenced;
         |  ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:7:2: error: unknown type name 'bool'
       7 |  bool initialized;
         |  ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:11:27: error: field 'base' has incomplete type
      11 |  struct ttm_buffer_object base;
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:12:23: error: field 'placement' has incomplete type
      12 |  struct ttm_placement placement;
         |                       ^~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h: In function 'ttm_to_i915_object':
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:17:9: error: implicit declaration of function 'container_of' [-Werror=implicit-function-declaration]
      17 |  return container_of(tbo, struct i915_ttm_object, base);
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_object_types.h:17:27: error: expected expression before 'struct'
      17 |  return container_of(tbo, struct i915_ttm_object, base);
         |                           ^~~~~~
   In file included from <command-line>:
   drivers/gpu/drm/i915/ttm/i915_ttm.h: At top level:
   drivers/gpu/drm/i915/ttm/i915_ttm.h:8:26: error: 'struct drm_i915_private' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
       8 | int i915_ttm_init(struct drm_i915_private *i915);
         |                          ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm.h:9:27: error: 'struct drm_i915_private' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
       9 | void i915_ttm_fini(struct drm_i915_private *i915);
         |                           ^~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_init':
>> drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:20:6: error: unused variable 'ret' [-Werror=unused-variable]
      20 |  int ret;
         |      ^~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:17:27: error: unused variable 'i915' [-Werror=unused-variable]
      17 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_fini':
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:35:27: error: unused variable 'i915' [-Werror=unused-variable]
      35 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: At top level:
>> drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:52:6: error: no previous prototype for 'i915_ttm_gtt_mgr_has_gart_addr' [-Werror=missing-prototypes]
      52 | bool i915_ttm_gtt_mgr_has_gart_addr(struct ttm_mem_reg *mem)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_alloc':
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:64:27: error: unused variable 'i915' [-Werror=unused-variable]
      64 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_new':
>> drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:105:17: error: unused variable 'mm' [-Werror=unused-variable]
     105 |  struct drm_mm *mm = &mgr->mm;
         |                 ^~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:103:27: error: unused variable 'i915' [-Werror=unused-variable]
     103 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c: In function 'i915_ttm_gtt_mgr_del':
   drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c:148:27: error: unused variable 'i915' [-Werror=unused-variable]
     148 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   cc1: all warnings being treated as errors
   make[4]: *** [scripts/Makefile.build:280: drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.o] Error 1
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_init':
>> drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:16:6: error: unused variable 'ret' [-Werror=unused-variable]
      16 |  int ret;
         |      ^~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:13:27: error: unused variable 'i915' [-Werror=unused-variable]
      13 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_fini':
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:31:27: error: unused variable 'i915' [-Werror=unused-variable]
      31 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_new':
>> drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:53:22: error: unused variable 'max_bytes' [-Werror=unused-variable]
      53 |  uint64_t mem_bytes, max_bytes;
         |                      ^~~~~~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:47:27: error: unused variable 'i915' [-Werror=unused-variable]
      47 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c: In function 'i915_ttm_vram_mgr_del':
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:144:22: error: unused variable 'nodes' [-Werror=unused-variable]
     144 |  struct drm_mm_node *nodes = mem->mm_node;
         |                      ^~~~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:143:28: error: unused variable 'mgr' [-Werror=unused-variable]
     143 |  struct i915_ttm_vram_mgr *mgr = man->priv;
         |                            ^~~
   drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.c:142:27: error: unused variable 'i915' [-Werror=unused-variable]
     142 |  struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
         |                           ^~~~
   cc1: all warnings being treated as errors
   make[4]: *** [scripts/Makefile.build:280: drivers/gpu/drm/i915/ttm/i915_ttm_vram_mgr.o] Error 1
   drivers/gpu/drm/i915/ttm/i915_ttm.c: In function 'i915_ttm_init_mem_type':
   drivers/gpu/drm/i915/ttm/i915_ttm.c:28:27: error: unused variable 'i915' [-Werror=unused-variable]
      28 |  struct drm_i915_private *i915 = to_i915_ttm_dev(bdev);
         |                           ^~~~
   cc1: all warnings being treated as errors
   make[4]: *** [scripts/Makefile.build:280: drivers/gpu/drm/i915/ttm/i915_ttm.o] Error 1
   make[4]: Target '__build' not remade because of errors.
   make[3]: *** [scripts/Makefile.build:497: drivers/gpu/drm/i915] Error 2
   make[3]: Target '__build' not remade because of errors.
   make[2]: *** [scripts/Makefile.build:497: drivers/gpu/drm] Error 2
   make[2]: Target '__build' not remade because of errors.
..

vim +/ret +20 drivers/gpu/drm/i915/ttm/i915_ttm_gtt_mgr.c

     9	
    10	struct i915_ttm_gtt_node {
    11		struct drm_mm_node node;
    12		struct ttm_buffer_object *tbo;
    13	};
    14	static int i915_ttm_gtt_mgr_init(struct ttm_mem_type_manager *man,
    15					  unsigned long p_size)
    16	{
    17		struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
    18		struct i915_ttm_gtt_mgr *mgr;
    19	
  > 20		int ret;
    21	
    22		mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
    23		if (!mgr)
    24			return -ENOMEM;
    25	
    26		drm_mm_init(&mgr->mm, 0, p_size);
    27		spin_lock_init(&mgr->lock);
    28		man->priv = mgr;
    29	
    30		return 0;
    31	}
    32	
    33	static int i915_ttm_gtt_mgr_fini(struct ttm_mem_type_manager *man)
    34	{
    35		struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
    36		struct i915_ttm_gtt_mgr *mgr = man->priv;
    37		spin_lock(&mgr->lock);
    38		drm_mm_takedown(&mgr->mm);
    39		spin_unlock(&mgr->lock);
    40		kfree(mgr);
    41		man->priv = NULL;
    42		return 0;
    43	}
    44	
    45	/**
    46	 * i915_ttm_gtt_mgr_has_gart_addr - Check if mem has address space
    47	 *
    48	 * @mem: the mem object to check
    49	 *
    50	 * Check if a mem object has already address space allocated.
    51	 */
  > 52	bool i915_ttm_gtt_mgr_has_gart_addr(struct ttm_mem_reg *mem)
    53	{
    54		struct i915_ttm_gtt_node *node = mem->mm_node;
    55	
    56		return (node->node.start != I915_BO_INVALID_OFFSET);
    57	}
    58	
    59	static int i915_ttm_gtt_mgr_alloc(struct ttm_mem_type_manager *man,
    60					  struct ttm_buffer_object *tbo,
    61					  const struct ttm_place *place,
    62					  struct ttm_mem_reg *mem)
    63	{
    64		struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
    65		struct i915_ttm_gtt_mgr *mgr = man->priv;
    66		struct i915_ttm_gtt_node *node = mem->mm_node;
    67		enum drm_mm_insert_mode mode;
    68		unsigned long fpfn, lpfn;
    69		int r;
    70	
    71		if (i915_ttm_gtt_mgr_has_gart_addr(mem))
    72			return 0;
    73	
    74		if (place)
    75			fpfn = place->fpfn;
    76		else
    77			fpfn = 0;
    78	
    79		if (place && place->lpfn)
    80			lpfn = place->lpfn;
    81		else
    82			lpfn = 0; //TODO
    83	
    84		mode = DRM_MM_INSERT_BEST;
    85		if (place && place->flags & TTM_PL_FLAG_TOPDOWN)
    86			mode = DRM_MM_INSERT_HIGH;
    87	
    88		spin_lock(&mgr->lock);
    89		r = drm_mm_insert_node_in_range(&mgr->mm, &node->node, mem->num_pages,
    90						mem->page_alignment, 0, fpfn, lpfn,
    91						mode);
    92		spin_unlock(&mgr->lock);
    93		if (r)
    94			mem->start = node->node.start;
    95		return r;
    96	}
    97					  
    98	static int i915_ttm_gtt_mgr_new(struct ttm_mem_type_manager *man,
    99					 struct ttm_buffer_object *tbo,
   100					 const struct ttm_place *place,
   101					 struct ttm_mem_reg *mem)
   102	{
   103		struct drm_i915_private *i915 = to_i915_ttm_dev(man->bdev);
   104		struct i915_ttm_gtt_mgr *mgr = man->priv;
 > 105		struct drm_mm *mm = &mgr->mm;
   106		struct i915_ttm_gtt_node *node;
   107		int r;
   108	
   109		spin_lock(&mgr->lock);
   110		if ((&tbo->mem == mem || tbo->mem.mem_type != TTM_PL_TT) &&
   111		    atomic64_read(&mgr->available) < mem->num_pages) {
   112			spin_unlock(&mgr->lock);
   113			return 0;
   114		}
   115		atomic64_sub(mem->num_pages, &mgr->available);
   116		spin_unlock(&mgr->lock);
   117	
   118		node = kzalloc(sizeof(*node), GFP_KERNEL);
   119		if (!node) {
   120			r = -ENOMEM;
   121			goto err_out;
   122		}
   123		node->node.start = I915_BO_INVALID_OFFSET;
   124		node->node.size = mem->num_pages;
   125		node->tbo = tbo;
   126		mem->mm_node = node;
   127	
   128		if (place->fpfn || place->lpfn || place->flags & TTM_PL_FLAG_TOPDOWN) {
   129			r = i915_ttm_gtt_mgr_alloc(man, tbo, place, mem);
   130			if (unlikely(r)) {
   131				kfree(node);
   132				mem->mm_node = NULL;
   133				r = 0;
   134				goto err_out;
   135			}
   136		} else {
   137			mem->start = node->node.start;
   138		}
   139		return 0;
   140	err_out:
   141		atomic64_add(mem->num_pages, &mgr->available);
   142		return r;
   143	}
   144	

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

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