Hi Hans,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip linus/master v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Hans-de-Goede/drm-Add-privacy-sc...
base:
git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-a014-20210414 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/8cb16e16d419f6ea9da13b9826a2d1d7a...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Hans-de-Goede/drm-Add-privacy-screen-class-and-connector-properties/20210414-231316
git checkout 8cb16e16d419f6ea9da13b9826a2d1d7ad5a9819
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/gpu/drm/drm_connector.o: in function `drm_connector_unregister':
> drivers/gpu/drm/drm_connector.c:573: undefined reference to
`drm_privacy_screen_unregister_notifier'
ld: drivers/gpu/drm/drm_connector.o:
in function `drm_connector_update_privacy_screen_properties':
> drivers/gpu/drm/drm_connector.c:2377: undefined reference to
`drm_privacy_screen_get_state'
ld: drivers/gpu/drm/drm_connector.o: in
function `drm_connector_register':
> drivers/gpu/drm/drm_connector.c:541: undefined reference to
`drm_privacy_screen_register_notifier'
ld: drivers/gpu/drm/drm_connector.o:
in function `drm_connector_update_privacy_screen':
> drivers/gpu/drm/drm_connector.c:2457: undefined reference to
`drm_privacy_screen_set_sw_state'
ld: drivers/gpu/drm/drm_connector.o: in
function `drm_connector_cleanup':
> drivers/gpu/drm/drm_connector.c:457: undefined reference to
`drm_privacy_screen_put'
vim +573 drivers/gpu/drm/drm_connector.c
437
438 /**
439 * drm_connector_cleanup - cleans up an initialised connector
440 * @connector: connector to cleanup
441 *
442 * Cleans up the connector but doesn't free the object.
443 */
444 void drm_connector_cleanup(struct drm_connector *connector)
445 {
446 struct drm_device *dev = connector->dev;
447 struct drm_display_mode *mode, *t;
448
449 /* The connector should have been removed from userspace long before
450 * it is finally destroyed.
451 */
452 if (WARN_ON(connector->registration_state ==
453 DRM_CONNECTOR_REGISTERED))
454 drm_connector_unregister(connector);
455
456 if (connector->privacy_screen) {
457 drm_privacy_screen_put(connector->privacy_screen);
458 connector->privacy_screen = NULL;
459 }
460
461 if (connector->tile_group) {
462 drm_mode_put_tile_group(dev, connector->tile_group);
463 connector->tile_group = NULL;
464 }
465
466 list_for_each_entry_safe(mode, t, &connector->probed_modes, head)
467 drm_mode_remove(connector, mode);
468
469 list_for_each_entry_safe(mode, t, &connector->modes, head)
470 drm_mode_remove(connector, mode);
471
472 ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida,
473 connector->connector_type_id);
474
475 ida_simple_remove(&dev->mode_config.connector_ida,
476 connector->index);
477
478 kfree(connector->display_info.bus_formats);
479 drm_mode_object_unregister(dev, &connector->base);
480 kfree(connector->name);
481 connector->name = NULL;
482 spin_lock_irq(&dev->mode_config.connector_list_lock);
483 list_del(&connector->head);
484 dev->mode_config.num_connector--;
485 spin_unlock_irq(&dev->mode_config.connector_list_lock);
486
487 WARN_ON(connector->state &&
!connector->funcs->atomic_destroy_state);
488 if (connector->state && connector->funcs->atomic_destroy_state)
489 connector->funcs->atomic_destroy_state(connector,
490 connector->state);
491
492 mutex_destroy(&connector->mutex);
493
494 memset(connector, 0, sizeof(*connector));
495 }
496 EXPORT_SYMBOL(drm_connector_cleanup);
497
498 /**
499 * drm_connector_register - register a connector
500 * @connector: the connector to register
501 *
502 * Register userspace interfaces for a connector. Only call this for connectors
503 * which can be hotplugged after drm_dev_register() has been called already,
504 * e.g. DP MST connectors. All other connectors will be registered automatically
505 * when calling drm_dev_register().
506 *
507 * Returns:
508 * Zero on success, error code on failure.
509 */
510 int drm_connector_register(struct drm_connector *connector)
511 {
512 int ret = 0;
513
514 if (!connector->dev->registered)
515 return 0;
516
517 mutex_lock(&connector->mutex);
518 if (connector->registration_state != DRM_CONNECTOR_INITIALIZING)
519 goto unlock;
520
521 ret = drm_sysfs_connector_add(connector);
522 if (ret)
523 goto unlock;
524
525 drm_debugfs_connector_add(connector);
526
527 if (connector->funcs->late_register) {
528 ret = connector->funcs->late_register(connector);
529 if (ret)
530 goto err_debugfs;
531 }
532
533 drm_mode_object_register(connector->dev, &connector->base);
534
535 connector->registration_state = DRM_CONNECTOR_REGISTERED;
536
537 /* Let userspace know we have a new connector */
538 drm_sysfs_hotplug_event(connector->dev);
539
540 if (connector->privacy_screen)
541 drm_privacy_screen_register_notifier(connector->privacy_screen,
542 &connector->privacy_screen_notifier);
543
544 goto unlock;
545
546 err_debugfs:
547 drm_debugfs_connector_remove(connector);
548 drm_sysfs_connector_remove(connector);
549 unlock:
550 mutex_unlock(&connector->mutex);
551 return ret;
552 }
553 EXPORT_SYMBOL(drm_connector_register);
554
555 /**
556 * drm_connector_unregister - unregister a connector
557 * @connector: the connector to unregister
558 *
559 * Unregister userspace interfaces for a connector. Only call this for
560 * connectors which have registered explicitly by calling drm_dev_register(),
561 * since connectors are unregistered automatically when drm_dev_unregister() is
562 * called.
563 */
564 void drm_connector_unregister(struct drm_connector *connector)
565 {
566 mutex_lock(&connector->mutex);
567 if (connector->registration_state != DRM_CONNECTOR_REGISTERED) {
568 mutex_unlock(&connector->mutex);
569 return;
570 }
571
572 if (connector->privacy_screen)
573 drm_privacy_screen_unregister_notifier(
574 connector->privacy_screen,
575 &connector->privacy_screen_notifier);
576
577 if (connector->funcs->early_unregister)
578 connector->funcs->early_unregister(connector);
579
580 drm_sysfs_connector_remove(connector);
581 drm_debugfs_connector_remove(connector);
582
583 connector->registration_state = DRM_CONNECTOR_UNREGISTERED;
584 mutex_unlock(&connector->mutex);
585 }
586 EXPORT_SYMBOL(drm_connector_unregister);
587
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org