diff mbox

[RFC,3/6] drm/i915: Give our log messages our name

Message ID 20180124161821.28780-4-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tvrtko Ursulin Jan. 24, 2018, 4:18 p.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Define DRM_LOG_NAME to i915 so that the log messages we output change
from:

 [drm] RC6 on

to:

 [i915] RC6 on

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/i915/i915_drv.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Michal Wajdeczko Jan. 26, 2018, 1:10 p.m. UTC | #1
On Wed, 24 Jan 2018 17:18:18 +0100, Tvrtko Ursulin <tursulin@ursulin.net>  
wrote:

> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Define DRM_LOG_NAME to i915 so that the log messages we output change
> from:
>
>  [drm] RC6 on
>
> to:
>
>  [i915] RC6 on
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: dri-devel@lists.freedesktop.org
> ---
>  drivers/gpu/drm/i915/i915_drv.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h  
> b/drivers/gpu/drm/i915/i915_drv.h
> index 8333692dac5a..2b48a7d2d129 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -30,6 +30,11 @@
>  #ifndef _I915_DRV_H_
>  #define _I915_DRV_H_
> +#ifdef DRM_LOG_NAME
> +#undef DRM_LOG_NAME
> +#endif
> +#define DRM_LOG_NAME "i915"

Maybe better option would be to add this definition to our Makefile

subdir-ccflags-y += -DDRM_LOG_NAME=\"i915\"

Note that drm_print.h (patch 2/6) already has proper #ifndef

Michal

> +
>  #include <uapi/drm/i915_drm.h>
>  #include <uapi/drm/drm_fourcc.h>
Tvrtko Ursulin Jan. 30, 2018, 10:53 a.m. UTC | #2
On 26/01/2018 13:10, Michal Wajdeczko wrote:
> On Wed, 24 Jan 2018 17:18:18 +0100, Tvrtko Ursulin 
> <tursulin@ursulin.net> wrote:
> 
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Define DRM_LOG_NAME to i915 so that the log messages we output change
>> from:
>>
>>  [drm] RC6 on
>>
>> to:
>>
>>  [i915] RC6 on
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: dri-devel@lists.freedesktop.org
>> ---
>>  drivers/gpu/drm/i915/i915_drv.h | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h 
>> b/drivers/gpu/drm/i915/i915_drv.h
>> index 8333692dac5a..2b48a7d2d129 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -30,6 +30,11 @@
>>  #ifndef _I915_DRV_H_
>>  #define _I915_DRV_H_
>> +#ifdef DRM_LOG_NAME
>> +#undef DRM_LOG_NAME
>> +#endif
>> +#define DRM_LOG_NAME "i915"
> 
> Maybe better option would be to add this definition to our Makefile
> 
> subdir-ccflags-y += -DDRM_LOG_NAME=\"i915\"
> 
> Note that drm_print.h (patch 2/6) already has proper #ifndef

So that is always guaranteed to be included first? Sounds attractive, yep.

Unfortunately series does not seem to improve things sufficiently to 
garner any interest so I am reluctant to respin with that change.

Regards,

Tvrtko
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 8333692dac5a..2b48a7d2d129 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -30,6 +30,11 @@ 
 #ifndef _I915_DRV_H_
 #define _I915_DRV_H_
 
+#ifdef DRM_LOG_NAME
+#undef DRM_LOG_NAME
+#endif
+#define DRM_LOG_NAME "i915"
+
 #include <uapi/drm/i915_drm.h>
 #include <uapi/drm/drm_fourcc.h>