diff mbox series

[03/10] drm/i915/display: include i915_gpu_error.h where needed

Message ID a5dbb8d46403761bd8518db45fa71dc55930d3cf.1717004739.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915 and drm/xe display and compat cleanups | expand

Commit Message

Jani Nikula May 29, 2024, 5:48 p.m. UTC
Include what you use. With this, we can drop the include from xe compat
i915_drv.h.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dmc.c          | 1 +
 drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Rodrigo Vivi May 31, 2024, 11:07 a.m. UTC | #1
On Wed, May 29, 2024 at 08:48:07PM +0300, Jani Nikula wrote:
> Include what you use. With this, we can drop the include from xe compat
> i915_drv.h.

Nice!

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dmc.c          | 1 +
>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
> index 63fccdda56c0..b5ebb0f5b269 100644
> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> @@ -26,6 +26,7 @@
>  #include <linux/firmware.h>
>  
>  #include "i915_drv.h"
> +#include "i915_gpu_error.h"
>  #include "i915_reg.h"
>  #include "intel_de.h"
>  #include "intel_dmc.h"
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> index fb784ab64cd4..9776cc3332fe 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> @@ -19,7 +19,6 @@
>  #include "xe_bo.h"
>  #include "xe_pm.h"
>  #include "xe_step.h"
> -#include "i915_gpu_error.h"
>  #include "i915_reg_defs.h"
>  #include "i915_utils.h"
>  #include "intel_step.h"
> -- 
> 2.39.2
>
Ville Syrjala May 31, 2024, 11:35 a.m. UTC | #2
On Wed, May 29, 2024 at 08:48:07PM +0300, Jani Nikula wrote:
> Include what you use. With this, we can drop the include from xe compat
> i915_drv.h.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dmc.c          | 1 +
>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
> index 63fccdda56c0..b5ebb0f5b269 100644
> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> @@ -26,6 +26,7 @@
>  #include <linux/firmware.h>
>  
>  #include "i915_drv.h"
> +#include "i915_gpu_error.h"

Someone should probably convert intel_dmc_print_error_state()
to use the drm_printer interface instead, assuming that is the
only thing that needs this header in intel_dmc.c.
Jani Nikula May 31, 2024, 12:07 p.m. UTC | #3
On Fri, 31 May 2024, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Wed, May 29, 2024 at 08:48:07PM +0300, Jani Nikula wrote:
>> Include what you use. With this, we can drop the include from xe compat
>> i915_drv.h.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_dmc.c          | 1 +
>>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 -
>>  2 files changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
>> index 63fccdda56c0..b5ebb0f5b269 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
>> @@ -26,6 +26,7 @@
>>  #include <linux/firmware.h>
>>  
>>  #include "i915_drv.h"
>> +#include "i915_gpu_error.h"
>
> Someone should probably convert intel_dmc_print_error_state()
> to use the drm_printer interface instead, assuming that is the
> only thing that needs this header in intel_dmc.c.

I don't disagree, but kind of wanted to keep this series focused on just
rearranging the headers. And this serves a purpose: now you can look at
the files under display to have a better grasp at what's needed from
outside of display. i915_gpu_error.h include flags one case.

BR,
Jani.
Jani Nikula May 31, 2024, 12:17 p.m. UTC | #4
On Fri, 31 May 2024, Jani Nikula <jani.nikula@intel.com> wrote:
> On Fri, 31 May 2024, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
>> On Wed, May 29, 2024 at 08:48:07PM +0300, Jani Nikula wrote:
>>> Include what you use. With this, we can drop the include from xe compat
>>> i915_drv.h.
>>> 
>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>> ---
>>>  drivers/gpu/drm/i915/display/intel_dmc.c          | 1 +
>>>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 -
>>>  2 files changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
>>> index 63fccdda56c0..b5ebb0f5b269 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
>>> @@ -26,6 +26,7 @@
>>>  #include <linux/firmware.h>
>>>  
>>>  #include "i915_drv.h"
>>> +#include "i915_gpu_error.h"
>>
>> Someone should probably convert intel_dmc_print_error_state()
>> to use the drm_printer interface instead, assuming that is the
>> only thing that needs this header in intel_dmc.c.
>
> I don't disagree, but kind of wanted to keep this series focused on just
> rearranging the headers. And this serves a purpose: now you can look at
> the files under display to have a better grasp at what's needed from
> outside of display. i915_gpu_error.h include flags one case.

Seems straightforward, I can do it on top.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
index 63fccdda56c0..b5ebb0f5b269 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -26,6 +26,7 @@ 
 #include <linux/firmware.h>
 
 #include "i915_drv.h"
+#include "i915_gpu_error.h"
 #include "i915_reg.h"
 #include "intel_de.h"
 #include "intel_dmc.h"
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
index fb784ab64cd4..9776cc3332fe 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
@@ -19,7 +19,6 @@ 
 #include "xe_bo.h"
 #include "xe_pm.h"
 #include "xe_step.h"
-#include "i915_gpu_error.h"
 #include "i915_reg_defs.h"
 #include "i915_utils.h"
 #include "intel_step.h"