Re: [PATCH v7 3/6] drm/sched: Convert the GPU scheduler to variable number of run-queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



Hi,

On 2023-10-26 02:33, kernel test robot wrote:
> Hi Matthew,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on 201c8a7bd1f3f415920a2df4b8a8817e973f42fe]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/drm-sched-Add-drm_sched_wqueue_-helpers/20231026-121313
> base:   201c8a7bd1f3f415920a2df4b8a8817e973f42fe
> patch link:    https://lore.kernel.org/r/20231026041236.1273694-4-matthew.brost%40intel.com
> patch subject: [PATCH v7 3/6] drm/sched: Convert the GPU scheduler to variable number of run-queues
> config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231026/202310261439.3rbAtEoB-lkp@xxxxxxxxx/config)
> compiler: m68k-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231026/202310261439.3rbAtEoB-lkp@xxxxxxxxx/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@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202310261439.3rbAtEoB-lkp@xxxxxxxxx/
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/gpu/drm/etnaviv/etnaviv_sched.c: In function 'etnaviv_sched_init':
>>> drivers/gpu/drm/etnaviv/etnaviv_sched.c:138:30: warning: passing argument 3 of 'drm_sched_init' makes pointer from integer without a cast [-Wint-conversion]
>      138 |                              DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                              ^~~~~~~~~~~~~~~~~~~~~~~~
>          |                              |
>          |                              int
>    In file included from drivers/gpu/drm/etnaviv/etnaviv_drv.h:20,
>                     from drivers/gpu/drm/etnaviv/etnaviv_sched.c:8:
>    include/drm/gpu_scheduler.h:530:45: note: expected 'struct workqueue_struct *' but argument is of type 'int'
>      530 |                    struct workqueue_struct *submit_wq,
>          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>    In file included from include/uapi/linux/posix_types.h:5,
>                     from include/uapi/linux/types.h:14,
>                     from include/linux/types.h:6,
>                     from include/linux/kasan-checks.h:5,
>                     from include/asm-generic/rwonce.h:26,
>                     from ./arch/m68k/include/generated/asm/rwonce.h:1,
>                     from include/linux/compiler.h:246,
>                     from include/linux/build_bug.h:5,
>                     from include/linux/init.h:5,
>                     from include/linux/moduleparam.h:5,
>                     from drivers/gpu/drm/etnaviv/etnaviv_sched.c:6:

The reason for this compilation failure is that this patch is completely mangled and nothing like the patch I posted.

My patch is: https://lore.kernel.org/all/20231023032251.164775-1-luben.tuikov@xxxxxxx/

Save it raw to your disk from this link: https://lore.kernel.org/all/20231023032251.164775-1-luben.tuikov@xxxxxxx/raw

And apply it with "git am <file-name>" on top of your clean tree, e.g. drm-misc-next. THEN, after that,
apply your patches.

It should then compile without any problems.

Just looking at the first hunk in my patch:

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 2b8356699f235d..251995a90bbe69 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2280,6 +2280,7 @@ static int amdgpu_device_init_schedulers(struct amdgpu_device *adev)
>                 }
>  
>                 r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
> +                                  DRM_SCHED_PRIORITY_COUNT,
>                                    ring->num_hw_submission, 0,
>                                    timeout, adev->reset_domain->wq,
>                                    ring->sched_score, ring->name,

