summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-04-08 11:23:57 +0200
committerJani Nikula <jani.nikula@intel.com>2024-04-15 15:22:03 +0200
commit0ae55a4c9af6ce44be95d8cfd755eb8fa591cf48 (patch)
tree27b96511057fa90138ad7f044bfdefd466a12fdd /drivers
parentdrm/probe-helper: switch to drm device based logging (diff)
downloadlinux-0ae55a4c9af6ce44be95d8cfd755eb8fa591cf48.tar.xz
linux-0ae55a4c9af6ce44be95d8cfd755eb8fa591cf48.zip
drm/modes: switch to drm device based error logging
Prefer drm_err() and drm_dbg_kms() over DRM_ERROR() and DRM_DEBUG_KMS(). Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/3342dd2e98fedd618e5aeef26c44044cd32ead20.1712568037.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_modes.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index c4f88c3a93b7..408ee1b5e44d 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -373,8 +373,8 @@ static int fill_analog_mode(struct drm_device *dev,
if (!bt601 &&
(hact_duration_ns < params->hact_ns.min ||
hact_duration_ns > params->hact_ns.max)) {
- DRM_ERROR("Invalid horizontal active area duration: %uns (min: %u, max %u)\n",
- hact_duration_ns, params->hact_ns.min, params->hact_ns.max);
+ drm_err(dev, "Invalid horizontal active area duration: %uns (min: %u, max %u)\n",
+ hact_duration_ns, params->hact_ns.min, params->hact_ns.max);
return -EINVAL;
}
@@ -385,8 +385,8 @@ static int fill_analog_mode(struct drm_device *dev,
if (!bt601 &&
(hblk_duration_ns < params->hblk_ns.min ||
hblk_duration_ns > params->hblk_ns.max)) {
- DRM_ERROR("Invalid horizontal blanking duration: %uns (min: %u, max %u)\n",
- hblk_duration_ns, params->hblk_ns.min, params->hblk_ns.max);
+ drm_err(dev, "Invalid horizontal blanking duration: %uns (min: %u, max %u)\n",
+ hblk_duration_ns, params->hblk_ns.min, params->hblk_ns.max);
return -EINVAL;
}
@@ -397,8 +397,8 @@ static int fill_analog_mode(struct drm_device *dev,
if (!bt601 &&
(hslen_duration_ns < params->hslen_ns.min ||
hslen_duration_ns > params->hslen_ns.max)) {
- DRM_ERROR("Invalid horizontal sync duration: %uns (min: %u, max %u)\n",
- hslen_duration_ns, params->hslen_ns.min, params->hslen_ns.max);
+ drm_err(dev, "Invalid horizontal sync duration: %uns (min: %u, max %u)\n",
+ hslen_duration_ns, params->hslen_ns.min, params->hslen_ns.max);
return -EINVAL;
}
@@ -409,7 +409,8 @@ static int fill_analog_mode(struct drm_device *dev,
if (!bt601 &&
(porches_duration_ns > (params->hfp_ns.max + params->hbp_ns.max) ||
porches_duration_ns < (params->hfp_ns.min + params->hbp_ns.min))) {
- DRM_ERROR("Invalid horizontal porches duration: %uns\n", porches_duration_ns);
+ drm_err(dev, "Invalid horizontal porches duration: %uns\n",
+ porches_duration_ns);
return -EINVAL;
}
@@ -431,8 +432,8 @@ static int fill_analog_mode(struct drm_device *dev,
if (!bt601 &&
(hfp_duration_ns < params->hfp_ns.min ||
hfp_duration_ns > params->hfp_ns.max)) {
- DRM_ERROR("Invalid horizontal front porch duration: %uns (min: %u, max %u)\n",
- hfp_duration_ns, params->hfp_ns.min, params->hfp_ns.max);
+ drm_err(dev, "Invalid horizontal front porch duration: %uns (min: %u, max %u)\n",
+ hfp_duration_ns, params->hfp_ns.min, params->hfp_ns.max);
return -EINVAL;
}
@@ -443,8 +444,8 @@ static int fill_analog_mode(struct drm_device *dev,
if (!bt601 &&
(hbp_duration_ns < params->hbp_ns.min ||
hbp_duration_ns > params->hbp_ns.max)) {
- DRM_ERROR("Invalid horizontal back porch duration: %uns (min: %u, max %u)\n",
- hbp_duration_ns, params->hbp_ns.min, params->hbp_ns.max);
+ drm_err(dev, "Invalid horizontal back porch duration: %uns (min: %u, max %u)\n",
+ hbp_duration_ns, params->hbp_ns.min, params->hbp_ns.max);
return -EINVAL;
}
@@ -495,8 +496,8 @@ static int fill_analog_mode(struct drm_device *dev,
vtotal = vactive + vfp + vslen + vbp;
if (params->num_lines != vtotal) {
- DRM_ERROR("Invalid vertical total: %upx (expected %upx)\n",
- vtotal, params->num_lines);
+ drm_err(dev, "Invalid vertical total: %upx (expected %upx)\n",
+ vtotal, params->num_lines);
return -EINVAL;
}
@@ -1813,9 +1814,9 @@ void drm_mode_prune_invalid(struct drm_device *dev,
}
if (verbose) {
drm_mode_debug_printmodeline(mode);
- DRM_DEBUG_KMS("Not using %s mode: %s\n",
- mode->name,
- drm_get_mode_status_name(mode->status));
+ drm_dbg_kms(dev, "Not using %s mode: %s\n",
+ mode->name,
+ drm_get_mode_status_name(mode->status));
}
drm_mode_destroy(dev, mode);
}