diff mbox series

linux-next: build failure after merge of the drm-misc tree

Message ID 20240206152850.333f620d@canb.auug.org.au (mailing list archive)
State New, archived
Headers show
Series linux-next: build failure after merge of the drm-misc tree | expand

Commit Message

Stephen Rothwell Feb. 6, 2024, 4:28 a.m. UTC
Hi all,

After merging the drm-misc tree, today's linux-next build (i386 defconfig)
failed like this:

In function 'i915_ttm_placement_from_obj',
    inlined from 'i915_ttm_get_pages' at drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: error: 'places[0].flags' is used uninitialized [-Werror=uninitialized]
  165 |         places[0].flags |= TTM_PL_FLAG_DESIRED;
      |         ~~~~~~~~~^~~~~~
drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_get_pages':
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: 'places' declared here
  837 |         struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
      |                          ^~~~~~

Caused by commit

  a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")

I applied the following hack for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Feb 2024 15:17:54 +1100
Subject: [PATCH] drm/ttm: initialise places

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Rothwell Feb. 12, 2024, 1:25 a.m. UTC | #1
Hi all,

On Tue, 6 Feb 2024 15:28:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm-misc tree, today's linux-next build (i386 defconfig)
> failed like this:
> 
> In function 'i915_ttm_placement_from_obj',
>     inlined from 'i915_ttm_get_pages' at drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: error: 'places[0].flags' is used uninitialized [-Werror=uninitialized]
>   165 |         places[0].flags |= TTM_PL_FLAG_DESIRED;
>       |         ~~~~~~~~~^~~~~~
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_get_pages':
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: 'places' declared here
>   837 |         struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
>       |                          ^~~~~~
> 
> Caused by commit
> 
>   a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")
> 
> I applied the following hack for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 6 Feb 2024 15:17:54 +1100
> Subject: [PATCH] drm/ttm: initialise places
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 80c6cafc8887..34e699e67c25 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -834,7 +834,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
>  
>  static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)
>  {
> -	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> +	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1] = {};
>  	struct ttm_placement placement;
>  
>  	/* restricted by sg_alloc_table */
> -- 
> 2.43.0

I am still applying the above patch :-(
Jani Nikula Feb. 12, 2024, 1:15 p.m. UTC | #2
On Tue, 06 Feb 2024, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the drm-misc tree, today's linux-next build (i386 defconfig)
> failed like this:
>
> In function 'i915_ttm_placement_from_obj',
>     inlined from 'i915_ttm_get_pages' at drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: error: 'places[0].flags' is used uninitialized [-Werror=uninitialized]
>   165 |         places[0].flags |= TTM_PL_FLAG_DESIRED;
>       |         ~~~~~~~~~^~~~~~
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_get_pages':
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: 'places' declared here
>   837 |         struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
>       |                          ^~~~~~
>
> Caused by commit
>
>   a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")

Cc: more people.

>
> I applied the following hack for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 6 Feb 2024 15:17:54 +1100
> Subject: [PATCH] drm/ttm: initialise places
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 80c6cafc8887..34e699e67c25 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -834,7 +834,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
>  
>  static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)
>  {
> -	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> +	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1] = {};
>  	struct ttm_placement placement;
>  
>  	/* restricted by sg_alloc_table */
> -- 
> 2.43.0
Stephen Rothwell Feb. 19, 2024, 9:48 p.m. UTC | #3
Hi all,

On Mon, 12 Feb 2024 15:15:54 +0200 Jani Nikula <jani.nikula@linux.intel.com> wrote:
>
> On Tue, 06 Feb 2024, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the drm-misc tree, today's linux-next build (i386 defconfig)
> > failed like this:
> >
> > In function 'i915_ttm_placement_from_obj',
> >     inlined from 'i915_ttm_get_pages' at drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
> > drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: error: 'places[0].flags' is used uninitialized [-Werror=uninitialized]
> >   165 |         places[0].flags |= TTM_PL_FLAG_DESIRED;
> >       |         ~~~~~~~~~^~~~~~
> > drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_get_pages':
> > drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: 'places' declared here
> >   837 |         struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> >       |                          ^~~~~~
> >
> > Caused by commit
> >
> >   a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")  
> 
> Cc: more people.
> 
> >
> > I applied the following hack for today:
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Tue, 6 Feb 2024 15:17:54 +1100
> > Subject: [PATCH] drm/ttm: initialise places
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > index 80c6cafc8887..34e699e67c25 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > @@ -834,7 +834,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
> >  
> >  static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)
> >  {
> > -	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> > +	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1] = {};
> >  	struct ttm_placement placement;
> >  
> >  	/* restricted by sg_alloc_table */
> > -- 
> > 2.43.0  

I am still applying the above patch ...
Stephen Rothwell Feb. 25, 2024, 9:41 p.m. UTC | #4
Hi all,

