diff options
author | Jani Nikula <jani.nikula@intel.com> | 2019-10-01 17:06:14 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2019-10-02 16:28:55 +0300 |
commit | f0a8f533adc202f7dc83961c85187794eaed9cec (patch) | |
tree | 5600de76c2e33d6f637a69a56f92c834676d9894 /drivers/gpu/drm/drm_edid.c | |
parent | 959b077f26a16c663816f116af8063a170233a07 (diff) | |
download | linux-f0a8f533adc202f7dc83961c85187794eaed9cec.tar.gz linux-f0a8f533adc202f7dc83961c85187794eaed9cec.tar.bz2 linux-f0a8f533adc202f7dc83961c85187794eaed9cec.zip |
drm/print: add drm_debug_enabled()
Add helper to check if a drm debug category is enabled. Convert drm core
to use it. No functional changes.
v2: Move unlikely() to drm_debug_enabled() (Eric)
v3: Keep unlikely() when combined with other conditions (Eric)
Cc: Eric Engestrom <eric@engestrom.ch>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191001140614.26909-1-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 3c9703b08491..0552175313cb 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1651,7 +1651,7 @@ static void connector_bad_edid(struct drm_connector *connector, { int i; - if (connector->bad_edid_counter++ && !(drm_debug & DRM_UT_KMS)) + if (connector->bad_edid_counter++ && !drm_debug_enabled(DRM_UT_KMS)) return; dev_warn(connector->dev->dev, |