diff mbox series

[08/17] drm/i915/state: use struct drm_device based logging

Message ID 20200402114819.17232-8-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series [01/17] drm/i915/audio: use struct drm_device based logging | expand

Commit Message

Jani Nikula April 2, 2020, 11:48 a.m. UTC
Convert all the DRM_* logging macros to the struct drm_device based
macros to provide device specific logging.

No functional changes.

Cc: Wambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_global_state.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Wambui Karuga April 8, 2020, 7:59 a.m. UTC | #1
On Thu, 2 Apr 2020, Jani Nikula wrote:

> Convert all the DRM_* logging macros to the struct drm_device based
> macros to provide device specific logging.
>
> No functional changes.
>
> Cc: Wambui Karuga <wambui.karugax@gmail.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_global_state.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_global_state.c b/drivers/gpu/drm/i915/display/intel_global_state.c
> index a0cc894c3868..6f72feb14f3e 100644
> --- a/drivers/gpu/drm/i915/display/intel_global_state.c
> +++ b/drivers/gpu/drm/i915/display/intel_global_state.c
> @@ -71,6 +71,7 @@ struct intel_global_state *
> intel_atomic_get_global_obj_state(struct intel_atomic_state *state,
> 				  struct intel_global_obj *obj)
> {
> +	struct drm_i915_private *i915 = to_i915(state->base.dev);
> 	int index, num_objs, i;
> 	size_t size;
> 	struct __intel_global_objs_state *arr;
> @@ -106,8 +107,8 @@ intel_atomic_get_global_obj_state(struct intel_atomic_state *state,
>
> 	state->num_global_objs = num_objs;
>
> -	DRM_DEBUG_ATOMIC("Added new global object %p state %p to %p\n",
> -			 obj, obj_state, state);
> +	drm_dbg_atomic(&i915->drm, "Added new global object %p state %p to %p\n",

I think this line can be split to fix the checkpatch warning as it's over 
80 characters.

Reviewed-by: Wambui Karuga <wambui.karugax@gmail.com>

> +		       obj, obj_state, state);
>
> 	return obj_state;
> }
> -- 
> 2.20.1
>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_global_state.c b/drivers/gpu/drm/i915/display/intel_global_state.c
index a0cc894c3868..6f72feb14f3e 100644
--- a/drivers/gpu/drm/i915/display/intel_global_state.c
+++ b/drivers/gpu/drm/i915/display/intel_global_state.c
@@ -71,6 +71,7 @@  struct intel_global_state *
 intel_atomic_get_global_obj_state(struct intel_atomic_state *state,
 				  struct intel_global_obj *obj)
 {
+	struct drm_i915_private *i915 = to_i915(state->base.dev);
 	int index, num_objs, i;
 	size_t size;
 	struct __intel_global_objs_state *arr;
@@ -106,8 +107,8 @@  intel_atomic_get_global_obj_state(struct intel_atomic_state *state,
 
 	state->num_global_objs = num_objs;
 
-	DRM_DEBUG_ATOMIC("Added new global object %p state %p to %p\n",
-			 obj, obj_state, state);
+	drm_dbg_atomic(&i915->drm, "Added new global object %p state %p to %p\n",
+		       obj, obj_state, state);
 
 	return obj_state;
 }