[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007181058.DykNCEfx%lkp@intel.com>
Date: Sat, 18 Jul 2020 11:00:04 +0800
From: kernel test robot <lkp@...el.com>
To: Drew Davenport <ddavenport@...omium.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Rob Clark <robdclark@...omium.org>
Subject: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:959:30: warning:
variable 'topology' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4ebf8d7649cd86c41c41bf48da4b7761da2d5009
commit: de3916c70a24e3e1bdbf6b0a77d75b069d8953d9 drm/msm/dpu: Track resources in global state
date: 4 months ago
config: arm-randconfig-r026-20200717 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout de3916c70a24e3e1bdbf6b0a77d75b069d8953d9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function 'dpu_encoder_virt_mode_set':
>> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:959:30: warning: variable 'topology' set but not used [-Wunused-but-set-variable]
959 | struct msm_display_topology topology;
| ^~~~~~~~
vim +/topology +959 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 946
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 947 static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc,
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 948 struct drm_display_mode *mode,
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 949 struct drm_display_mode *adj_mode)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 950 {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 951 struct dpu_encoder_virt *dpu_enc;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 952 struct msm_drm_private *priv;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 953 struct dpu_kms *dpu_kms;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 954 struct list_head *connector_list;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 955 struct drm_connector *conn = NULL, *conn_iter;
c2ab55a68a3374 Jeykumar Sankaran 2019-02-13 956 struct drm_crtc *drm_crtc;
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 957 struct dpu_crtc_state *cstate;
de3916c70a24e3 Drew Davenport 2020-02-19 958 struct dpu_global_state *global_state;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 @959 struct msm_display_topology topology;
b954fa6baaca7a Drew Davenport 2020-02-19 960 struct dpu_hw_blk *hw_pp[MAX_CHANNELS_PER_ENC];
b954fa6baaca7a Drew Davenport 2020-02-19 961 struct dpu_hw_blk *hw_ctl[MAX_CHANNELS_PER_ENC];
b954fa6baaca7a Drew Davenport 2020-02-19 962 struct dpu_hw_blk *hw_lm[MAX_CHANNELS_PER_ENC];
b954fa6baaca7a Drew Davenport 2020-02-19 963 int num_lm, num_ctl, num_pp;
de3916c70a24e3 Drew Davenport 2020-02-19 964 int i, j;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 965
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 966 if (!drm_enc) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 967 DPU_ERROR("invalid encoder\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 968 return;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 969 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 970
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 971 dpu_enc = to_dpu_encoder_virt(drm_enc);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 972 DPU_DEBUG_ENC(dpu_enc, "\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 973
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 974 priv = drm_enc->dev->dev_private;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 975 dpu_kms = to_dpu_kms(priv->kms);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 976 connector_list = &dpu_kms->dev->mode_config.connector_list;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 977
de3916c70a24e3 Drew Davenport 2020-02-19 978 global_state = dpu_kms_get_existing_global_state(dpu_kms);
de3916c70a24e3 Drew Davenport 2020-02-19 979 if (IS_ERR_OR_NULL(global_state)) {
de3916c70a24e3 Drew Davenport 2020-02-19 980 DPU_ERROR("Failed to get global state");
de3916c70a24e3 Drew Davenport 2020-02-19 981 return;
de3916c70a24e3 Drew Davenport 2020-02-19 982 }
de3916c70a24e3 Drew Davenport 2020-02-19 983
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 984 trace_dpu_enc_mode_set(DRMID(drm_enc));
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 985
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 986 list_for_each_entry(conn_iter, connector_list, head)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 987 if (conn_iter->encoder == drm_enc)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 988 conn = conn_iter;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 989
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 990 if (!conn) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 991 DPU_ERROR_ENC(dpu_enc, "failed to find attached connector\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 992 return;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 993 } else if (!conn->state) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 994 DPU_ERROR_ENC(dpu_enc, "invalid connector state\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 995 return;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 996 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 997
c2ab55a68a3374 Jeykumar Sankaran 2019-02-13 998 drm_for_each_crtc(drm_crtc, drm_enc->dev)
c2ab55a68a3374 Jeykumar Sankaran 2019-02-13 999 if (drm_crtc->state->encoder_mask & drm_encoder_mask(drm_enc))
c2ab55a68a3374 Jeykumar Sankaran 2019-02-13 1000 break;
c2ab55a68a3374 Jeykumar Sankaran 2019-02-13 1001
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1002 topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1003
de3916c70a24e3 Drew Davenport 2020-02-19 1004 /* Query resource that have been reserved in atomic check step. */
de3916c70a24e3 Drew Davenport 2020-02-19 1005 num_pp = dpu_rm_get_assigned_resources(&dpu_kms->rm, global_state,
de3916c70a24e3 Drew Davenport 2020-02-19 1006 drm_enc->base.id, DPU_HW_BLK_PINGPONG, hw_pp,
de3916c70a24e3 Drew Davenport 2020-02-19 1007 ARRAY_SIZE(hw_pp));
de3916c70a24e3 Drew Davenport 2020-02-19 1008 num_ctl = dpu_rm_get_assigned_resources(&dpu_kms->rm, global_state,
de3916c70a24e3 Drew Davenport 2020-02-19 1009 drm_enc->base.id, DPU_HW_BLK_CTL, hw_ctl, ARRAY_SIZE(hw_ctl));
de3916c70a24e3 Drew Davenport 2020-02-19 1010 num_lm = dpu_rm_get_assigned_resources(&dpu_kms->rm, global_state,
de3916c70a24e3 Drew Davenport 2020-02-19 1011 drm_enc->base.id, DPU_HW_BLK_LM, hw_lm, ARRAY_SIZE(hw_lm));
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1012
b954fa6baaca7a Drew Davenport 2020-02-19 1013 for (i = 0; i < MAX_CHANNELS_PER_ENC; i++)
b954fa6baaca7a Drew Davenport 2020-02-19 1014 dpu_enc->hw_pp[i] = i < num_pp ? to_dpu_hw_pingpong(hw_pp[i])
b954fa6baaca7a Drew Davenport 2020-02-19 1015 : NULL;
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1016
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1017 cstate = to_dpu_crtc_state(drm_crtc->state);
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1018
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1019 for (i = 0; i < num_lm; i++) {
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1020 int ctl_idx = (i < num_ctl) ? i : (num_ctl-1);
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1021
b954fa6baaca7a Drew Davenport 2020-02-19 1022 cstate->mixers[i].hw_lm = to_dpu_hw_mixer(hw_lm[i]);
b954fa6baaca7a Drew Davenport 2020-02-19 1023 cstate->mixers[i].lm_ctl = to_dpu_hw_ctl(hw_ctl[ctl_idx]);
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1024 }
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1025
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1026 cstate->num_mixers = num_lm;
b107603b4ad0f2 Jeykumar Sankaran 2019-02-13 1027
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1028 for (i = 0; i < dpu_enc->num_phys_encs; i++) {
b954fa6baaca7a Drew Davenport 2020-02-19 1029 int num_blk;
b954fa6baaca7a Drew Davenport 2020-02-19 1030 struct dpu_hw_blk *hw_blk[MAX_CHANNELS_PER_ENC];
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1031 struct dpu_encoder_phys *phys = dpu_enc->phys_encs[i];
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1032
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1033 if (!dpu_enc->hw_pp[i]) {
b6fadcade62704 Drew Davenport 2019-12-06 1034 DPU_ERROR_ENC(dpu_enc,
b6fadcade62704 Drew Davenport 2019-12-06 1035 "no pp block assigned at idx: %d\n", i);
de3916c70a24e3 Drew Davenport 2020-02-19 1036 return;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1037 }
3f4db2e2cc4128 Jeykumar Sankaran 2018-09-05 1038
3f4db2e2cc4128 Jeykumar Sankaran 2018-09-05 1039 if (!hw_ctl[i]) {
b6fadcade62704 Drew Davenport 2019-12-06 1040 DPU_ERROR_ENC(dpu_enc,
b6fadcade62704 Drew Davenport 2019-12-06 1041 "no ctl block assigned at idx: %d\n", i);
de3916c70a24e3 Drew Davenport 2020-02-19 1042 return;
3f4db2e2cc4128 Jeykumar Sankaran 2018-09-05 1043 }
3f4db2e2cc4128 Jeykumar Sankaran 2018-09-05 1044
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1045 phys->hw_pp = dpu_enc->hw_pp[i];
b954fa6baaca7a Drew Davenport 2020-02-19 1046 phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[i]);
3f4db2e2cc4128 Jeykumar Sankaran 2018-09-05 1047
b954fa6baaca7a Drew Davenport 2020-02-19 1048 num_blk = dpu_rm_get_assigned_resources(&dpu_kms->rm,
de3916c70a24e3 Drew Davenport 2020-02-19 1049 global_state, drm_enc->base.id, DPU_HW_BLK_INTF,
de3916c70a24e3 Drew Davenport 2020-02-19 1050 hw_blk, ARRAY_SIZE(hw_blk));
b954fa6baaca7a Drew Davenport 2020-02-19 1051 for (j = 0; j < num_blk; j++) {
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1052 struct dpu_hw_intf *hw_intf;
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1053
b954fa6baaca7a Drew Davenport 2020-02-19 1054 hw_intf = to_dpu_hw_intf(hw_blk[i]);
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1055 if (hw_intf->idx == phys->intf_idx)
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1056 phys->hw_intf = hw_intf;
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1057 }
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1058
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1059 if (!phys->hw_intf) {
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1060 DPU_ERROR_ENC(dpu_enc,
b6fadcade62704 Drew Davenport 2019-12-06 1061 "no intf block assigned at idx: %d\n", i);
de3916c70a24e3 Drew Davenport 2020-02-19 1062 return;
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1063 }
9d4c8fd1af4687 Jeykumar Sankaran 2019-02-13 1064
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1065 phys->connector = conn->state->connector;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1066 if (phys->ops.mode_set)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1067 phys->ops.mode_set(phys, mode, adj_mode);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1068 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1069 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1070
:::::: The code at line 959 was first introduced by commit
:::::: 25fdd5933e4c0f5fe2ea5cd59994f8ac5fbe90ef drm/msm: Add SDM845 DPU support
:::::: TO: Jeykumar Sankaran <jsanka@...eaurora.org>
:::::: CC: Sean Paul <seanpaul@...omium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (34951 bytes)
Powered by blists - more mailing lists