On Tue, 20 Feb 2024 08:48:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> On Mon, 12 Feb 2024 15:15:54 +0200 Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >
> > On Tue, 06 Feb 2024, Stephen Rothwell <sfr@canb.auug.org.au> wrote:  
> > >
> > > After merging the drm-misc tree, today's linux-next build (i386 defconfig)
> > > failed like this:
> > >
> > > In function 'i915_ttm_placement_from_obj',
> > >     inlined from 'i915_ttm_get_pages' at drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
> > > drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: error: 'places[0].flags' is used uninitialized [-Werror=uninitialized]
> > >   165 |         places[0].flags |= TTM_PL_FLAG_DESIRED;
> > >       |         ~~~~~~~~~^~~~~~
> > > drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_get_pages':
> > > drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: 'places' declared here
> > >   837 |         struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> > >       |                          ^~~~~~
> > >
> > > Caused by commit
> > >
> > >   a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")    
> > 
> > Cc: more people.
> >   
> > >
> > > I applied the following hack for today:
> > >
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Tue, 6 Feb 2024 15:17:54 +1100
> > > Subject: [PATCH] drm/ttm: initialise places
> > >
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > index 80c6cafc8887..34e699e67c25 100644
> > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > @@ -834,7 +834,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
> > >  
> > >  static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)
> > >  {
> > > -	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> > > +	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1] = {};
> > >  	struct ttm_placement placement;
> > >  
> > >  	/* restricted by sg_alloc_table */
> > > -- 
> > > 2.43.0    
> 
> I am still applying the above patch ...

Any progress?
Stephen Rothwell Feb. 25, 2024, 9:47 p.m. UTC | #5
Hi all,

On Mon, 26 Feb 2024 08:41:16 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> On Tue, 20 Feb 2024 08:48:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > On Mon, 12 Feb 2024 15:15:54 +0200 Jani Nikula <jani.nikula@linux.intel.com> wrote:  
> > >
> > > On Tue, 06 Feb 2024, Stephen Rothwell <sfr@canb.auug.org.au> wrote:    
> > > >
> > > > After merging the drm-misc tree, today's linux-next build (i386 defconfig)
> > > > failed like this:
> > > >
> > > > In function 'i915_ttm_placement_from_obj',
> > > >     inlined from 'i915_ttm_get_pages' at drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
> > > > drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: error: 'places[0].flags' is used uninitialized [-Werror=uninitialized]
> > > >   165 |         places[0].flags |= TTM_PL_FLAG_DESIRED;
> > > >       |         ~~~~~~~~~^~~~~~
> > > > drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_get_pages':
> > > > drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: 'places' declared here
> > > >   837 |         struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> > > >       |                          ^~~~~~
> > > >
> > > > Caused by commit
> > > >
> > > >   a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")      
> > > 
> > > Cc: more people.
> > >     
> > > >
> > > > I applied the following hack for today:
> > > >
> > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Date: Tue, 6 Feb 2024 15:17:54 +1100
> > > > Subject: [PATCH] drm/ttm: initialise places
> > > >
> > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > ---
> > > >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > index 80c6cafc8887..34e699e67c25 100644
> > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > > > @@ -834,7 +834,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
> > > >  
> > > >  static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)
> > > >  {
> > > > -	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
> > > > +	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1] = {};
> > > >  	struct ttm_placement placement;
> > > >  
> > > >  	/* restricted by sg_alloc_table */
> > > > -- 
> > > > 2.43.0      
> > 
> > I am still applying the above patch ...  
> 
> Any progress?

And this commit is now in the drm tree.
Christian König Feb. 26, 2024, 12:56 p.m. UTC | #6
Am 25.02.24 um 22:47 schrieb Stephen Rothwell:
> Hi all,
>
> On Mon, 26 Feb 2024 08:41:16 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> On Tue, 20 Feb 2024 08:48:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>> On Mon, 12 Feb 2024 15:15:54 +0200 Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>>> On Tue, 06 Feb 2024, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>>>> After merging the drm-misc tree, today's linux-next build (i386 defconfig)
>>>>> failed like this:
>>>>>
>>>>> In function 'i915_ttm_placement_from_obj',
>>>>>      inlined from 'i915_ttm_get_pages' at drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
>>>>> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: error: 'places[0].flags' is used uninitialized [-Werror=uninitialized]
>>>>>    165 |         places[0].flags |= TTM_PL_FLAG_DESIRED;
>>>>>        |         ~~~~~~~~~^~~~~~
>>>>> drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_get_pages':
>>>>> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: 'places' declared here
>>>>>    837 |         struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
>>>>>        |                          ^~~~~~
>>>>>
>>>>> Caused by commit
>>>>>
>>>>>    a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")
>>>> Cc: more people.
>>>>      
>>>>> I applied the following hack for today:
>>>>>
>>>>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>>>>> Date: Tue, 6 Feb 2024 15:17:54 +1100
>>>>> Subject: [PATCH] drm/ttm: initialise places
>>>>>
>>>>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>>>>> ---
>>>>>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
>>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>>>>> index 80c6cafc8887..34e699e67c25 100644
>>>>> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>>>>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>>>>> @@ -834,7 +834,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
>>>>>   
>>>>>   static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)
>>>>>   {
>>>>> -	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
>>>>> +	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1] = {};
>>>>>   	struct ttm_placement placement;
>>>>>   
>>>>>   	/* restricted by sg_alloc_table */
>>>>> -- 
>>>>> 2.43.0
>>> I am still applying the above patch ...
>> Any progress?
> And this commit is now in the drm tree.

Sorry for the delay. Oring in the flag needs to come after the call and 
not before it.

Going to fix this.

Thanks,
Christian.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index 80c6cafc8887..34e699e67c25 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -834,7 +834,7 @@  static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj,
 
 static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)
 {
-	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
+	struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1] = {};
 	struct ttm_placement placement;
 
 	/* restricted by sg_alloc_table */