* [asahilinux:bits/200-dcp 41/115] drivers/gpu/drm/apple/dcp.c:189:45: warning: variable 'old_state' set but not used
@ 2023-09-25 0:10 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-25 0:10 UTC (permalink / raw)
To: Janne Grunau; +Cc: oe-kbuild-all, Hector Martin
tree: https://github.com/AsahiLinux/linux bits/200-dcp
head: f4266bb9a0d063559ea03f3a46244bb54c167e0c
commit: bd2514bb7f205c34b109c693edfad7853892e33e [41/115] gpu: drm: apple: Add dcp_crtc_atomic_check
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230925/202309250814.ATvf4pce-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230925/202309250814.ATvf4pce-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/202309250814.ATvf4pce-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/apple/dcp.c: In function 'dcp_crtc_atomic_check':
>> drivers/gpu/drm/apple/dcp.c:189:45: warning: variable 'old_state' set but not used [-Wunused-but-set-variable]
189 | struct drm_plane_state *new_state, *old_state;
| ^~~~~~~~~
vim +/old_state +189 drivers/gpu/drm/apple/dcp.c
184
185 int dcp_crtc_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state)
186 {
187 struct platform_device *pdev = to_apple_crtc(crtc)->dcp;
188 struct apple_dcp *dcp = platform_get_drvdata(pdev);
> 189 struct drm_plane_state *new_state, *old_state;
190 struct drm_plane *plane;
191 struct drm_crtc_state *crtc_state;
192 int plane_idx, plane_count = 0;
193 bool needs_modeset;
194
195 if (dcp->crashed)
196 return -EINVAL;
197
198 crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
199
200 needs_modeset = drm_atomic_crtc_needs_modeset(crtc_state) || !dcp->valid_mode;
201 if (!needs_modeset && !dcp->connector->connected) {
202 dev_err(dcp->dev, "crtc_atomic_check: disconnected but no modeset");
203 return -EINVAL;
204 }
205
206 for_each_oldnew_plane_in_state(state, plane, old_state, new_state, plane_idx) {
207 /* skip planes not for this crtc */
208 if (new_state->crtc != crtc)
209 continue;
210
211 plane_count += 1;
212 }
213
214 if (plane_count > DCP_MAX_PLANES) {
215 dev_err(dcp->dev, "crtc_atomic_check: Blend supports only 2 layers!");
216 return -EINVAL;
217 }
218
219 return 0;
220 }
221 EXPORT_SYMBOL_GPL(dcp_crtc_atomic_check);
222
--
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:[~2023-09-25 0:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 0:10 [asahilinux:bits/200-dcp 41/115] drivers/gpu/drm/apple/dcp.c:189:45: warning: variable 'old_state' 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.