* [asahilinux:pr/237 3/3] drivers/gpu/drm/apple/iomfb.c:231:21: warning: variable 'dev' set but not used
@ 2023-11-25 10:14 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-25 10:14 UTC (permalink / raw)
To: Janne Grunau; +Cc: llvm, oe-kbuild-all
tree: https://github.com/AsahiLinux/linux pr/237
head: 7b22b1e89a2618d45e40e5a9cf456d81cec2507b
commit: 7b22b1e89a2618d45e40e5a9cf456d81cec2507b [3/3] drm: apple: iomfb: Use drm_kms_helper_connector_hotplug_event
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20231125/202311251722.t9dGaySl-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231125/202311251722.t9dGaySl-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/202311251722.t9dGaySl-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/apple/iomfb.c:231:21: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
231 | struct drm_device *dev;
| ^
drivers/gpu/drm/apple/iomfb.c:504:6: warning: no previous prototype for function 'iomfb_start' [-Wmissing-prototypes]
504 | void iomfb_start(struct apple_dcp *dcp)
| ^
drivers/gpu/drm/apple/iomfb.c:504:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
504 | void iomfb_start(struct apple_dcp *dcp)
| ^
| static
2 warnings generated.
vim +/dev +231 drivers/gpu/drm/apple/iomfb.c
65b4ebeb872630 Janne Grunau 2022-10-02 220
65b4ebeb872630 Janne Grunau 2022-10-02 221 /*
65b4ebeb872630 Janne Grunau 2022-10-02 222 * Helper to send a DRM hotplug event. The DCP is accessed from a single
65b4ebeb872630 Janne Grunau 2022-10-02 223 * (RTKit) thread. To handle hotplug callbacks, we need to call
65b4ebeb872630 Janne Grunau 2022-10-02 224 * drm_kms_helper_hotplug_event, which does an atomic commit (via DCP) and
65b4ebeb872630 Janne Grunau 2022-10-02 225 * waits for vblank (a DCP callback). That means we deadlock if we call from
65b4ebeb872630 Janne Grunau 2022-10-02 226 * the RTKit thread! Instead, move the call to another thread via a workqueue.
65b4ebeb872630 Janne Grunau 2022-10-02 227 */
65b4ebeb872630 Janne Grunau 2022-10-02 228 void dcp_hotplug(struct work_struct *work)
65b4ebeb872630 Janne Grunau 2022-10-02 229 {
65b4ebeb872630 Janne Grunau 2022-10-02 230 struct apple_connector *connector;
65b4ebeb872630 Janne Grunau 2022-10-02 @231 struct drm_device *dev;
65b4ebeb872630 Janne Grunau 2022-10-02 232 struct apple_dcp *dcp;
65b4ebeb872630 Janne Grunau 2022-10-02 233
65b4ebeb872630 Janne Grunau 2022-10-02 234 connector = container_of(work, struct apple_connector, hotplug_wq);
65b4ebeb872630 Janne Grunau 2022-10-02 235 dev = connector->base.dev;
65b4ebeb872630 Janne Grunau 2022-10-02 236
65b4ebeb872630 Janne Grunau 2022-10-02 237 dcp = platform_get_drvdata(connector->dcp);
ddd996d7221142 Janne Grunau 2023-11-21 238 dev_info(dcp->dev, "%s() connected:%d valid_mode:%d\n", __func__,
ddd996d7221142 Janne Grunau 2023-11-21 239 connector->connected, dcp->valid_mode);
65b4ebeb872630 Janne Grunau 2022-10-02 240
65b4ebeb872630 Janne Grunau 2022-10-02 241 /*
65b4ebeb872630 Janne Grunau 2022-10-02 242 * DCP defers link training until we set a display mode. But we set
65b4ebeb872630 Janne Grunau 2022-10-02 243 * display modes from atomic_flush, so userspace needs to trigger a
65b4ebeb872630 Janne Grunau 2022-10-02 244 * flush, or the CRTC gets no signal.
65b4ebeb872630 Janne Grunau 2022-10-02 245 */
7b22b1e89a2618 Janne Grunau 2023-11-23 246 if (connector->base.state && !dcp->valid_mode && connector->connected)
7b22b1e89a2618 Janne Grunau 2023-11-23 247 drm_connector_set_link_status_property(&connector->base,
7b22b1e89a2618 Janne Grunau 2023-11-23 248 DRM_MODE_LINK_STATUS_BAD);
65b4ebeb872630 Janne Grunau 2022-10-02 249
7b22b1e89a2618 Janne Grunau 2023-11-23 250 drm_kms_helper_connector_hotplug_event(&connector->base);
65b4ebeb872630 Janne Grunau 2022-10-02 251 }
65b4ebeb872630 Janne Grunau 2022-10-02 252 EXPORT_SYMBOL_GPL(dcp_hotplug);
65b4ebeb872630 Janne Grunau 2022-10-02 253
:::::: The code at line 231 was first introduced by commit
:::::: 65b4ebeb872630604d40dad74fc4e963ec261d9a drm/apple: Split dcpep/iomfb out of dcp.c
:::::: TO: Janne Grunau <j@jannau.net>
:::::: CC: Hector Martin <marcan@marcan.st>
--
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-11-25 10:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-25 10:14 [asahilinux:pr/237 3/3] drivers/gpu/drm/apple/iomfb.c:231:21: warning: variable 'dev' 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.