mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
drm/sysfs: switch to drm device based logging
Prefer drm_dbg_kms() and drm_dbg_lease() over DRM_DEBUG_KMS() and DRM_DEBUG() to debug log the drm device info. Fix some debug categories and unify connector logging while at it. v2: Drop superfluous newline Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/7f3dd5b4a33f964c6903c7a964da5397f4084aeb.1712568037.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
0ae55a4c9a
commit
6b2a8a050f
@ -209,10 +209,9 @@ static ssize_t status_store(struct device *device,
|
||||
ret = -EINVAL;
|
||||
|
||||
if (old_force != connector->force || !connector->force) {
|
||||
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force updated from %d to %d or reprobing\n",
|
||||
connector->base.id,
|
||||
connector->name,
|
||||
old_force, connector->force);
|
||||
drm_dbg_kms(dev, "[CONNECTOR:%d:%s] force updated from %d to %d or reprobing\n",
|
||||
connector->base.id, connector->name,
|
||||
old_force, connector->force);
|
||||
|
||||
connector->funcs->fill_modes(connector,
|
||||
dev->mode_config.max_width,
|
||||
@ -383,8 +382,8 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
|
||||
if (r)
|
||||
goto err_free;
|
||||
|
||||
DRM_DEBUG("adding \"%s\" to sysfs\n",
|
||||
connector->name);
|
||||
drm_dbg_kms(dev, "[CONNECTOR:%d:%s] adding connector to sysfs\n",
|
||||
connector->base.id, connector->name);
|
||||
|
||||
r = device_add(kdev);
|
||||
if (r) {
|
||||
@ -430,8 +429,9 @@ void drm_sysfs_connector_remove(struct drm_connector *connector)
|
||||
if (dev_fwnode(connector->kdev))
|
||||
component_del(connector->kdev, &typec_connector_ops);
|
||||
|
||||
DRM_DEBUG("removing \"%s\" from sysfs\n",
|
||||
connector->name);
|
||||
drm_dbg_kms(connector->dev,
|
||||
"[CONNECTOR:%d:%s] removing connector from sysfs\n",
|
||||
connector->base.id, connector->name);
|
||||
|
||||
device_unregister(connector->kdev);
|
||||
connector->kdev = NULL;
|
||||
@ -442,7 +442,7 @@ void drm_sysfs_lease_event(struct drm_device *dev)
|
||||
char *event_string = "LEASE=1";
|
||||
char *envp[] = { event_string, NULL };
|
||||
|
||||
DRM_DEBUG("generating lease event\n");
|
||||
drm_dbg_lease(dev, "generating lease event\n");
|
||||
|
||||
kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp);
|
||||
}
|
||||
@ -463,7 +463,7 @@ void drm_sysfs_hotplug_event(struct drm_device *dev)
|
||||
char *event_string = "HOTPLUG=1";
|
||||
char *envp[] = { event_string, NULL };
|
||||
|
||||
DRM_DEBUG("generating hotplug event\n");
|
||||
drm_dbg_kms(dev, "generating hotplug event\n");
|
||||
|
||||
kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user