Commit 6b2a8a05 authored by Jani Nikula's avatar Jani Nikula

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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/7f3dd5b4a33f964c6903c7a964da5397f4084aeb.1712568037.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 0ae55a4c
...@@ -209,10 +209,9 @@ static ssize_t status_store(struct device *device, ...@@ -209,10 +209,9 @@ static ssize_t status_store(struct device *device,
ret = -EINVAL; ret = -EINVAL;
if (old_force != connector->force || !connector->force) { if (old_force != connector->force || !connector->force) {
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force updated from %d to %d or reprobing\n", drm_dbg_kms(dev, "[CONNECTOR:%d:%s] force updated from %d to %d or reprobing\n",
connector->base.id, connector->base.id, connector->name,
connector->name, old_force, connector->force);
old_force, connector->force);
connector->funcs->fill_modes(connector, connector->funcs->fill_modes(connector,
dev->mode_config.max_width, dev->mode_config.max_width,
...@@ -383,8 +382,8 @@ int drm_sysfs_connector_add(struct drm_connector *connector) ...@@ -383,8 +382,8 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
if (r) if (r)
goto err_free; goto err_free;
DRM_DEBUG("adding \"%s\" to sysfs\n", drm_dbg_kms(dev, "[CONNECTOR:%d:%s] adding connector to sysfs\n",
connector->name); connector->base.id, connector->name);
r = device_add(kdev); r = device_add(kdev);
if (r) { if (r) {
...@@ -430,8 +429,9 @@ void drm_sysfs_connector_remove(struct drm_connector *connector) ...@@ -430,8 +429,9 @@ void drm_sysfs_connector_remove(struct drm_connector *connector)
if (dev_fwnode(connector->kdev)) if (dev_fwnode(connector->kdev))
component_del(connector->kdev, &typec_connector_ops); component_del(connector->kdev, &typec_connector_ops);
DRM_DEBUG("removing \"%s\" from sysfs\n", drm_dbg_kms(connector->dev,
connector->name); "[CONNECTOR:%d:%s] removing connector from sysfs\n",
connector->base.id, connector->name);
device_unregister(connector->kdev); device_unregister(connector->kdev);
connector->kdev = NULL; connector->kdev = NULL;
...@@ -442,7 +442,7 @@ void drm_sysfs_lease_event(struct drm_device *dev) ...@@ -442,7 +442,7 @@ void drm_sysfs_lease_event(struct drm_device *dev)
char *event_string = "LEASE=1"; char *event_string = "LEASE=1";
char *envp[] = { event_string, NULL }; 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); kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp);
} }
...@@ -463,7 +463,7 @@ void drm_sysfs_hotplug_event(struct drm_device *dev) ...@@ -463,7 +463,7 @@ void drm_sysfs_hotplug_event(struct drm_device *dev)
char *event_string = "HOTPLUG=1"; char *event_string = "HOTPLUG=1";
char *envp[] = { event_string, NULL }; 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); kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment