Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Luben Tuikov <luben.tuikov@amd.com>
To: kernel test robot <lkp@intel.com>,
	Matthew Brost <matthew.brost@intel.com>,
	dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	ltuikov@yahoo.com
Cc: oe-kbuild-all@lists.linux.dev, Emma Anholt <emma@anholt.net>,
	lina@asahilina.net, Liviu.Dudau@arm.com, robdclark@chromium.org,
	lima@lists.freedesktop.org, mcanal@igalia.com, dakr@redhat.com,
	donald.robson@imgtec.com,
	Russell King <linux+etnaviv@armlinux.org.uk>,
	thomas.hellstrom@linux.intel.com, sarah.walker@imgtec.com,
	ketil.johnsen@arm.com, linux-arm-msm@vger.kernel.org,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	etnaviv@lists.freedesktop.org,
	Alex Deucher <alexander.deucher@amd.com>,
	nouveau@lists.freedesktop.org, faith.ekstrand@collabora.com,
	boris.brezillon@collabora.com, Qiang Yu <yuq825@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	freedreno@lists.freedesktop.org, christian.koenig@amd.com
Subject: Re: [PATCH v7 3/6] drm/sched: Convert the GPU scheduler to variable number of run-queues
Date: Thu, 26 Oct 2023 05:39:56 -0400	[thread overview]
Message-ID: <f97c9e75-0a9f-4960-90d7-7f5c2bc6d92e@amd.com> (raw)
In-Reply-To: <56160837-12df-4a02-8180-dbee6d6d5a0f@amd.com>

Also note that there were no complaints from "kernel test robot <lkp@intel.com>"
when I posted my patch (this patch), but there is now, which further shows
that there's unwarranted changes. Just follow the steps I outlined below,
and we should all be good.

Thanks!

Regards,
Luben

On 2023-10-26 05:36, Luben Tuikov wrote:
> 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@intel.com/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@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/202310261439.3rbAtEoB-lkp@intel.com/
>>
>> 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@amd.com/
> 
> Save it raw to your disk from this link: https://lore.kernel.org/all/20231023032251.164775-1-luben.tuikov@amd.com/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


      reply	other threads:[~2023-10-26  9:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231026041236.1273694-1-matthew.brost@intel.com>
2023-10-26  4:12 ` [PATCH v7 3/6] drm/sched: Convert the GPU scheduler to variable number of run-queues Matthew Brost
2023-10-26  4:28   ` Luben Tuikov
2023-10-26  6:33   ` kernel test robot
2023-10-26  9:36     ` Luben Tuikov
2023-10-26  9:39       ` Luben Tuikov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f97c9e75-0a9f-4960-90d7-7f5c2bc6d92e@amd.com \
    --to=luben.tuikov@amd.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=alexander.deucher@amd.com \
    --cc=boris.brezillon@collabora.com \
    --cc=christian.koenig@amd.com \
    --cc=dakr@redhat.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=donald.robson@imgtec.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emma@anholt.net \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=faith.ekstrand@collabora.com \
    --cc=freedreno@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=ketil.johnsen@arm.com \
    --cc=lima@lists.freedesktop.org \
    --cc=lina@asahilina.net \
    --cc=linux+etnaviv@armlinux.org.uk \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=ltuikov@yahoo.com \
    --cc=matthew.brost@intel.com \
    --cc=mcanal@igalia.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@chromium.org \
    --cc=sarah.walker@imgtec.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=yuq825@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox