drm/i915: include reductions
Subsystems (3)
cover drm/i915: include reductions
Remove some useless includes as well as ones that can be removed with trivial changes.
Jani Nikula (7):
drm/i915/reset: remove useless intel_display_types.h include drm/i915/active: remove useless i915_utils.h include drm/i915/psr: avoid intel_frontbuffer.h include with declaration drm/i915/fbc: avoid intel_frontbuffer.h include with declaration drm/i915/fb: reduce include dependencies drm/i915/pxp: un-inline intel_pxp_is_enabled() drm/i915/pxp: remove useless includes
drivers/gpu/drm/i915/display/intel_fbc.h | 3 +-- drivers/gpu/drm/i915/display/intel_frontbuffer.h | 2 +- drivers/gpu/drm/i915/display/intel_psr.h | 11 ++++++----- drivers/gpu/drm/i915/gt/intel_reset.c | 1 - drivers/gpu/drm/i915/i915_active_types.h | 2 -- drivers/gpu/drm/i915/pxp/intel_pxp.c | 5 +++++ drivers/gpu/drm/i915/pxp/intel_pxp.h | 14 ++++++++------ drivers/gpu/drm/i915/pxp/intel_pxp_types.h | 2 -- 8 files changed, 21 insertions(+), 19 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/7 drm/i915/reset: remove useless intel_display_types.h include
Not needed.
--- drivers/gpu/drm/i915/gt/intel_reset.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_reset.c +0 -1
@@ -6,7 +6,6 @@#include <linux/sched/mm.h> #include <linux/stop_machine.h> -#include "display/intel_display_types.h" #include "display/intel_overlay.h" #include "gem/i915_gem_context.h"
Signature · 1 line
2.30.2
Re: [Intel-gfx] [PATCH 1/7] drm/i915/reset: remove useless intel_display_types.h include
Quoted 12 lines · Jani Nikula
Not needed.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/gt/intel_reset.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/i915/gt/intel_reset.c +0
-0
drivers/gpu/drm/i915/gt/intel_reset.c line 9
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_reset.c +0
-1@@ -6,7 +6,6 @@#include <linux/sched/mm.h> #include <linux/stop_machine.h> -#include "display/intel_display_types.h"
intel_display_{prepare,finish}_reset() are in intel_display.h so I'm thinking that is what we want to include here. I guess atm it gets included via some more circuitous route?
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_reset.c +0
-0#include "display/intel_overlay.h" #include "gem/i915_gem_context.h" Signature · 1 line
2.30.2
Signature · 2 lines
Ville Syrjälä Intel
Re: [Intel-gfx] [PATCH 1/7] drm/i915/reset: remove useless intel_display_types.h include
Quoted 16 lines · Ville Syrjälä
Quoted 15 lines · Jani Nikula
Not needed.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/gt/intel_reset.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/i915/gt/intel_reset.c +0
-0@@ -6,7 +6,6 @@#include <linux/sched/mm.h> #include <linux/stop_machine.h>
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_reset.c line 9
Quoted 1 line
drivers/gpu/drm/i915/gt/intel_reset.c +0
-1-#include "display/intel_display_types.h" intel_display_{prepare,finish}_reset() are in
intel_display.hso I'm thinking that is what we want to include here. I guess atm it gets included via some more circuitous route?
Mmmh, all roads lead to i915_drv.h...
We should trim the includes in i915_drv.h a *lot* too. Make it purely about defining struct drm_i915_private, not about including the world.
It's just that especially the gem/gt headers include just about everything.
BR,
Jani.
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_reset.c +0
-0#include "display/intel_overlay.h" #include "gem/i915_gem_context.h" Signature · 1 line
2.30.2
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH 2/7 drm/i915/active: remove useless i915_utils.h include
In reply to Jani NikulaNot needed.
--- drivers/gpu/drm/i915/i915_active_types.h | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/i915_active_types.h +0 -2
@@ -15,8 +15,6 @@#include <linux/rcupdate.h> #include <linux/workqueue.h> -#include "i915_utils.h" -struct i915_active_fence {struct dma_fence __rcu *fence;struct dma_fence_cb cb;
Signature · 1 line
2.30.2
PATCH 3/7 drm/i915/psr: avoid intel_frontbuffer.h include with declaration
In reply to Jani NikulaReduce include dependencies using forward declarations.
--- drivers/gpu/drm/i915/display/intel_psr.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_psr.h +6 -5
@@ -6,18 +6,19 @@#ifndef __INTEL_PSR_H__#define __INTEL_PSR_H__ -#include "intel_frontbuffer.h" +#include <linux/types.h> +enum fb_op_origin ;struct drm_connector ;struct drm_connector_state ;struct drm_i915_private ; +struct intel_atomic_state ; +struct intel_crtc ;struct intel_crtc_state ;struct intel_dp ; -struct intel_crtc ; -struct intel_atomic_state ; -struct intel_plane_state ; -struct intel_plane ;struct intel_encoder ; +struct intel_plane ; +struct intel_plane_state ;void intel_psr_init_dpcd (struct intel_dp *intel_dp); void intel_psr_pre_plane_update(struct intel_atomic_state *state,
Signature · 1 line
2.30.2
PATCH 4/7 drm/i915/fbc: avoid intel_frontbuffer.h include with declaration
In reply to Jani NikulaReduce include dependencies using forward declarations.
--- drivers/gpu/drm/i915/display/intel_fbc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_fbc.h +1 -2
@@ -8,8 +8,7 @@#include <linux/types.h> -#include "intel_frontbuffer.h" - +enum fb_op_origin ;struct drm_i915_private ;struct intel_atomic_state ;struct intel_crtc ;
Signature · 1 line
2.30.2
PATCH 5/7 drm/i915/fb: reduce include dependencies
In reply to Jani NikulaWe actually need i915_active_types.h, not i915_active.h.
--- drivers/gpu/drm/i915/display/intel_frontbuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_frontbuffer.h +1 -1
@@ -28,7 +28,7 @@#include <linux/kref.h> #include "gem/i915_gem_object_types.h" -#include "i915_active.h" +#include "i915_active_types.h" struct drm_i915_private ;
Signature · 1 line
2.30.2
PATCH 6/7 drm/i915/pxp: un-inline intel_pxp_is_enabled()
In reply to Jani NikulaIn the interest of reducing include dependencies, un-inline intel_pxp_is_enabled().
--- drivers/gpu/drm/i915/pxp/intel_pxp.c | 5 +++++ drivers/gpu/drm/i915/pxp/intel_pxp.h | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/pxp/intel_pxp.c +5 -0
@@ -44,6 +44,11 @@ struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp) return container_of(pxp, struct intel_gt, pxp); } +bool intel_pxp_is_enabled (const struct intel_pxp *pxp) +{ +return pxp->ce; +} +bool intel_pxp_is_active (const struct intel_pxp *pxp) {return pxp->arb_is_valid;
drivers/gpu/drm/i915/pxp/intel_pxp.h +8 -6
@@ -6,17 +6,14 @@#ifndef __INTEL_PXP_H__#define __INTEL_PXP_H__ -#include "intel_pxp_types.h" +#include <linux/types.h> +struct intel_pxp ;struct drm_i915_gem_object ; -static inline bool intel_pxp_is_enabled (const struct intel_pxp *pxp) -{ -return pxp->ce; -} -#ifdef CONFIG_DRM_I915_PXP struct intel_gt *pxp_to_gt (const struct intel_pxp *pxp); +bool intel_pxp_is_enabled (const struct intel_pxp *pxp);bool intel_pxp_is_active (const struct intel_pxp *pxp);void intel_pxp_init (struct intel_pxp *pxp);
@@ -48,6 +45,11 @@ static inline int intel_pxp_start(struct intel_pxp *pxp)return -ENODEV ; } +static inline bool intel_pxp_is_enabled (const struct intel_pxp *pxp) +{ +return false; +} +static inline bool intel_pxp_is_active (const struct intel_pxp *pxp) {return false;
Signature · 1 line
2.30.2
PATCH 7/7 drm/i915/pxp: remove useless includes
In reply to Jani NikulaNot needed.
--- drivers/gpu/drm/i915/pxp/intel_pxp_types.h | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/pxp/intel_pxp_types.h +0 -2
@@ -7,9 +7,7 @@#define __INTEL_PXP_TYPES_H__#include <linux/completion.h> -#include <linux/list.h> #include <linux/mutex.h> -#include <linux/spinlock.h> #include <linux/types.h> #include <linux/workqueue.h>
Signature · 1 line
2.30.2
Quoted 11 lines · Jani Nikula
Remove some useless includes as well as ones that can be removed with trivial changes.
Jani Nikula (7):
drm/i915/reset: remove uselessintel_display_types.hinclude drm/i915/active: remove uselessi915_utils.hinclude drm/i915/psr: avoidintel_frontbuffer.hinclude with declaration drm/i915/fbc: avoidintel_frontbuffer.hinclude with declaration drm/i915/fb: reduce include dependencies drm/i915/pxp: un-inlineintel_pxp_is_enabled()drm/i915/pxp: remove useless includes
Apart from the slight display reset stuff oddness this all looks good.
Series is
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_fbc.h | 3 +-- drivers/gpu/drm/i915/display/intel_frontbuffer.h | 2 +- drivers/gpu/drm/i915/display/intel_psr.h | 11 ++++++----- drivers/gpu/drm/i915/gt/intel_reset.c | 1 - drivers/gpu/drm/i915/i915_active_types.h | 2 -- drivers/gpu/drm/i915/pxp/intel_pxp.c | 5 +++++ drivers/gpu/drm/i915/pxp/intel_pxp.h | 14 ++++++++------ drivers/gpu/drm/i915/pxp/intel_pxp_types.h | 2 -- 8 files changed, 21 insertions(+), 19 deletions(-)Signature · 1 line
2.30.2
Signature · 2 lines
Ville Syrjälä Intel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: include reductions
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915: include reductions
URL : https://patchwork.freedesktop.org/series/97789/
State : failure
== Summary ==
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/i915/gem/i915_gem_create.o
In file included from drivers/gpu/drm/i915/gem/i915_gem_create.c:9:./drivers/gpu/drm/i915/pxp/intel_pxp.h: In function ‘intel_pxp_start’:./drivers/gpu/drm/i915/pxp/intel_pxp.h:45:10: error: ‘ENODEV’ undeclared (first use in this function)
return -ENODEV;
^~~~~~
./drivers/gpu/drm/i915/pxp/intel_pxp.h:45:10: note: each undeclared identifier is reported only once for each function it appears in
./drivers/gpu/drm/i915/pxp/intel_pxp.h: In function ‘intel_pxp_key_check’:
./drivers/gpu/drm/i915/pxp/intel_pxp.h:62:10: error: ‘ENODEV’ undeclared (first use in this function)
return -ENODEV;
^~~~~~scripts/Makefile.build:287: recipe for target 'drivers/gpu/drm/i915/gem/i915_gem_create.o' failed make[4]: *** [drivers/gpu/drm/i915/gem/i915_gem_create.o] Error 1 scripts/Makefile.build:549: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:549: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:549: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1846: recipe for target 'drivers' failed
make: *** [drivers] Error 2
Re: [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: include reductions
Quoted 23 lines · Patchwork
== Series Details ==
Series: drm/i915: include reductions
URL : https://patchwork.freedesktop.org/series/97789/
State : failure== Summary ==
CALL
scripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
CHKinclude/generated/compile.h
CC [M]drivers/gpu/drm/i915/gem/i915_gem_create.o
In file included fromdrivers/gpu/drm/i915/gem/i915_gem_create.c:9:./drivers/gpu/drm/i915/pxp/intel_pxp.h: In function ‘intel_pxp_start’:./drivers/gpu/drm/i915/pxp/intel_pxp.h:45:10: error: ‘ENODEV’ undeclared (first use in this function)return -ENODEV; ^~~~~~ ./drivers/gpu/drm/i915/pxp/intel_pxp.h:45:10: note: each undeclared identifier is reported only once for each function it appears in ./drivers/gpu/drm/i915/pxp/intel_pxp.h: In function ‘intel_pxp_key_check’: ./drivers/gpu/drm/i915/pxp/intel_pxp.h:62:10: error: ‘ENODEV’ undeclared (first use in this function) return -ENODEV; ^~~~~~
Quoted 10 lines
scripts/Makefile.build:287: recipe for target 'drivers/gpu/drm/i915/gem/i915_gem_create.o' failed make[4]: *** [drivers/gpu/drm/i915/gem/i915_gem_create.o] Error 1scripts/Makefile.build:549: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:549: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:549: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1846: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I guess this means we have CONFIG_DRM_I915_PXP=n in CI.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center