diff mbox

drm: Quiet down drm_mode_getresources

Message ID 1461755507-30453-1-git-send-email-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tvrtko Ursulin April 27, 2016, 11:11 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

The debug logging here can be very verbose in the kernel logs
and provides no information which userspace doesn't have the
access to already. Turn it off so kernel logs become more
manageable.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_crtc.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Daniel Vetter April 28, 2016, 8:56 a.m. UTC | #1
On Wed, Apr 27, 2016 at 12:11:47PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> The debug logging here can be very verbose in the kernel logs
> and provides no information which userspace doesn't have the
> access to already. Turn it off so kernel logs become more
> manageable.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Also merged this one to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/drm_crtc.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index ffb01d91ae32..9626a0cc050a 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1936,8 +1936,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
>  		copied = 0;
>  		crtc_id = (uint32_t __user *)(unsigned long)card_res->crtc_id_ptr;
>  		drm_for_each_crtc(crtc, dev) {
> -			DRM_DEBUG_KMS("[CRTC:%d:%s]\n",
> -				      crtc->base.id, crtc->name);
>  			if (put_user(crtc->base.id, crtc_id + copied)) {
>  				ret = -EFAULT;
>  				goto out;
> @@ -1952,8 +1950,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
>  		copied = 0;
>  		encoder_id = (uint32_t __user *)(unsigned long)card_res->encoder_id_ptr;
>  		drm_for_each_encoder(encoder, dev) {
> -			DRM_DEBUG_KMS("[ENCODER:%d:%s]\n", encoder->base.id,
> -					encoder->name);
>  			if (put_user(encoder->base.id, encoder_id +
>  				     copied)) {
>  				ret = -EFAULT;
> @@ -1969,9 +1965,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
>  		copied = 0;
>  		connector_id = (uint32_t __user *)(unsigned long)card_res->connector_id_ptr;
>  		drm_for_each_connector(connector, dev) {
> -			DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> -				connector->base.id,
> -				connector->name);
>  			if (put_user(connector->base.id,
>  				     connector_id + copied)) {
>  				ret = -EFAULT;
> @@ -1982,9 +1975,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
>  	}
>  	card_res->count_connectors = connector_count;
>  
> -	DRM_DEBUG_KMS("CRTC[%d] CONNECTORS[%d] ENCODERS[%d]\n", card_res->count_crtcs,
> -		  card_res->count_connectors, card_res->count_encoders);
> -
>  out:
>  	mutex_unlock(&dev->mode_config.mutex);
>  	return ret;
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index ffb01d91ae32..9626a0cc050a 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1936,8 +1936,6 @@  int drm_mode_getresources(struct drm_device *dev, void *data,
 		copied = 0;
 		crtc_id = (uint32_t __user *)(unsigned long)card_res->crtc_id_ptr;
 		drm_for_each_crtc(crtc, dev) {
-			DRM_DEBUG_KMS("[CRTC:%d:%s]\n",
-				      crtc->base.id, crtc->name);
 			if (put_user(crtc->base.id, crtc_id + copied)) {
 				ret = -EFAULT;
 				goto out;
@@ -1952,8 +1950,6 @@  int drm_mode_getresources(struct drm_device *dev, void *data,
 		copied = 0;
 		encoder_id = (uint32_t __user *)(unsigned long)card_res->encoder_id_ptr;
 		drm_for_each_encoder(encoder, dev) {
-			DRM_DEBUG_KMS("[ENCODER:%d:%s]\n", encoder->base.id,
-					encoder->name);
 			if (put_user(encoder->base.id, encoder_id +
 				     copied)) {
 				ret = -EFAULT;
@@ -1969,9 +1965,6 @@  int drm_mode_getresources(struct drm_device *dev, void *data,
 		copied = 0;
 		connector_id = (uint32_t __user *)(unsigned long)card_res->connector_id_ptr;
 		drm_for_each_connector(connector, dev) {
-			DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
-				connector->base.id,
-				connector->name);
 			if (put_user(connector->base.id,
 				     connector_id + copied)) {
 				ret = -EFAULT;
@@ -1982,9 +1975,6 @@  int drm_mode_getresources(struct drm_device *dev, void *data,
 	}
 	card_res->count_connectors = connector_count;
 
-	DRM_DEBUG_KMS("CRTC[%d] CONNECTORS[%d] ENCODERS[%d]\n", card_res->count_crtcs,
-		  card_res->count_connectors, card_res->count_encoders);
-
 out:
 	mutex_unlock(&dev->mode_config.mutex);
 	return ret;