[Intel-gfx] [PATCH 3/3] drm/i915: Print prop name/id when rejecting it

Daniel Vetter daniel at ffwll.ch
Mon Jun 18 08:53:13 UTC 2018


On Mon, Jun 11, 2018 at 10:34:03PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Use the '[PROP:id:name]' format I introduced for the core in the driver
> debug messages as well.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

I'm wondering whether there's not some kind of macro magic we could do,
but unfortunately printf style stuff is really not composable :-/ And our
stuff isn't important enough to warant new %p modes either ...
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_atomic.c       | 6 ++++--
>  drivers/gpu/drm/i915/intel_atomic_plane.c | 6 ++++--
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index 61ddb5871d8a..b04952bacf77 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -59,7 +59,8 @@ int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
>  	else if (property == dev_priv->broadcast_rgb_property)
>  		*val = intel_conn_state->broadcast_rgb;
>  	else {
> -		DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name);
> +		DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n",
> +				 property->base.id, property->name);
>  		return -EINVAL;
>  	}
>  
> @@ -95,7 +96,8 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector,
>  		return 0;
>  	}
>  
> -	DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name);
> +	DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n",
> +			 property->base.id, property->name);
>  	return -EINVAL;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index e8bf4cc499e1..dcba645cabb8 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -265,7 +265,8 @@ intel_plane_atomic_get_property(struct drm_plane *plane,
>  				struct drm_property *property,
>  				uint64_t *val)
>  {
> -	DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name);
> +	DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n",
> +		      property->base.id, property->name);
>  	return -EINVAL;
>  }
>  
> @@ -287,6 +288,7 @@ intel_plane_atomic_set_property(struct drm_plane *plane,
>  				struct drm_property *property,
>  				uint64_t val)
>  {
> -	DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name);
> +	DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n",
> +		      property->base.id, property->name);
>  	return -EINVAL;
>  }
> -- 
> 2.16.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list