While this looks like this in the version you posted of my patch:

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index b54c4d771104..94d073bfbd13 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2280,6 +2280,7 @@ static int amdgpu_device_init_schedulers(struct amdgpu_device *adev)
>  		}
>  
>  		r = drm_sched_init(&ring->sched, &amdgpu_sched_ops, NULL,
> +				   DRM_SCHED_PRIORITY_COUNT,
>  				   ring->num_hw_submission, 0,
>  				   timeout, adev->reset_domain->wq,
>  				   ring->sched_score, ring->name,

What's that "NULL" doing as the 3rd argument???

And the rest is similarly mangled as well.

Please apply my patch AS IS, no local changes, and then apply your patches on top. That should ensure compilation is correct for all,
and a more precise review can be had.

FWIW, we should've had dynamic sched_rq from the outset as opposed to having to have my patch that now. So imagine that you already
have a branch which has dynamic sched_rq, and then you apply your patches--should be a more straightforward and clean application.

Regards,
Luben

>>> include/linux/stddef.h:8:14: warning: passing argument 4 of 'drm_sched_init' makes integer from pointer without a cast [-Wint-conversion]
>        8 | #define NULL ((void *)0)
>          |              ^~~~~~~~~~~
>          |              |
>          |              void *
>    drivers/gpu/drm/etnaviv/etnaviv_sched.c:138:56: note: in expansion of macro 'NULL'
>      138 |                              DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                                        ^~~~
>    include/drm/gpu_scheduler.h:531:24: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
>      531 |                    u32 num_rqs, uint32_t hw_submission, unsigned hang_limit,
>          |                    ~~~~^~~~~~~
> --
>    drivers/gpu/drm/lima/lima_sched.c: In function 'lima_sched_pipe_init':
>>> drivers/gpu/drm/lima/lima_sched.c:492:31: warning: passing argument 3 of 'drm_sched_init' makes pointer from integer without a cast [-Wint-conversion]
>      492 |                               DRM_SCHED_PRIORITY_COUNT, NULL, 1,
>          |                               ^~~~~~~~~~~~~~~~~~~~~~~~
>          |                               |
>          |                               int
>    In file included from drivers/gpu/drm/lima/lima_sched.h:7,
>                     from drivers/gpu/drm/lima/lima_device.h:12,
>                     from drivers/gpu/drm/lima/lima_ctx.h:10,
>                     from drivers/gpu/drm/lima/lima_drv.h:9,
>                     from drivers/gpu/drm/lima/lima_sched.c:11:
>    include/drm/gpu_scheduler.h:530:45: note: expected 'struct workqueue_struct *' but argument is of type 'int'
>      530 |                    struct workqueue_struct *submit_wq,
>          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>    In file included from include/uapi/linux/posix_types.h:5,
>                     from include/uapi/linux/types.h:14,
>                     from include/linux/types.h:6,
>                     from include/linux/io.h:9,
>                     from include/linux/iosys-map.h:10,
>                     from drivers/gpu/drm/lima/lima_sched.c:4:
>>> include/linux/stddef.h:8:14: warning: passing argument 4 of 'drm_sched_init' makes integer from pointer without a cast [-Wint-conversion]
>        8 | #define NULL ((void *)0)
>          |              ^~~~~~~~~~~
>          |              |
>          |              void *
>    drivers/gpu/drm/lima/lima_sched.c:492:57: note: in expansion of macro 'NULL'
>      492 |                               DRM_SCHED_PRIORITY_COUNT, NULL, 1,
>          |                                                         ^~~~
>    include/drm/gpu_scheduler.h:531:24: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
>      531 |                    u32 num_rqs, uint32_t hw_submission, unsigned hang_limit,
>          |                    ~~~~^~~~~~~
> --
>    drivers/gpu/drm/v3d/v3d_sched.c: In function 'v3d_sched_init':
>>> drivers/gpu/drm/v3d/v3d_sched.c:391:50: warning: passing argument 3 of 'drm_sched_init' makes pointer from integer without a cast [-Wint-conversion]
>      391 |                              &v3d_bin_sched_ops, DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
>          |                                                  |
>          |                                                  int
>    In file included from drivers/gpu/drm/v3d/v3d_drv.h:12,
>                     from drivers/gpu/drm/v3d/v3d_sched.c:23:
>    include/drm/gpu_scheduler.h:530:45: note: expected 'struct workqueue_struct *' but argument is of type 'int'
>      530 |                    struct workqueue_struct *submit_wq,
>          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>    In file included from include/uapi/linux/posix_types.h:5,
>                     from include/uapi/linux/types.h:14,
>                     from include/linux/types.h:6,
>                     from include/linux/kasan-checks.h:5,
>                     from include/asm-generic/rwonce.h:26,
>                     from ./arch/m68k/include/generated/asm/rwonce.h:1,
>                     from include/linux/compiler.h:246,
>                     from include/linux/err.h:5,
>                     from include/linux/kthread.h:5,
>                     from drivers/gpu/drm/v3d/v3d_sched.c:21:
>>> include/linux/stddef.h:8:14: warning: passing argument 4 of 'drm_sched_init' makes integer from pointer without a cast [-Wint-conversion]
>        8 | #define NULL ((void *)0)
>          |              ^~~~~~~~~~~
>          |              |
>          |              void *
>    drivers/gpu/drm/v3d/v3d_sched.c:391:76: note: in expansion of macro 'NULL'
>      391 |                              &v3d_bin_sched_ops, DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                                                            ^~~~
>    include/drm/gpu_scheduler.h:531:24: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
>      531 |                    u32 num_rqs, uint32_t hw_submission, unsigned hang_limit,
>          |                    ~~~~^~~~~~~
>    drivers/gpu/drm/v3d/v3d_sched.c:399:53: warning: passing argument 3 of 'drm_sched_init' makes pointer from integer without a cast [-Wint-conversion]
>      399 |                              &v3d_render_sched_ops, DRM_SCHED_PRIORITY_COUNT,
>          |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~
>          |                                                     |
>          |                                                     int
>    include/drm/gpu_scheduler.h:530:45: note: expected 'struct workqueue_struct *' but argument is of type 'int'
>      530 |                    struct workqueue_struct *submit_wq,
>          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>>> include/linux/stddef.h:8:14: warning: passing argument 4 of 'drm_sched_init' makes integer from pointer without a cast [-Wint-conversion]
>        8 | #define NULL ((void *)0)
>          |              ^~~~~~~~~~~
>          |              |
>          |              void *
>    drivers/gpu/drm/v3d/v3d_sched.c:400:30: note: in expansion of macro 'NULL'
>      400 |                              NULL, hw_jobs_limit, job_hang_limit,
>          |                              ^~~~
>    include/drm/gpu_scheduler.h:531:24: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
>      531 |                    u32 num_rqs, uint32_t hw_submission, unsigned hang_limit,
>          |                    ~~~~^~~~~~~
>    drivers/gpu/drm/v3d/v3d_sched.c:407:50: warning: passing argument 3 of 'drm_sched_init' makes pointer from integer without a cast [-Wint-conversion]
>      407 |                              &v3d_tfu_sched_ops, DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
>          |                                                  |
>          |                                                  int
>    include/drm/gpu_scheduler.h:530:45: note: expected 'struct workqueue_struct *' but argument is of type 'int'
>      530 |                    struct workqueue_struct *submit_wq,
>          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>>> include/linux/stddef.h:8:14: warning: passing argument 4 of 'drm_sched_init' makes integer from pointer without a cast [-Wint-conversion]
>        8 | #define NULL ((void *)0)
>          |              ^~~~~~~~~~~
>          |              |
>          |              void *
>    drivers/gpu/drm/v3d/v3d_sched.c:407:76: note: in expansion of macro 'NULL'
>      407 |                              &v3d_tfu_sched_ops, DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                                                            ^~~~
>    include/drm/gpu_scheduler.h:531:24: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
>      531 |                    u32 num_rqs, uint32_t hw_submission, unsigned hang_limit,
>          |                    ~~~~^~~~~~~
>    drivers/gpu/drm/v3d/v3d_sched.c:417:38: warning: passing argument 3 of 'drm_sched_init' makes pointer from integer without a cast [-Wint-conversion]
>      417 |                                      DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
>          |                                      |
>          |                                      int
>    include/drm/gpu_scheduler.h:530:45: note: expected 'struct workqueue_struct *' but argument is of type 'int'
>      530 |                    struct workqueue_struct *submit_wq,
>          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>>> include/linux/stddef.h:8:14: warning: passing argument 4 of 'drm_sched_init' makes integer from pointer without a cast [-Wint-conversion]
>        8 | #define NULL ((void *)0)
>          |              ^~~~~~~~~~~
>          |              |
>          |              void *
>    drivers/gpu/drm/v3d/v3d_sched.c:417:64: note: in expansion of macro 'NULL'
>      417 |                                      DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                                                ^~~~
>    include/drm/gpu_scheduler.h:531:24: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
>      531 |                    u32 num_rqs, uint32_t hw_submission, unsigned hang_limit,
>          |                    ~~~~^~~~~~~
>    drivers/gpu/drm/v3d/v3d_sched.c:426:38: warning: passing argument 3 of 'drm_sched_init' makes pointer from integer without a cast [-Wint-conversion]
>      426 |                                      DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
>          |                                      |
>          |                                      int
>    include/drm/gpu_scheduler.h:530:45: note: expected 'struct workqueue_struct *' but argument is of type 'int'
>      530 |                    struct workqueue_struct *submit_wq,
>          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>>> include/linux/stddef.h:8:14: warning: passing argument 4 of 'drm_sched_init' makes integer from pointer without a cast [-Wint-conversion]
>        8 | #define NULL ((void *)0)
>          |              ^~~~~~~~~~~
>          |              |
>          |              void *
>    drivers/gpu/drm/v3d/v3d_sched.c:426:64: note: in expansion of macro 'NULL'
>      426 |                                      DRM_SCHED_PRIORITY_COUNT, NULL,
>          |                                                                ^~~~
>    include/drm/gpu_scheduler.h:531:24: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
>      531 |                    u32 num_rqs, uint32_t hw_submission, unsigned hang_limit,
>          |                    ~~~~^~~~~~~
> 
> 
> vim +/drm_sched_init +138 drivers/gpu/drm/etnaviv/etnaviv_sched.c
> 
>    132	
>    133	int etnaviv_sched_init(struct etnaviv_gpu *gpu)
>    134	{
>    135		int ret;
>    136	
>    137		ret = drm_sched_init(&gpu->sched, &etnaviv_sched_ops,
>  > 138				     DRM_SCHED_PRIORITY_COUNT, NULL,
>    139				     etnaviv_hw_jobs_limit, etnaviv_job_hang_limit,
>    140				     msecs_to_jiffies(500), NULL, NULL,
>    141				     dev_name(gpu->dev), gpu->dev);
>    142		if (ret)
>    143			return ret;
>    144	
>    145		return 0;
>    146	}
>    147	
> 

-- 
Regards,
Luben




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux