* [spacemit-com:wip/k3-pm-v2.2 26/34] drivers/gpu/drm/spacemit/spacemit_cmdlist.c:131:20: warning: variable 'regs_in_row' set but not used
@ 2026-09-17 8:30 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-17 8:30 UTC (permalink / raw)
To: Cody Kang; +Cc: oe-kbuild-all, Yixun Lan
tree: https://github.com/spacemit-com/linux wip/k3-pm-v2.2
head: 5ea9c3b3027d262ccd72347a6874357174873fa0
commit: c26d1154f593a895582795a5ca198f4cd25e68b1 [26/34] drm/spacemit: add Saturn DPU DRM device driver
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260917/202609171659.KWi2D3ZW-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260917/202609171659.KWi2D3ZW-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609171659.KWi2D3ZW-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/spacemit/spacemit_cmdlist.c: In function 'cmdlist_regs_packing':
>> drivers/gpu/drm/spacemit/spacemit_cmdlist.c:131:20: warning: variable 'regs_in_row' set but not used [-Wunused-but-set-variable=]
131 | u8 regs_in_row = 0;
| ^~~~~~~~~~~
vim +/regs_in_row +131 drivers/gpu/drm/spacemit/spacemit_cmdlist.c
17f019205565e6 Cody Kang 2026-08-09 83
17f019205565e6 Cody Kang 2026-08-09 84 void cmdlist_regs_packing(struct cmdlist *cl, enum cmdlist_mode_type mod,
17f019205565e6 Cody Kang 2026-08-09 85 struct cmdlist_regs *cl_regs)
17f019205565e6 Cody Kang 2026-08-09 86 {
17f019205565e6 Cody Kang 2026-08-09 87 struct spacemit_crtc *a_crtc;
17f019205565e6 Cody Kang 2026-08-09 88 struct spacemit_drm_private *priv;
17f019205565e6 Cody Kang 2026-08-09 89 struct spacemit_hw_device *hwdev;
17f019205565e6 Cody Kang 2026-08-09 90 u32 *reg_base;
17f019205565e6 Cody Kang 2026-08-09 91 int i;
17f019205565e6 Cody Kang 2026-08-09 92 u32 index;
17f019205565e6 Cody Kang 2026-08-09 93
17f019205565e6 Cody Kang 2026-08-09 94 if (!cl_regs)
17f019205565e6 Cody Kang 2026-08-09 95 return;
17f019205565e6 Cody Kang 2026-08-09 96
17f019205565e6 Cody Kang 2026-08-09 97 if (cl->type == CMDLIST_PLANE) {
17f019205565e6 Cody Kang 2026-08-09 98 struct spacemit_plane_state *spacemit_pstate =
17f019205565e6 Cody Kang 2026-08-09 99 cl_to_spacemit_pstate(cl);
17f019205565e6 Cody Kang 2026-08-09 100
17f019205565e6 Cody Kang 2026-08-09 101 a_crtc = to_spacemit_crtc(spacemit_pstate->state.crtc);
17f019205565e6 Cody Kang 2026-08-09 102
17f019205565e6 Cody Kang 2026-08-09 103 drm_dbg(a_crtc->crtc.dev, "rch_id = %d, ch_y = %u\n",
17f019205565e6 Cody Kang 2026-08-09 104 spacemit_pstate->rdma_id,
17f019205565e6 Cody Kang 2026-08-09 105 spacemit_pstate->state.crtc_y);
17f019205565e6 Cody Kang 2026-08-09 106 } else if (cl->type == CMDLIST_CRTC) {
17f019205565e6 Cody Kang 2026-08-09 107 struct spacemit_crtc_state *spacemit_cstate =
17f019205565e6 Cody Kang 2026-08-09 108 cl_to_spacemit_cstate(cl);
17f019205565e6 Cody Kang 2026-08-09 109
17f019205565e6 Cody Kang 2026-08-09 110 a_crtc = to_spacemit_crtc(spacemit_cstate->base.crtc);
17f019205565e6 Cody Kang 2026-08-09 111 } else {
17f019205565e6 Cody Kang 2026-08-09 112 WARN_ONCE(1, "unsupported cmdlist type %d\n", cl->type);
17f019205565e6 Cody Kang 2026-08-09 113 return;
17f019205565e6 Cody Kang 2026-08-09 114 }
17f019205565e6 Cody Kang 2026-08-09 115
17f019205565e6 Cody Kang 2026-08-09 116 priv = a_crtc->crtc.dev->dev_private;
17f019205565e6 Cody Kang 2026-08-09 117 hwdev = priv->hwdev;
17f019205565e6 Cody Kang 2026-08-09 118 reg_base = cl_regs->module;
17f019205565e6 Cody Kang 2026-08-09 119
17f019205565e6 Cody Kang 2026-08-09 120 cl->mode_mask |= mod;
17f019205565e6 Cody Kang 2026-08-09 121
17f019205565e6 Cody Kang 2026-08-09 122 /*
17f019205565e6 Cody Kang 2026-08-09 123 * Without the atomic_check() buffer the staged register writes vanish.
17f019205565e6 Cody Kang 2026-08-09 124 */
17f019205565e6 Cody Kang 2026-08-09 125 if (drm_WARN_ON(a_crtc->crtc.dev, !cl->va))
17f019205565e6 Cody Kang 2026-08-09 126 return;
17f019205565e6 Cody Kang 2026-08-09 127
17f019205565e6 Cody Kang 2026-08-09 128 for (i = 0; i < cl_regs->size;) {
17f019205565e6 Cody Kang 2026-08-09 129 u32 value[CMDLIST_ROW_REGS] = {0x0};
17f019205565e6 Cody Kang 2026-08-09 130 u32 offset, strobe = 0;
17f019205565e6 Cody Kang 2026-08-09 @131 u8 regs_in_row = 0;
17f019205565e6 Cody Kang 2026-08-09 132
17f019205565e6 Cody Kang 2026-08-09 133 if (cl_regs->flags[i]) {
17f019205565e6 Cody Kang 2026-08-09 134 offset = cl_regs->base + i * sizeof(u32);
17f019205565e6 Cody Kang 2026-08-09 135 for (u8 j = 0; j < CMDLIST_ROW_REGS; j++) {
17f019205565e6 Cody Kang 2026-08-09 136 index = i + j;
17f019205565e6 Cody Kang 2026-08-09 137 if (likely(index < cl_regs->size)) {
17f019205565e6 Cody Kang 2026-08-09 138 if (cl_regs->flags[index]) {
17f019205565e6 Cody Kang 2026-08-09 139 value[j] = reg_base[index];
17f019205565e6 Cody Kang 2026-08-09 140 regs_in_row++;
17f019205565e6 Cody Kang 2026-08-09 141 strobe |= CMDLIST_REG_STROBE(j);
17f019205565e6 Cody Kang 2026-08-09 142 }
17f019205565e6 Cody Kang 2026-08-09 143 } else {
17f019205565e6 Cody Kang 2026-08-09 144 break;
17f019205565e6 Cody Kang 2026-08-09 145 }
17f019205565e6 Cody Kang 2026-08-09 146 }
17f019205565e6 Cody Kang 2026-08-09 147 hwdev->cmdlist_fill_data_row(cl, strobe, offset, value);
17f019205565e6 Cody Kang 2026-08-09 148 /*
17f019205565e6 Cody Kang 2026-08-09 149 * the row covers the whole window; a shorter stride
17f019205565e6 Cody Kang 2026-08-09 150 * would revisit covered words as duplicate rows
17f019205565e6 Cody Kang 2026-08-09 151 */
17f019205565e6 Cody Kang 2026-08-09 152 i += CMDLIST_ROW_REGS;
17f019205565e6 Cody Kang 2026-08-09 153 cl->nod_len++;
17f019205565e6 Cody Kang 2026-08-09 154 } else {
17f019205565e6 Cody Kang 2026-08-09 155 i++;
17f019205565e6 Cody Kang 2026-08-09 156 }
17f019205565e6 Cody Kang 2026-08-09 157 }
17f019205565e6 Cody Kang 2026-08-09 158
17f019205565e6 Cody Kang 2026-08-09 159 drm_dbg(a_crtc->crtc.dev, "row_num = %d\n", cl->nod_len);
17f019205565e6 Cody Kang 2026-08-09 160 }
17f019205565e6 Cody Kang 2026-08-09 161
:::::: The code at line 131 was first introduced by commit
:::::: 17f019205565e6d42c17962e5520ae6daa890946 drm/spacemit: add Saturn DPU core types, cmdlist and display MMU
:::::: TO: Cody Kang <codykang.hk@gmail.com>
:::::: CC: Yixun Lan <dlan@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-17 8:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 8:30 [spacemit-com:wip/k3-pm-v2.2 26/34] drivers/gpu/drm/spacemit/spacemit_cmdlist.c:131:20: warning: variable 'regs_in_row' set but not used 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.