Message ID | ba2e3e16b5c47f7e6d434d8fa815e965458a98d5.1718633874.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: make struct intel_frontbuffer opaque | expand |
Hi Jani, kernel test robot noticed the following build errors: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-intel/for-linux-next-fixes drm-tip/drm-tip drm-xe/drm-xe-next linus/master v6.10-rc4 next-20240618] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-i915-frontbuffer-un-inline-frontbuffer-bits-checks/20240617-223108 base: git://anongit.freedesktop.org/drm-intel for-linux-next patch link: https://lore.kernel.org/r/ba2e3e16b5c47f7e6d434d8fa815e965458a98d5.1718633874.git.jani.nikula%40intel.com patch subject: [PATCH 5/5] drm/i915/frontbuffer: make struct intel_frontbuffer opaque config: x86_64-randconfig-003-20240619 (https://download.01.org/0day-ci/archive/20240619/202406190757.Uv3UaYyb-lkp@intel.com/config) compiler: gcc-8 (Ubuntu 8.4.0-3ubuntu2) 8.4.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240619/202406190757.Uv3UaYyb-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202406190757.Uv3UaYyb-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/err.h:5, from include/linux/dma-fence.h:16, from include/linux/dma-fence-array.h:15, from drivers/gpu/drm/i915/i915_gem.c:28: drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h: In function 'i915_gem_object_flush_frontbuffer': >> include/linux/rcupdate.h:463:9: error: dereferencing pointer to incomplete type 'struct intel_frontbuffer' typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ ^ include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/rcupdate.h:582:31: note: in expansion of macro '__rcu_access_pointer' #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu) ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h:24:15: note: in expansion of macro 'rcu_access_pointer' if (unlikely(rcu_access_pointer(obj->frontbuffer))) ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h: In function 'i915_gem_object_get_frontbuffer': >> include/linux/rcupdate.h:463:9: error: dereferencing pointer to incomplete type 'struct intel_frontbuffer' typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ ^ include/linux/compiler.h:76:40: note: in definition of macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ include/linux/rcupdate.h:582:31: note: in expansion of macro '__rcu_access_pointer' #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu) ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h:50:14: note: in expansion of macro 'rcu_access_pointer' if (likely(!rcu_access_pointer(obj->frontbuffer))) ^~~~~~~~~~~~~~~~~~ -- In file included from include/linux/array_size.h:5, from include/linux/kernel.h:16, from include/linux/sched/mm.h:5, from drivers/gpu/drm/i915/i915_vma.c:25: drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h: In function 'i915_gem_object_flush_frontbuffer': >> include/linux/rcupdate.h:463:9: error: dereferencing pointer to incomplete type 'struct intel_frontbuffer' typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ ^ include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/rcupdate.h:582:31: note: in expansion of macro '__rcu_access_pointer' #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu) ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h:24:15: note: in expansion of macro 'rcu_access_pointer' if (unlikely(rcu_access_pointer(obj->frontbuffer))) ^~~~~~~~~~~~~~~~~~ vim +463 include/linux/rcupdate.h 76c8eaafe4f061 Paul E. McKenney 2021-04-21 460 24ba53017e188e Chun-Hung Tseng 2021-09-15 461 #define __rcu_access_pointer(p, local, space) \ ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 462 ({ \ 24ba53017e188e Chun-Hung Tseng 2021-09-15 @463 typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ 423a86a610cad1 Joel Fernandes (Google 2018-12-12 464) rcu_check_sparse(p, space); \ 24ba53017e188e Chun-Hung Tseng 2021-09-15 465 ((typeof(*p) __force __kernel *)(local)); \ ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 466 }) 24ba53017e188e Chun-Hung Tseng 2021-09-15 467 #define __rcu_dereference_check(p, local, c, space) \ ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 468 ({ \ ac59853c06993a Pranith Kumar 2014-11-13 469 /* Dependency order vs. p above. */ \ 24ba53017e188e Chun-Hung Tseng 2021-09-15 470 typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ f78f5b90c4ffa5 Paul E. McKenney 2015-06-18 471 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \ 423a86a610cad1 Joel Fernandes (Google 2018-12-12 472) rcu_check_sparse(p, space); \ 24ba53017e188e Chun-Hung Tseng 2021-09-15 473 ((typeof(*p) __force __kernel *)(local)); \ ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 474 }) 24ba53017e188e Chun-Hung Tseng 2021-09-15 475 #define __rcu_dereference_protected(p, local, c, space) \ ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 476 ({ \ f78f5b90c4ffa5 Paul E. McKenney 2015-06-18 477 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ 423a86a610cad1 Joel Fernandes (Google 2018-12-12 478) rcu_check_sparse(p, space); \ ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 479 ((typeof(*p) __force __kernel *)(p)); \ ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 480 }) 24ba53017e188e Chun-Hung Tseng 2021-09-15 481 #define __rcu_dereference_raw(p, local) \ 995f1405610bd8 Paul E. McKenney 2016-07-01 482 ({ \ 995f1405610bd8 Paul E. McKenney 2016-07-01 483 /* Dependency order vs. p above. */ \ 24ba53017e188e Chun-Hung Tseng 2021-09-15 484 typeof(p) local = READ_ONCE(p); \ 24ba53017e188e Chun-Hung Tseng 2021-09-15 485 ((typeof(*p) __force __kernel *)(local)); \ 995f1405610bd8 Paul E. McKenney 2016-07-01 486 }) 24ba53017e188e Chun-Hung Tseng 2021-09-15 487 #define rcu_dereference_raw(p) __rcu_dereference_raw(p, __UNIQUE_ID(rcu)) ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 488
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c index dd5fd1e2859e..53a4cbc43ae3 100644 --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c @@ -67,6 +67,16 @@ #include "intel_psr.h" #include "intel_tdf.h" +struct intel_frontbuffer { + struct kref ref; + atomic_t bits; + struct i915_active write; + struct drm_i915_gem_object *obj; + struct rcu_head rcu; + + struct work_struct flush_work; +}; + unsigned int intel_frontbuffer_bits(struct intel_frontbuffer *front) { return atomic_read(&front->bits); diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.h b/drivers/gpu/drm/i915/display/intel_frontbuffer.h index 62d6e3cedea4..a6212ee4ed12 100644 --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h @@ -24,13 +24,13 @@ #ifndef __INTEL_FRONTBUFFER_H__ #define __INTEL_FRONTBUFFER_H__ -#include <linux/atomic.h> #include <linux/bits.h> -#include <linux/kref.h> - -#include "i915_active_types.h" +#include <linux/types.h> +struct drm_i915_gem_object; struct drm_i915_private; +struct i915_active; +struct intel_frontbuffer; enum fb_op_origin { ORIGIN_CPU = 0, @@ -40,16 +40,6 @@ enum fb_op_origin { ORIGIN_CURSOR_UPDATE, }; -struct intel_frontbuffer { - struct kref ref; - atomic_t bits; - struct i915_active write; - struct drm_i915_gem_object *obj; - struct rcu_head rcu; - - struct work_struct flush_work; -}; - /* * Frontbuffer tracking bits. Set in obj->frontbuffer_bits while a gem bo is * considered to be the frontbuffer for the given plane interface-wise. This
Hide struct intel_frontbuffer implementation details within intel_frontbuffer.c. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- .../gpu/drm/i915/display/intel_frontbuffer.c | 10 ++++++++++ .../gpu/drm/i915/display/intel_frontbuffer.h | 18 ++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-)