linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the drm tree
@ 2011-11-28  2:49 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2011-11-28  2:49 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Arjan van de Ven, Alan Cox

[-- Attachment #1: Type: text/plain, Size: 4197 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/gma500/psb_drv.c: At top level:
drivers/gpu/drm/gma500/psb_drv.c:1162:2: warning: braces around scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1162:2: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1163:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1163:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1163:4: warning: initialization from incompatible pointer type [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1163:4: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1164:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1164:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1164:4: warning: excess elements in scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1164:4: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1165:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1165:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1165:4: warning: excess elements in scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1165:4: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1166:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1166:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1166:4: warning: excess elements in scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1166:4: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1167:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1167:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1167:4: warning: excess elements in scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1167:4: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1168:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1168:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1168:4: warning: excess elements in scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1168:4: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1169:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1169:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1169:4: warning: excess elements in scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1169:4: warning: (near initialization for 'driver.fops') [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1170:4: error: field name not in record or union initializer
drivers/gpu/drm/gma500/psb_drv.c:1170:4: error: (near initialization for 'driver.fops')
drivers/gpu/drm/gma500/psb_drv.c:1170:4: warning: excess elements in scalar initializer [enabled by default]
drivers/gpu/drm/gma500/psb_drv.c:1170:4: warning: (near initialization for 'driver.fops') [enabled by default]

Caused by commit 5c49fd3aa0ab ("gma500: Add the core DRM files and
headers") interacting with commit e08e96de986c ("drm: Make the per-driver
file_operations struct const").  Again needed fixing up in commit
b63e0f9cb433 ("Merge branch 'drm-gma500-alanc' into drm-core-next").  Or
Alan should do his work based on the drm-next tree (which would then have
to become non rebasing) ...

I have used the version of the drm tree from next-20111115 again.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2023-04-11  6:47 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2023-04-11  6:47 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Thomas Hellström, Christian König,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/ttm/ttm_pool.c:73:29: error: variably modified 'global_write_combined' at file scope
   73 | static struct ttm_pool_type global_write_combined[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_pool.c:74:29: error: variably modified 'global_uncached' at file scope
   74 | static struct ttm_pool_type global_uncached[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_pool.c:76:29: error: variably modified 'global_dma32_write_combined' at file scope
   76 | static struct ttm_pool_type global_dma32_write_combined[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_pool.c:77:29: error: variably modified 'global_dma32_uncached' at file scope
   77 | static struct ttm_pool_type global_dma32_uncached[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

  322458c2bb1a ("drm/ttm: Reduce the number of used allocation orders for TTM pages")

PMD_SHIFT is not necessarily a constant on ppc (see
arch/powerpc/include/asm/book3s/64/pgtable.h).

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2023-01-19  2:12 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2023-01-19  2:12 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter
  Cc: Thomas Zimmermann, Intel Graphics, DRI,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3631 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from drivers/gpu/drm/drm_fb_helper.c:33:
drivers/gpu/drm/drm_fb_helper.c: In function 'drm_fb_helper_single_fb_probe':
drivers/gpu/drm/drm_fb_helper.c:1968:24: error: 'dev' undeclared (first use in this function); did you mean 'cdev'?
 1968 |         if (dev_is_pci(dev->dev))
      |                        ^~~
include/linux/pci.h:1151:25: note: in definition of macro 'dev_is_pci'
 1151 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
      |                         ^
drivers/gpu/drm/drm_fb_helper.c:1968:24: note: each undeclared identifier is reported only once for each function it appears in
 1968 |         if (dev_is_pci(dev->dev))
      |                        ^~~
include/linux/pci.h:1151:25: note: in definition of macro 'dev_is_pci'
 1151 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
      |                         ^
In file included from include/linux/atomic/atomic-instrumented.h:20,
                 from include/linux/atomic.h:82,
                 from include/linux/console.h:17,
                 from drivers/gpu/drm/drm_fb_helper.c:32:
include/linux/compiler_types.h:299:27: error: expression in static assertion is not an integer
  299 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
   20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
   20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
include/linux/pci.h:541:23: note: in expansion of macro 'container_of'
  541 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev)
      |                       ^~~~~~~~~~~~
drivers/gpu/drm/drm_fb_helper.c:1969:46: note: in expansion of macro 'to_pci_dev'
 1969 |                 vga_switcheroo_client_fb_set(to_pci_dev(dev->dev), fb_helper->info);
      |                                              ^~~~~~~~~~

Caused by commit

  cff84bac9922 ("drm/fh-helper: Split fbdev single-probe helper")

interacting with commit

  d1d5101452ab ("drm/fb-helper: Set framebuffer for vga-switcheroo clients")

from the drm-misc-fixes tree.

I have added the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 19 Jan 2023 12:42:56 +1100
Subject: [PATCH] fix up for "drm/fb-helper: Set framebuffer for vga-switcheroo clients"

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

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 97049a26fca2..5e445c61252d 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1942,6 +1942,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 					 int preferred_bpp)
 {
 	struct drm_client_dev *client = &fb_helper->client;
+	struct drm_device *dev = fb_helper->dev;
 	struct drm_fb_helper_surface_size sizes;
 	int ret;
 
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-06 13:56                 ` Alex Deucher
@ 2022-10-06 16:52                   ` Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2022-10-06 16:52 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Stephen Rothwell, David Airlie, Hamza Mahfooz, Mark Brown,
	Linux Kernel Mailing List, DRI, Linux Next Mailing List,
	Aurabindo Pillai, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]

Hi Alex,

On Thu, 6 Oct 2022 09:56:32 -0400 Alex Deucher <alexdeucher@gmail.com> wrote:
>
> This looks good to me.  Care to add you s-o-b?
> 
> On Thu, Oct 6, 2022 at 4:12 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > This works as well, and (in my opinion) is better:
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> > index ae13887756bf..fb6222d4c430 100644
> > --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> > @@ -499,7 +499,7 @@ bool dc_stream_remove_writeback(struct dc *dc,
> >                 struct dc_stream_state *stream,
> >                 uint32_t dwb_pipe_inst)
> >  {
> > -       int i = 0, j = 0;
> > +       unsigned int i, j;
> >         if (stream == NULL) {
> >                 dm_error("DC: dc_stream is NULL!\n");
> >                 return false;
> > @@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
> >         }
> >
> >         /* remove writeback info for disabled writeback pipes from stream */
> > -       for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
> > +       for (i = 0, j = 0; i < stream->num_wb_info; i++) {
> >                 if (stream->writeback_info[i].wb_enabled) {
> > -                       if (i != j)
> > +                       if (j < i)
> >                                 /* trim the array */
> >                                 stream->writeback_info[j] = stream->writeback_info[i];
> >                         j++;

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-06  8:12               ` Stephen Rothwell
  2022-10-06 13:56                 ` Alex Deucher
@ 2022-10-06 16:25                 ` Hamza Mahfooz
  1 sibling, 0 replies; 134+ messages in thread
From: Hamza Mahfooz @ 2022-10-06 16:25 UTC (permalink / raw)
  To: Stephen Rothwell, David Airlie
  Cc: Alex Deucher, Mark Brown, Linux Kernel Mailing List, DRI,
	Linux Next Mailing List, Aurabindo Pillai, Alex Deucher

On 2022-10-06 04:12, Stephen Rothwell wrote:
> Hi all,
> 
> On Thu, 6 Oct 2022 09:28:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> I have applied the following hack for today:
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Thu, 6 Oct 2022 09:14:26 +1100
>> Subject: [PATCH] fix up for drivers/gpu/drm/amd/display/dc/core/dc_stream.c
>>
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> ---
>>   drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
>> index ae13887756bf..a5da787b7876 100644
>> --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
>> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
>> @@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
>>   	}
>>   
>>   	/* remove writeback info for disabled writeback pipes from stream */
>> -	for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
>> +	for (i = 0, j = 0; i < stream->num_wb_info && i < MAX_DWB_PIPES; i++) {
>>   		if (stream->writeback_info[i].wb_enabled) {
>> -			if (i != j)
>> +			if ((j >= 0) && (j < i))
>>   				/* trim the array */
>>   				stream->writeback_info[j] = stream->writeback_info[i];
>>   			j++;
> 
> This works as well, and (in my opinion) is better:

I can confirm that this fix works on GCC 9.4, as well.

> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> index ae13887756bf..fb6222d4c430 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> @@ -499,7 +499,7 @@ bool dc_stream_remove_writeback(struct dc *dc,
>   		struct dc_stream_state *stream,
>   		uint32_t dwb_pipe_inst)
>   {
> -	int i = 0, j = 0;
> +	unsigned int i, j;
>   	if (stream == NULL) {
>   		dm_error("DC: dc_stream is NULL!\n");
>   		return false;
> @@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
>   	}
>   
>   	/* remove writeback info for disabled writeback pipes from stream */
> -	for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
> +	for (i = 0, j = 0; i < stream->num_wb_info; i++) {
>   		if (stream->writeback_info[i].wb_enabled) {
> -			if (i != j)
> +			if (j < i)
>   				/* trim the array */
>   				stream->writeback_info[j] = stream->writeback_info[i];
>   			j++;
> 

-- 
Hamza


^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-06  8:12               ` Stephen Rothwell
@ 2022-10-06 13:56                 ` Alex Deucher
  2022-10-06 16:52                   ` Stephen Rothwell
  2022-10-06 16:25                 ` Hamza Mahfooz
  1 sibling, 1 reply; 134+ messages in thread
From: Alex Deucher @ 2022-10-06 13:56 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Airlie, Hamza Mahfooz, Mark Brown,
	Linux Kernel Mailing List, DRI, Linux Next Mailing List,
	Aurabindo Pillai, Alex Deucher

This looks good to me.  Care to add you s-o-b?

Alex

On Thu, Oct 6, 2022 at 4:12 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> On Thu, 6 Oct 2022 09:28:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > I have applied the following hack for today:
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Thu, 6 Oct 2022 09:14:26 +1100
> > Subject: [PATCH] fix up for drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> > index ae13887756bf..a5da787b7876 100644
> > --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> > @@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
> >       }
> >
> >       /* remove writeback info for disabled writeback pipes from stream */
> > -     for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
> > +     for (i = 0, j = 0; i < stream->num_wb_info && i < MAX_DWB_PIPES; i++) {
> >               if (stream->writeback_info[i].wb_enabled) {
> > -                     if (i != j)
> > +                     if ((j >= 0) && (j < i))
> >                               /* trim the array */
> >                               stream->writeback_info[j] = stream->writeback_info[i];
> >                       j++;
>
> This works as well, and (in my opinion) is better:
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> index ae13887756bf..fb6222d4c430 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> @@ -499,7 +499,7 @@ bool dc_stream_remove_writeback(struct dc *dc,
>                 struct dc_stream_state *stream,
>                 uint32_t dwb_pipe_inst)
>  {
> -       int i = 0, j = 0;
> +       unsigned int i, j;
>         if (stream == NULL) {
>                 dm_error("DC: dc_stream is NULL!\n");
>                 return false;
> @@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
>         }
>
>         /* remove writeback info for disabled writeback pipes from stream */
> -       for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
> +       for (i = 0, j = 0; i < stream->num_wb_info; i++) {
>                 if (stream->writeback_info[i].wb_enabled) {
> -                       if (i != j)
> +                       if (j < i)
>                                 /* trim the array */
>                                 stream->writeback_info[j] = stream->writeback_info[i];
>                         j++;
>
> --
> Cheers,
> Stephen Rothwell

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-05 22:28             ` Stephen Rothwell
@ 2022-10-06  8:12               ` Stephen Rothwell
  2022-10-06 13:56                 ` Alex Deucher
  2022-10-06 16:25                 ` Hamza Mahfooz
  0 siblings, 2 replies; 134+ messages in thread
From: Stephen Rothwell @ 2022-10-06  8:12 UTC (permalink / raw)
  To: David Airlie
  Cc: Hamza Mahfooz, Alex Deucher, Mark Brown,
	Linux Kernel Mailing List, DRI, Linux Next Mailing List,
	Aurabindo Pillai, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 2361 bytes --]

Hi all,

On Thu, 6 Oct 2022 09:28:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> I have applied the following hack for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 6 Oct 2022 09:14:26 +1100
> Subject: [PATCH] fix up for drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> index ae13887756bf..a5da787b7876 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> @@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
>  	}
>  
>  	/* remove writeback info for disabled writeback pipes from stream */
> -	for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
> +	for (i = 0, j = 0; i < stream->num_wb_info && i < MAX_DWB_PIPES; i++) {
>  		if (stream->writeback_info[i].wb_enabled) {
> -			if (i != j)
> +			if ((j >= 0) && (j < i))
>  				/* trim the array */
>  				stream->writeback_info[j] = stream->writeback_info[i];
>  			j++;

This works as well, and (in my opinion) is better:

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index ae13887756bf..fb6222d4c430 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -499,7 +499,7 @@ bool dc_stream_remove_writeback(struct dc *dc,
 		struct dc_stream_state *stream,
 		uint32_t dwb_pipe_inst)
 {
-	int i = 0, j = 0;
+	unsigned int i, j;
 	if (stream == NULL) {
 		dm_error("DC: dc_stream is NULL!\n");
 		return false;
@@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
 	}
 
 	/* remove writeback info for disabled writeback pipes from stream */
-	for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
+	for (i = 0, j = 0; i < stream->num_wb_info; i++) {
 		if (stream->writeback_info[i].wb_enabled) {
-			if (i != j)
+			if (j < i)
 				/* trim the array */
 				stream->writeback_info[j] = stream->writeback_info[i];
 			j++;

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-05 16:45           ` Hamza Mahfooz
@ 2022-10-05 22:28             ` Stephen Rothwell
  2022-10-06  8:12               ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2022-10-05 22:28 UTC (permalink / raw)
  To: David Airlie
  Cc: Hamza Mahfooz, Alex Deucher, Mark Brown,
	Linux Kernel Mailing List, DRI, Linux Next Mailing List,
	Aurabindo Pillai, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

Hi all,

On Wed, 5 Oct 2022 12:45:31 -0400 Hamza Mahfooz <hamza.mahfooz@amd.com> wrote:
>
> On 2022-10-05 11:30, Alex Deucher wrote:
> > @Mahfooz, Hamza
> > @Aurabindo Pillai can you get this fixed up?
> >   
> 
> Seems like this is a false positive for GCC versions pre-12, because I'm not seeing this warning on GCC 12.2.
> However, we can fix this for older GCC versions with the following:
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h
> index 9e6025c98db9..67fede4bf248 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc_stream.h
> +++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h
> @@ -238,7 +238,7 @@ struct dc_stream_state {
> 
>   	/* writeback */
>   	unsigned int num_wb_info;
> -	struct dc_writeback_info writeback_info[MAX_DWB_PIPES];
> +	struct dc_writeback_info writeback_info[MAX_DWB_PIPES + 1];
>   	const struct dc_transfer_func *func_shaper;
>   	const struct dc_3dlut *lut3d_func;
>   	/* Computed state bits */

This is now in Linus' tree :-(

I have applied the following hack for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 6 Oct 2022 09:14:26 +1100
Subject: [PATCH] fix up for drivers/gpu/drm/amd/display/dc/core/dc_stream.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index ae13887756bf..a5da787b7876 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -520,9 +520,9 @@ bool dc_stream_remove_writeback(struct dc *dc,
 	}
 
 	/* remove writeback info for disabled writeback pipes from stream */
-	for (i = 0, j = 0; i < stream->num_wb_info && j < MAX_DWB_PIPES; i++) {
+	for (i = 0, j = 0; i < stream->num_wb_info && i < MAX_DWB_PIPES; i++) {
 		if (stream->writeback_info[i].wb_enabled) {
-			if (i != j)
+			if ((j >= 0) && (j < i))
 				/* trim the array */
 				stream->writeback_info[j] = stream->writeback_info[i];
 			j++;
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-05 15:30         ` Alex Deucher
@ 2022-10-05 16:45           ` Hamza Mahfooz
  2022-10-05 22:28             ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Hamza Mahfooz @ 2022-10-05 16:45 UTC (permalink / raw)
  To: Alex Deucher, Mark Brown
  Cc: Stephen Rothwell, Linux Kernel Mailing List, DRI,
	Linux Next Mailing List, Aurabindo Pillai, Alex Deucher,
	David Airlie

On 2022-10-05 11:30, Alex Deucher wrote:
> @Mahfooz, Hamza
> @Aurabindo Pillai can you get this fixed up?
> 

Seems like this is a false positive for GCC versions pre-12, because I'm 
not seeing this warning on GCC 12.2.
However, we can fix this for older GCC versions with the following:

diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h 
b/drivers/gpu/drm/amd/display/dc/dc_stream.h
index 9e6025c98db9..67fede4bf248 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_stream.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h
@@ -238,7 +238,7 @@ struct dc_stream_state {

  	/* writeback */
  	unsigned int num_wb_info;
-	struct dc_writeback_info writeback_info[MAX_DWB_PIPES];
+	struct dc_writeback_info writeback_info[MAX_DWB_PIPES + 1];
  	const struct dc_transfer_func *func_shaper;
  	const struct dc_3dlut *lut3d_func;
  	/* Computed state bits */


> Thanks,
> 
> Alex
> 
> On Tue, Oct 4, 2022 at 7:39 AM Mark Brown <broonie@kernel.org> wrote:
>>
>> On Tue, Oct 04, 2022 at 02:05:58PM +1100, Stephen Rothwell wrote:
>>> On Tue, 4 Oct 2022 12:24:37 +1000 David Airlie <airlied@redhat.com> wrote:
>>>> On Tue, Oct 4, 2022 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>>>> I'm not seeing it here, what gcc is this with?
>>
>>> I am using an x86_64 cross compiler hosted on ppc64le - gcc v11.2.0 (on
>>> Debian).
>>
>> I was seeing this with an x86_64 cross compiler hosted on arm64 -
>> Ubuntu 11.2.0-17ubuntu1 from the looks of it.

-- 
Hamza


^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-04 11:39       ` Mark Brown
@ 2022-10-05 15:30         ` Alex Deucher
  2022-10-05 16:45           ` Hamza Mahfooz
  0 siblings, 1 reply; 134+ messages in thread
From: Alex Deucher @ 2022-10-05 15:30 UTC (permalink / raw)
  To: Mark Brown, Mahfooz, Hamza
  Cc: Stephen Rothwell, Linux Kernel Mailing List, DRI,
	Linux Next Mailing List, Aurabindo Pillai, Alex Deucher,
	David Airlie

@Mahfooz, Hamza
@Aurabindo Pillai can you get this fixed up?

Thanks,

Alex

On Tue, Oct 4, 2022 at 7:39 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, Oct 04, 2022 at 02:05:58PM +1100, Stephen Rothwell wrote:
> > On Tue, 4 Oct 2022 12:24:37 +1000 David Airlie <airlied@redhat.com> wrote:
> > > On Tue, Oct 4, 2022 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > > I'm not seeing it here, what gcc is this with?
>
> > I am using an x86_64 cross compiler hosted on ppc64le - gcc v11.2.0 (on
> > Debian).
>
> I was seeing this with an x86_64 cross compiler hosted on arm64 -
> Ubuntu 11.2.0-17ubuntu1 from the looks of it.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-04  3:05     ` Stephen Rothwell
@ 2022-10-04 11:39       ` Mark Brown
  2022-10-05 15:30         ` Alex Deucher
  0 siblings, 1 reply; 134+ messages in thread
From: Mark Brown @ 2022-10-04 11:39 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Airlie, Lucas Stach, Aurabindo Pillai, Hamza Mahfooz,
	Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
	DRI

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

On Tue, Oct 04, 2022 at 02:05:58PM +1100, Stephen Rothwell wrote:
> On Tue, 4 Oct 2022 12:24:37 +1000 David Airlie <airlied@redhat.com> wrote:
> > On Tue, Oct 4, 2022 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> > I'm not seeing it here, what gcc is this with?

> I am using an x86_64 cross compiler hosted on ppc64le - gcc v11.2.0 (on
> Debian).

I was seeing this with an x86_64 cross compiler hosted on arm64 -
Ubuntu 11.2.0-17ubuntu1 from the looks of it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-04  2:24   ` David Airlie
@ 2022-10-04  3:05     ` Stephen Rothwell
  2022-10-04 11:39       ` Mark Brown
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2022-10-04  3:05 UTC (permalink / raw)
  To: David Airlie
  Cc: broonie, Lucas Stach, Aurabindo Pillai, Hamza Mahfooz,
	Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
	DRI

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

Hi Dave,

On Tue, 4 Oct 2022 12:24:37 +1000 David Airlie <airlied@redhat.com> wrote:
>
> On Tue, Oct 4, 2022 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Fri, 30 Sep 2022 11:54:34 +0100 broonie@kernel.org wrote:  
> > >
> > > After merging the drm tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > /tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
> > > /tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
> > >   527 |     stream->writeback_info[j] = stream->writeback_info[i];
> > >       |                                 ~~~~~~~~~~~~~~~~~~~~~~^~~
> > > cc1: all warnings being treated as errors
> > >
> > > Caused by
> > >
> > >     5d8c3e836fc224 ("drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()")
> > >
> > > I have reverted that commit for today.  
> >
> > I am still getting this failure.  The full error is:
> >
> > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
> > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:83: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
> >   527 |                                 stream->writeback_info[j] = stream->writeback_info[i];
> >       |                                                             ~~~~~~~~~~~~~~~~~~~~~~^~~
> > In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:1269,
> >                  from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:29,
> >                  from drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dc_common.h:29,
> >                  from drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:27:
> > drivers/gpu/drm/amd/amdgpu/../display/dc/dc_stream.h:241:34: note: while referencing 'writeback_info'
> >   241 |         struct dc_writeback_info writeback_info[MAX_DWB_PIPES];
> >       |                                  ^~~~~~~~~~~~~~  
> 
> I'm not seeing it here, what gcc is this with?

I am using an x86_64 cross compiler hosted on ppc64le - gcc v11.2.0 (on
Debian).

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-10-04  2:20 ` Stephen Rothwell
@ 2022-10-04  2:24   ` David Airlie
  2022-10-04  3:05     ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: David Airlie @ 2022-10-04  2:24 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: broonie, Lucas Stach, Aurabindo Pillai, Hamza Mahfooz,
	Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
	DRI

On Tue, Oct 4, 2022 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi broonie@kernel.org,
>
> On Fri, 30 Sep 2022 11:54:34 +0100 broonie@kernel.org wrote:
> >
> > After merging the drm tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > /tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
> > /tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
> >   527 |     stream->writeback_info[j] = stream->writeback_info[i];
> >       |                                 ~~~~~~~~~~~~~~~~~~~~~~^~~
> > cc1: all warnings being treated as errors
> >
> > Caused by
> >
> >     5d8c3e836fc224 ("drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()")
> >
> > I have reverted that commit for today.
>
> I am still getting this failure.  The full error is:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:83: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
>   527 |                                 stream->writeback_info[j] = stream->writeback_info[i];
>       |                                                             ~~~~~~~~~~~~~~~~~~~~~~^~~
> In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:1269,
>                  from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:29,
>                  from drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dc_common.h:29,
>                  from drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:27:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dc_stream.h:241:34: note: while referencing 'writeback_info'
>   241 |         struct dc_writeback_info writeback_info[MAX_DWB_PIPES];
>       |                                  ^~~~~~~~~~~~~~

I'm not seeing it here, what gcc is this with?

Dave.


^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-09-30 10:54 broonie
@ 2022-10-04  2:20 ` Stephen Rothwell
  2022-10-04  2:24   ` David Airlie
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2022-10-04  2:20 UTC (permalink / raw)
  To: Dave Airlie
  Cc: broonie, Lucas Stach, Aurabindo Pillai, Hamza Mahfooz,
	Alex Deucher, Linux Kernel Mailing List, Linux Next Mailing List,
	DRI

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

Hi broonie@kernel.org,

On Fri, 30 Sep 2022 11:54:34 +0100 broonie@kernel.org wrote:
>
> After merging the drm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> /tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
> /tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
>   527 |     stream->writeback_info[j] = stream->writeback_info[i];
>       |                                 ~~~~~~~~~~~~~~~~~~~~~~^~~
> cc1: all warnings being treated as errors
> 
> Caused by
> 
>     5d8c3e836fc224 ("drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()")
> 
> I have reverted that commit for today.

I am still getting this failure.  The full error is:

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:83: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
  527 |                                 stream->writeback_info[j] = stream->writeback_info[i];
      |                                                             ~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:1269,
                 from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:29,
                 from drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dc_common.h:29,
                 from drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:27:
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_stream.h:241:34: note: while referencing 'writeback_info'
  241 |         struct dc_writeback_info writeback_info[MAX_DWB_PIPES];
      |                                  ^~~~~~~~~~~~~~

I have reverted that commit again today.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2022-09-30 10:54 broonie
  2022-10-04  2:20 ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: broonie @ 2022-09-30 10:54 UTC (permalink / raw)
  To: Lucas Stach, Aurabindo Pillai, Hamza Mahfooz, Alex Deucher
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

Hi all,

After merging the drm tree, today's linux-next build (x86_64
allmodconfig) failed like this:

/tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
/tmp/next/build/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
  527 |     stream->writeback_info[j] = stream->writeback_info[i];
      |                                 ~~~~~~~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors

Caused by

    5d8c3e836fc224 ("drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()")

I have reverted that commit for today.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-02-28  6:48   ` Dave Airlie
@ 2022-02-28 15:33     ` Robert Foss
  0 siblings, 0 replies; 134+ messages in thread
From: Robert Foss @ 2022-02-28 15:33 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Hsin-Yi Wang, Daniel Vetter, Mark Brown, Dave Airlie, Allen Chen,
	Linux Kernel Mailing List, Hermes Wu, Linux Next Mailing List,
	DRI, AngeloGioacchino Del Regno

> > >
> > > Caused by commit
> > >
> > >   b5c84a9edcd418 ("drm/bridge: add it6505 driver")
> > >
> > > I have used the drm tree from yesterday instead.
> >
> > hi all,
> >
> > The following fix should be able to address the errors. Should it be
> > squashed into b5c84a9edcd418 ("drm/bridge: add it6505 driver")?
>
> Can you send a patch with this to dri-devel? It's far too far down the
> tree to sqaush anything at this point.
>

Patch submitted & reviewed.

https://lore.kernel.org/all/20220228081421.1504213-1-hsinyi@chromium.org/

Should I apply it drm-misc-next?

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-02-28  6:44 ` Hsin-Yi Wang
@ 2022-02-28  6:48   ` Dave Airlie
  2022-02-28 15:33     ` Robert Foss
  0 siblings, 1 reply; 134+ messages in thread
From: Dave Airlie @ 2022-02-28  6:48 UTC (permalink / raw)
  To: Hsin-Yi Wang, Daniel Vetter
  Cc: Mark Brown, Dave Airlie, Allen Chen, Linux Kernel Mailing List,
	Robert Foss, Hermes Wu, Linux Next Mailing List, DRI,
	AngeloGioacchino Del Regno

On Mon, 28 Feb 2022 at 16:44, Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> On Sat, Feb 26, 2022 at 12:43 AM <broonie@kernel.org> wrote:
> >
> > Hi all,
> >
> > After merging the drm tree, today's linux-next build (x86 allmodconfig)
> > failed like this:
> >
> > lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x10b: call to do_strncpy_from_user() with UACCESS enabled
> > lib/strnlen_user.o: warning: objtool: strnlen_user()+0xbb: call to do_strnlen_user() with UACCESS enabled
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
> >  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> >       |                       ^~~
> > /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
> >  3076 |  u8 read_buf[READ_BUFFER_SIZE];
> >       |     ^~~~~~~~
> > cc1: all warnings being treated as errors
> >
> > Caused by commit
> >
> >   b5c84a9edcd418 ("drm/bridge: add it6505 driver")
> >
> > I have used the drm tree from yesterday instead.
>
> hi all,
>
> The following fix should be able to address the errors. Should it be
> squashed into b5c84a9edcd418 ("drm/bridge: add it6505 driver")?

Can you send a patch with this to dri-devel? It's far too far down the
tree to sqaush anything at this point.

Dave.
>
> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c
> b/drivers/gpu/drm/bridge/ite-it6505.c
> index fb16a176822d81..f2f101220ade94 100644
> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> @@ -289,7 +289,7 @@
>  #define WORD_LENGTH_20BIT 2
>  #define WORD_LENGTH_24BIT 3
>  #define DEBUGFS_DIR_NAME "it6505-debugfs"
> -#define READ_BUFFER_SIZE 200
> +#define READ_BUFFER_SIZE 400
>
>  /* Vendor option */
>  #define HDCP_DESIRED 1
> @@ -3074,7 +3074,7 @@ static ssize_t
> receive_timing_debugfs_show(struct file *file, char __user *buf,
>         struct it6505 *it6505 = file->private_data;
>         struct drm_display_mode *vid = &it6505->video_info;
>         u8 read_buf[READ_BUFFER_SIZE];
> -       u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
> +       u8 *str = read_buf, *end = read_buf + READ_BUFFER_SIZE;
>         ssize_t ret, count;
>
>         if (!it6505)

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-02-25 16:42 broonie
  2022-02-28  3:46 ` Stephen Rothwell
@ 2022-02-28  6:44 ` Hsin-Yi Wang
  2022-02-28  6:48   ` Dave Airlie
  1 sibling, 1 reply; 134+ messages in thread
From: Hsin-Yi Wang @ 2022-02-28  6:44 UTC (permalink / raw)
  To: broonie
  Cc: Dave Airlie, DRI, Allen Chen, Hermes Wu,
	AngeloGioacchino Del Regno, Robert Foss,
	Linux Kernel Mailing List, Linux Next Mailing List

On Sat, Feb 26, 2022 at 12:43 AM <broonie@kernel.org> wrote:
>
> Hi all,
>
> After merging the drm tree, today's linux-next build (x86 allmodconfig)
> failed like this:
>
> lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x10b: call to do_strncpy_from_user() with UACCESS enabled
> lib/strnlen_user.o: warning: objtool: strnlen_user()+0xbb: call to do_strnlen_user() with UACCESS enabled
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> cc1: all warnings being treated as errors
>
> Caused by commit
>
>   b5c84a9edcd418 ("drm/bridge: add it6505 driver")
>
> I have used the drm tree from yesterday instead.

hi all,

The following fix should be able to address the errors. Should it be
squashed into b5c84a9edcd418 ("drm/bridge: add it6505 driver")?

diff --git a/drivers/gpu/drm/bridge/ite-it6505.c
b/drivers/gpu/drm/bridge/ite-it6505.c
index fb16a176822d81..f2f101220ade94 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -289,7 +289,7 @@
 #define WORD_LENGTH_20BIT 2
 #define WORD_LENGTH_24BIT 3
 #define DEBUGFS_DIR_NAME "it6505-debugfs"
-#define READ_BUFFER_SIZE 200
+#define READ_BUFFER_SIZE 400

 /* Vendor option */
 #define HDCP_DESIRED 1
@@ -3074,7 +3074,7 @@ static ssize_t
receive_timing_debugfs_show(struct file *file, char __user *buf,
        struct it6505 *it6505 = file->private_data;
        struct drm_display_mode *vid = &it6505->video_info;
        u8 read_buf[READ_BUFFER_SIZE];
-       u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
+       u8 *str = read_buf, *end = read_buf + READ_BUFFER_SIZE;
        ssize_t ret, count;

        if (!it6505)

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2022-02-25 16:42 broonie
@ 2022-02-28  3:46 ` Stephen Rothwell
  2022-02-28  6:44 ` Hsin-Yi Wang
  1 sibling, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2022-02-28  3:46 UTC (permalink / raw)
  To: Dave Airlie
  Cc: broonie, DRI, Allen Chen, Hsin-yi Wang, Hermes Wu,
	AngeloGioacchino Del Regno, Robert Foss,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 5441 bytes --]

Hi all,

On Fri, 25 Feb 2022 16:42:31 +0000 broonie@kernel.org wrote:
>
> After merging the drm tree, today's linux-next build (x86 allmodconfig)
> failed like this:
> 
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
>  3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
>       |                       ^~~
> /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
>  3076 |  u8 read_buf[READ_BUFFER_SIZE];
>       |     ^~~~~~~~
> cc1: all warnings being treated as errors
> 
> Caused by commit
> 
>   b5c84a9edcd418 ("drm/bridge: add it6505 driver")
> 
> I have used the drm tree from yesterday instead.

I am still getting these errors and so used the drm tree from
next-20220224 again.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2022-02-25 16:42 broonie
  2022-02-28  3:46 ` Stephen Rothwell
  2022-02-28  6:44 ` Hsin-Yi Wang
  0 siblings, 2 replies; 134+ messages in thread
From: broonie @ 2022-02-25 16:42 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Allen Chen, Hsin-yi Wang, Hermes Wu, AngeloGioacchino Del Regno,
	Robert Foss, Linux Kernel Mailing List, Linux Next Mailing List

Hi all,

After merging the drm tree, today's linux-next build (x86 allmodconfig)
failed like this:

lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x10b: call to do_strncpy_from_user() with UACCESS enabled
lib/strnlen_user.o: warning: objtool: strnlen_user()+0xbb: call to do_strnlen_user() with UACCESS enabled
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
 3077 |  u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
      |                       ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'
 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

  b5c84a9edcd418 ("drm/bridge: add it6505 driver")

I have used the drm tree from yesterday instead.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-09-08  3:13         ` Masahiro Yamada
@ 2021-09-08  9:07           ` Daniel Vetter
  0 siblings, 0 replies; 134+ messages in thread
From: Daniel Vetter @ 2021-09-08  9:07 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Stephen Rothwell, intel-gfx, Joonas Lahtinen, Nikula, Jani,
	Rodrigo Vivi, Dave Airlie, DRI, John Harrison, Matthew Brost,
	Alexey Dobriyan, Linux Kernel Mailing List,
	Linux Next Mailing List

On Wed, Sep 8, 2021 at 5:14 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Mon, Sep 6, 2021 at 4:34 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> >
> > On Mon, Sep 6, 2021 at 12:49 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > Hi all,
> > >
> > > On Thu, 2 Sep 2021 07:50:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Fri, 20 Aug 2021 15:23:34 +0900 Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > > >
> > > > > On Fri, Aug 20, 2021 at 11:33 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > > >
> > >  > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > > > > > failed like this:
> > > > > >
> > > > > > In file included from drivers/gpu/drm/i915/i915_debugfs.c:39:
> > > > > > drivers/gpu/drm/i915/gt/intel_gt_requests.h:9:10: fatal error: stddef.h: No such file or directory
> > > > > >     9 | #include <stddef.h>
> > > > > >       |          ^~~~~~~~~~
> > > > > >
> > > > > > Caused by commit
> > > > > >
> > > > > >   564f963eabd1 ("isystem: delete global -isystem compile option")
> > > > > >
> > > > > > from the kbuild tree interacting with commit
> > > > > >
> > > > > >   b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
> > > > > >
> > > > > > I have applied the following patch for today.
> > > > >
> > > > >
> > > > > Thanks.
> > > > >
> > > > > This fix-up does not depend on my kbuild tree in any way.
> > > > >
> > > > > So, the drm maintainer can apply it to his tree.
> > > > >
> > > > > Perhaps with
> > > > >
> > > > > Fixes: b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to
> > > > > work with GuC")
> > > >
> > > > OK, so that didn't happen so I will now apply the merge fix up to the
> > > > merge of the kbuild tree.
> > > >
> > > > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > > > Date: Fri, 20 Aug 2021 12:24:19 +1000
> > > > > > Subject: [PATCH] drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"
> > > > > >
> > > > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > > > ---
> > > > > >  drivers/gpu/drm/i915/gt/intel_gt_requests.h | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.h b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > > > index 51dbe0e3294e..d2969f68dd64 100644
> > > > > > --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > > > +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > > > @@ -6,7 +6,7 @@
> > > > > >  #ifndef INTEL_GT_REQUESTS_H
> > > > > >  #define INTEL_GT_REQUESTS_H
> > > > > >
> > > > > > -#include <stddef.h>
> > > > > > +#include <linux/stddef.h>
> > > > > >
> > > > > >  struct intel_engine_cs;
> > > > > >  struct intel_gt;
> > > > > > --
> > > > > > 2.32.0
> > >
> > > Ping?  I am still applying this ...
> >
> > Apologies, this fell through a lot of cracks. I applied this to drm-next now.
>
>
>
> Rather, I was planning to apply this fix to my kbuild tree.
>
> Since you guys did not fix the issue in time,
> I ended up with dropping [1] from my pull request.
>
> I want to get [1] merged in this MW.
>
> If I postponed it, somebody would add new
> <stddef.h> or <stdint.h> inclusion in the next development
> cycle, I will never make it in the mainline.
>
> [1] https://lore.kernel.org/linux-kernel/YQhY40teUJcTc5H4@localhost.localdomain/

Yeah no problem if you apply it too. For that:

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I just figured I make sure this is at least not lost.
-Daniel

>
>
>
>
>
> > Matt/John, as author/committer it's your job to make sure issues and
> > fixes for the stuff you're pushing don't get lost. I'd have expected
> > John to apply this to at least drm-intel-gt-next (it's not even
> > there).
> >
> > Joonas, I think this is the 2nd or 3rd or so issue this release cycle
> > where some compile fix got stuck a bit because drm-intel-gt-next isn't
> > in linux-next. Can we please fix that? It probably needs some changes
> > to the dim script.
> >
> > Cheers, Daniel
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
>
>
>
> --
> Best Regards
> Masahiro Yamada



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-09-06  7:34       ` Daniel Vetter
@ 2021-09-08  3:13         ` Masahiro Yamada
  2021-09-08  9:07           ` Daniel Vetter
  0 siblings, 1 reply; 134+ messages in thread
From: Masahiro Yamada @ 2021-09-08  3:13 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Stephen Rothwell, intel-gfx, Joonas Lahtinen, Nikula, Jani,
	Rodrigo Vivi, Dave Airlie, DRI, John Harrison, Matthew Brost,
	Alexey Dobriyan, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Sep 6, 2021 at 4:34 PM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Mon, Sep 6, 2021 at 12:49 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Hi all,
> >
> > On Thu, 2 Sep 2021 07:50:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Fri, 20 Aug 2021 15:23:34 +0900 Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > >
> > > > On Fri, Aug 20, 2021 at 11:33 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > >
> >  > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > > > > failed like this:
> > > > >
> > > > > In file included from drivers/gpu/drm/i915/i915_debugfs.c:39:
> > > > > drivers/gpu/drm/i915/gt/intel_gt_requests.h:9:10: fatal error: stddef.h: No such file or directory
> > > > >     9 | #include <stddef.h>
> > > > >       |          ^~~~~~~~~~
> > > > >
> > > > > Caused by commit
> > > > >
> > > > >   564f963eabd1 ("isystem: delete global -isystem compile option")
> > > > >
> > > > > from the kbuild tree interacting with commit
> > > > >
> > > > >   b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
> > > > >
> > > > > I have applied the following patch for today.
> > > >
> > > >
> > > > Thanks.
> > > >
> > > > This fix-up does not depend on my kbuild tree in any way.
> > > >
> > > > So, the drm maintainer can apply it to his tree.
> > > >
> > > > Perhaps with
> > > >
> > > > Fixes: b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to
> > > > work with GuC")
> > >
> > > OK, so that didn't happen so I will now apply the merge fix up to the
> > > merge of the kbuild tree.
> > >
> > > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > > Date: Fri, 20 Aug 2021 12:24:19 +1000
> > > > > Subject: [PATCH] drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"
> > > > >
> > > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > > ---
> > > > >  drivers/gpu/drm/i915/gt/intel_gt_requests.h | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.h b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > > index 51dbe0e3294e..d2969f68dd64 100644
> > > > > --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > > +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > > @@ -6,7 +6,7 @@
> > > > >  #ifndef INTEL_GT_REQUESTS_H
> > > > >  #define INTEL_GT_REQUESTS_H
> > > > >
> > > > > -#include <stddef.h>
> > > > > +#include <linux/stddef.h>
> > > > >
> > > > >  struct intel_engine_cs;
> > > > >  struct intel_gt;
> > > > > --
> > > > > 2.32.0
> >
> > Ping?  I am still applying this ...
>
> Apologies, this fell through a lot of cracks. I applied this to drm-next now.



Rather, I was planning to apply this fix to my kbuild tree.

Since you guys did not fix the issue in time,
I ended up with dropping [1] from my pull request.

I want to get [1] merged in this MW.

If I postponed it, somebody would add new
<stddef.h> or <stdint.h> inclusion in the next development
cycle, I will never make it in the mainline.

[1] https://lore.kernel.org/linux-kernel/YQhY40teUJcTc5H4@localhost.localdomain/





> Matt/John, as author/committer it's your job to make sure issues and
> fixes for the stuff you're pushing don't get lost. I'd have expected
> John to apply this to at least drm-intel-gt-next (it's not even
> there).
>
> Joonas, I think this is the 2nd or 3rd or so issue this release cycle
> where some compile fix got stuck a bit because drm-intel-gt-next isn't
> in linux-next. Can we please fix that? It probably needs some changes
> to the dim script.
>
> Cheers, Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-09-05 22:49     ` Stephen Rothwell
@ 2021-09-06  7:34       ` Daniel Vetter
  2021-09-08  3:13         ` Masahiro Yamada
  0 siblings, 1 reply; 134+ messages in thread
From: Daniel Vetter @ 2021-09-06  7:34 UTC (permalink / raw)
  To: Stephen Rothwell, intel-gfx, Joonas Lahtinen, Nikula, Jani, Rodrigo Vivi
  Cc: Masahiro Yamada, Dave Airlie, DRI, John Harrison, Matthew Brost,
	Alexey Dobriyan, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Sep 6, 2021 at 12:49 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> On Thu, 2 Sep 2021 07:50:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Fri, 20 Aug 2021 15:23:34 +0900 Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > On Fri, Aug 20, 2021 at 11:33 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
>  > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > > > failed like this:
> > > >
> > > > In file included from drivers/gpu/drm/i915/i915_debugfs.c:39:
> > > > drivers/gpu/drm/i915/gt/intel_gt_requests.h:9:10: fatal error: stddef.h: No such file or directory
> > > >     9 | #include <stddef.h>
> > > >       |          ^~~~~~~~~~
> > > >
> > > > Caused by commit
> > > >
> > > >   564f963eabd1 ("isystem: delete global -isystem compile option")
> > > >
> > > > from the kbuild tree interacting with commit
> > > >
> > > >   b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
> > > >
> > > > I have applied the following patch for today.
> > >
> > >
> > > Thanks.
> > >
> > > This fix-up does not depend on my kbuild tree in any way.
> > >
> > > So, the drm maintainer can apply it to his tree.
> > >
> > > Perhaps with
> > >
> > > Fixes: b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to
> > > work with GuC")
> >
> > OK, so that didn't happen so I will now apply the merge fix up to the
> > merge of the kbuild tree.
> >
> > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Date: Fri, 20 Aug 2021 12:24:19 +1000
> > > > Subject: [PATCH] drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"
> > > >
> > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > ---
> > > >  drivers/gpu/drm/i915/gt/intel_gt_requests.h | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.h b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > index 51dbe0e3294e..d2969f68dd64 100644
> > > > --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > > @@ -6,7 +6,7 @@
> > > >  #ifndef INTEL_GT_REQUESTS_H
> > > >  #define INTEL_GT_REQUESTS_H
> > > >
> > > > -#include <stddef.h>
> > > > +#include <linux/stddef.h>
> > > >
> > > >  struct intel_engine_cs;
> > > >  struct intel_gt;
> > > > --
> > > > 2.32.0
>
> Ping?  I am still applying this ...

Apologies, this fell through a lot of cracks. I applied this to drm-next now.

Matt/John, as author/committer it's your job to make sure issues and
fixes for the stuff you're pushing don't get lost. I'd have expected
John to apply this to at least drm-intel-gt-next (it's not even
there).

Joonas, I think this is the 2nd or 3rd or so issue this release cycle
where some compile fix got stuck a bit because drm-intel-gt-next isn't
in linux-next. Can we please fix that? It probably needs some changes
to the dim script.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-09-01 21:50   ` Stephen Rothwell
@ 2021-09-05 22:49     ` Stephen Rothwell
  2021-09-06  7:34       ` Daniel Vetter
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2021-09-05 22:49 UTC (permalink / raw)
  To: Masahiro Yamada, Dave Airlie
  Cc: DRI, John Harrison, Matthew Brost, Alexey Dobriyan,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2359 bytes --]

Hi all,

On Thu, 2 Sep 2021 07:50:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Fri, 20 Aug 2021 15:23:34 +0900 Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Fri, Aug 20, 2021 at 11:33 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:  
> > >
 > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > > failed like this:
> > >
> > > In file included from drivers/gpu/drm/i915/i915_debugfs.c:39:
> > > drivers/gpu/drm/i915/gt/intel_gt_requests.h:9:10: fatal error: stddef.h: No such file or directory
> > >     9 | #include <stddef.h>
> > >       |          ^~~~~~~~~~
> > >
> > > Caused by commit
> > >
> > >   564f963eabd1 ("isystem: delete global -isystem compile option")
> > >
> > > from the kbuild tree interacting with commit
> > >
> > >   b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
> > >
> > > I have applied the following patch for today.    
> > 
> > 
> > Thanks.
> > 
> > This fix-up does not depend on my kbuild tree in any way.
> > 
> > So, the drm maintainer can apply it to his tree.
> > 
> > Perhaps with
> > 
> > Fixes: b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to
> > work with GuC")  
> 
> OK, so that didn't happen so I will now apply the merge fix up to the
> merge of the kbuild tree.
> 
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Fri, 20 Aug 2021 12:24:19 +1000
> > > Subject: [PATCH] drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"
> > >
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > >  drivers/gpu/drm/i915/gt/intel_gt_requests.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.h b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > index 51dbe0e3294e..d2969f68dd64 100644
> > > --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > > @@ -6,7 +6,7 @@
> > >  #ifndef INTEL_GT_REQUESTS_H
> > >  #define INTEL_GT_REQUESTS_H
> > >
> > > -#include <stddef.h>
> > > +#include <linux/stddef.h>
> > >
> > >  struct intel_engine_cs;
> > >  struct intel_gt;
> > > --
> > > 2.32.0  

Ping?  I am still applying this ...
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-08-20  6:23 ` Masahiro Yamada
@ 2021-09-01 21:50   ` Stephen Rothwell
  2021-09-05 22:49     ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2021-09-01 21:50 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Dave Airlie, DRI, John Harrison, Matthew Brost, Alexey Dobriyan,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]

Hi Masahiro,

On Fri, 20 Aug 2021 15:23:34 +0900 Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Fri, Aug 20, 2021 at 11:33 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> >
> > In file included from drivers/gpu/drm/i915/i915_debugfs.c:39:
> > drivers/gpu/drm/i915/gt/intel_gt_requests.h:9:10: fatal error: stddef.h: No such file or directory
> >     9 | #include <stddef.h>
> >       |          ^~~~~~~~~~
> >
> > Caused by commit
> >
> >   564f963eabd1 ("isystem: delete global -isystem compile option")
> >
> > from the kbuild tree interacting with commit
> >
> >   b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
> >
> > I have applied the following patch for today.  
> 
> 
> Thanks.
> 
> This fix-up does not depend on my kbuild tree in any way.
> 
> So, the drm maintainer can apply it to his tree.
> 
> Perhaps with
> 
> Fixes: b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to
> work with GuC")

OK, so that didn't happen so I will now apply the merge fix up to the
merge of the kbuild tree.

> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 20 Aug 2021 12:24:19 +1000
> > Subject: [PATCH] drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/gpu/drm/i915/gt/intel_gt_requests.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.h b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > index 51dbe0e3294e..d2969f68dd64 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> > @@ -6,7 +6,7 @@
> >  #ifndef INTEL_GT_REQUESTS_H
> >  #define INTEL_GT_REQUESTS_H
> >
> > -#include <stddef.h>
> > +#include <linux/stddef.h>
> >
> >  struct intel_engine_cs;
> >  struct intel_gt;
> > --
> > 2.32.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-08-20  2:33 Stephen Rothwell
@ 2021-08-20  6:23 ` Masahiro Yamada
  2021-09-01 21:50   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Masahiro Yamada @ 2021-08-20  6:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, DRI, John Harrison, Matthew Brost, Alexey Dobriyan,
	Linux Kernel Mailing List, Linux Next Mailing List

On Fri, Aug 20, 2021 at 11:33 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> In file included from drivers/gpu/drm/i915/i915_debugfs.c:39:
> drivers/gpu/drm/i915/gt/intel_gt_requests.h:9:10: fatal error: stddef.h: No such file or directory
>     9 | #include <stddef.h>
>       |          ^~~~~~~~~~
>
> Caused by commit
>
>   564f963eabd1 ("isystem: delete global -isystem compile option")
>
> from the kbuild tree interacting with commit
>
>   b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
>
> I have applied the following patch for today.


Thanks.

This fix-up does not depend on my kbuild tree in any way.

So, the drm maintainer can apply it to his tree.

Perhaps with

Fixes: b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to
work with GuC")





>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 20 Aug 2021 12:24:19 +1000
> Subject: [PATCH] drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt_requests.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.h b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> index 51dbe0e3294e..d2969f68dd64 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
> @@ -6,7 +6,7 @@
>  #ifndef INTEL_GT_REQUESTS_H
>  #define INTEL_GT_REQUESTS_H
>
> -#include <stddef.h>
> +#include <linux/stddef.h>
>
>  struct intel_engine_cs;
>  struct intel_gt;
> --
> 2.32.0
>
> --
> Cheers,
> Stephen Rothwell



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2021-08-20  2:33 Stephen Rothwell
  2021-08-20  6:23 ` Masahiro Yamada
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2021-08-20  2:33 UTC (permalink / raw)
  To: Dave Airlie, DRI, Masahiro Yamada
  Cc: John Harrison, Matthew Brost, Alexey Dobriyan,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from drivers/gpu/drm/i915/i915_debugfs.c:39:
drivers/gpu/drm/i915/gt/intel_gt_requests.h:9:10: fatal error: stddef.h: No such file or directory
    9 | #include <stddef.h>
      |          ^~~~~~~~~~

Caused by commit

  564f963eabd1 ("isystem: delete global -isystem compile option")

from the kbuild tree interacting with commit

  b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")

I have applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Aug 2021 12:24:19 +1000
Subject: [PATCH] drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"

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

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.h b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
index 51dbe0e3294e..d2969f68dd64 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_requests.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.h
@@ -6,7 +6,7 @@
 #ifndef INTEL_GT_REQUESTS_H
 #define INTEL_GT_REQUESTS_H
 
-#include <stddef.h>
+#include <linux/stddef.h>
 
 struct intel_engine_cs;
 struct intel_gt;
-- 
2.32.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2021-04-09  3:36 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2021-04-09  3:36 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Imre Deak, Rodrigo Vivi, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/i915/display/intel_dp_link_training.c:43:13: error: redefinition of 'intel_dp_reset_lttpr_common_caps'
   43 | static void intel_dp_reset_lttpr_common_caps(struct intel_dp *intel_dp)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/display/intel_dp_link_training.c:38:13: note: previous definition of 'intel_dp_reset_lttpr_common_caps' was here
   38 | static void intel_dp_reset_lttpr_common_caps(struct intel_dp *intel_dp)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/display/intel_dp_link_training.c:38:13: warning: 'intel_dp_reset_lttpr_common_caps' defined but not used [-Wunused-function]

Caused by commit

  9976ff61f045 ("Merge remote-tracking branch 'drm/drm-next'")

Because commit

  7dffbdedb96a ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4")

from Linus' tree and commit

  264613b406eb ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4")

from the drm tree are the same patch, git added the funtion twice :-(

I have applied a merge fix patch removing the second copy.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-01-20 12:12         ` Daniel Vetter
@ 2021-01-20 20:44           ` Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2021-01-20 20:44 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Dave Airlie, Maarten Lankhorst, Intel Graphics, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, Dave Airlie, Tomi Valkeinen,
	Sebastian Reichel, DRI, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

Hi Daniel,

On Wed, 20 Jan 2021 13:12:21 +0100 Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>
> I've pulled drm-misc-next into drm-next now, so as long as all other
> drm trees are merged after drm, this should be solved now.
> drm-intel-next also has their msm build breakage fixed (I acked the
> patch already), so hopefully we should be all clean again.

Thanks.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-01-18  1:06       ` Dave Airlie
@ 2021-01-20 12:12         ` Daniel Vetter
  2021-01-20 20:44           ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Daniel Vetter @ 2021-01-20 12:12 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Stephen Rothwell, Maarten Lankhorst, Intel Graphics, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, Dave Airlie, Tomi Valkeinen,
	Sebastian Reichel, DRI, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Jan 18, 2021 at 2:06 AM Dave Airlie <airlied@gmail.com> wrote:
>
> On Mon, 18 Jan 2021 at 10:59, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > On Mon, 11 Jan 2021 10:56:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Fri, 8 Jan 2021 12:25:40 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Fri, 8 Jan 2021 11:55:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > >
> > > > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > > > > failed like this:
> > > > >
> > > > > error: the following would cause module name conflict:
> > > > >   drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.ko
> > > > >   drivers/gpu/drm/panel/panel-dsi-cm.ko
> > > > >
> > > > > Maybe caused by commit
> > > > >
> > > > >   cf64148abcfd ("drm/panel: Move OMAP's DSI command mode panel driver")
> > > > >
> > > > > I have used the drm tree from next-20210107 for today.
> > > >
> > > > This has affected the drm-misc tree as well (since it merged in the drm
> > > > tree).
> > > >
> > > > I have used the drm-misc tree from next-20210107 for today.
> > >
> > > And now the drm-intel tree.
> > >
> > > I have used the drm-intel tree from next-20210108 for today.
> >
> > This is still affecting the drm and drm-intel trees.
>
> I think the fix for this is in drm-misc-next, Maarten can you send me
> a -next PR to fix this?

I've pulled drm-misc-next into drm-next now, so as long as all other
drm trees are merged after drm, this should be solved now.
drm-intel-next also has their msm build breakage fixed (I acked the
patch already), so hopefully we should be all clean again.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-01-18  0:59     ` Stephen Rothwell
@ 2021-01-18  1:06       ` Dave Airlie
  2021-01-20 12:12         ` Daniel Vetter
  0 siblings, 1 reply; 134+ messages in thread
From: Dave Airlie @ 2021-01-18  1:06 UTC (permalink / raw)
  To: Stephen Rothwell, Maarten Lankhorst
  Cc: Daniel Vetter, Intel Graphics, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, Dave Airlie, Tomi Valkeinen, Sebastian Reichel,
	DRI, Linux Kernel Mailing List, Linux Next Mailing List

On Mon, 18 Jan 2021 at 10:59, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> On Mon, 11 Jan 2021 10:56:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Fri, 8 Jan 2021 12:25:40 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Fri, 8 Jan 2021 11:55:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > > > failed like this:
> > > >
> > > > error: the following would cause module name conflict:
> > > >   drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.ko
> > > >   drivers/gpu/drm/panel/panel-dsi-cm.ko
> > > >
> > > > Maybe caused by commit
> > > >
> > > >   cf64148abcfd ("drm/panel: Move OMAP's DSI command mode panel driver")
> > > >
> > > > I have used the drm tree from next-20210107 for today.
> > >
> > > This has affected the drm-misc tree as well (since it merged in the drm
> > > tree).
> > >
> > > I have used the drm-misc tree from next-20210107 for today.
> >
> > And now the drm-intel tree.
> >
> > I have used the drm-intel tree from next-20210108 for today.
>
> This is still affecting the drm and drm-intel trees.

I think the fix for this is in drm-misc-next, Maarten can you send me
a -next PR to fix this?

Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-01-10 23:56   ` Stephen Rothwell
@ 2021-01-18  0:59     ` Stephen Rothwell
  2021-01-18  1:06       ` Dave Airlie
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2021-01-18  0:59 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi
  Cc: Dave Airlie, DRI, Sebastian Reichel, Tomi Valkeinen,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

Hi all,

On Mon, 11 Jan 2021 10:56:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Fri, 8 Jan 2021 12:25:40 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Fri, 8 Jan 2021 11:55:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:  
> > >
> > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > > failed like this:
> > > 
> > > error: the following would cause module name conflict:
> > >   drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.ko
> > >   drivers/gpu/drm/panel/panel-dsi-cm.ko
> > > 
> > > Maybe caused by commit
> > > 
> > >   cf64148abcfd ("drm/panel: Move OMAP's DSI command mode panel driver")
> > > 
> > > I have used the drm tree from next-20210107 for today.    
> > 
> > This has affected the drm-misc tree as well (since it merged in the drm
> > tree).
> > 
> > I have used the drm-misc tree from next-20210107 for today.  
> 
> And now the drm-intel tree.
> 
> I have used the drm-intel tree from next-20210108 for today.

This is still affecting the drm and drm-intel trees.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-01-08  1:25 ` Stephen Rothwell
@ 2021-01-10 23:56   ` Stephen Rothwell
  2021-01-18  0:59     ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2021-01-10 23:56 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi
  Cc: Dave Airlie, DRI, Sebastian Reichel, Tomi Valkeinen,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

Hi all,

On Fri, 8 Jan 2021 12:25:40 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Fri, 8 Jan 2021 11:55:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> > 
> > error: the following would cause module name conflict:
> >   drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.ko
> >   drivers/gpu/drm/panel/panel-dsi-cm.ko
> > 
> > Maybe caused by commit
> > 
> >   cf64148abcfd ("drm/panel: Move OMAP's DSI command mode panel driver")
> > 
> > I have used the drm tree from next-20210107 for today.  
> 
> This has affected the drm-misc tree as well (since it merged in the drm
> tree).
> 
> I have used the drm-misc tree from next-20210107 for today.

And now the drm-intel tree.

I have used the drm-intel tree from next-20210108 for today.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2021-01-08  0:55 Stephen Rothwell
@ 2021-01-08  1:25 ` Stephen Rothwell
  2021-01-10 23:56   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2021-01-08  1:25 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics
  Cc: Dave Airlie, DRI, Sebastian Reichel, Tomi Valkeinen,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

Hi all,

On Fri, 8 Jan 2021 11:55:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
> 
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> error: the following would cause module name conflict:
>   drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.ko
>   drivers/gpu/drm/panel/panel-dsi-cm.ko
> 
> Maybe caused by commit
> 
>   cf64148abcfd ("drm/panel: Move OMAP's DSI command mode panel driver")
> 
> I have used the drm tree from next-20210107 for today.

This has affected the drm-misc tree as well (since it merged in the drm
tree).

I have used the drm-misc tree from next-20210107 for today.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2021-01-08  0:55 Stephen Rothwell
  2021-01-08  1:25 ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2021-01-08  0:55 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Sebastian Reichel, Tomi Valkeinen, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

error: the following would cause module name conflict:
  drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.ko
  drivers/gpu/drm/panel/panel-dsi-cm.ko

Maybe caused by commit

  cf64148abcfd ("drm/panel: Move OMAP's DSI command mode panel driver")

I have used the drm tree from next-20210107 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2020-12-09  1:53 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2020-12-09  1:53 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, Intel Graphics, DRI
  Cc: Lucas De Marchi, Chris Wilson, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/i915/gt/intel_mocs.c: In function 'get_mocs_settings':
drivers/gpu/drm/i915/gt/intel_mocs.c:363:22: error: 'GEN11_NUM_MOCS_ENTRIES' undeclared (first use in this function); did you mean 'GEN9_NUM_MOCS_ENTRIES'?
  363 |   table->n_entries = GEN11_NUM_MOCS_ENTRIES;
      |                      ^~~~~~~~~~~~~~~~~~~~~~
      |                      GEN9_NUM_MOCS_ENTRIES
drivers/gpu/drm/i915/gt/intel_mocs.c:363:22: note: each undeclared identifier is reported only once for each function it appears in

Caused by commit

  2606b269234b ("drm/i915/dg1: Define MOCS table for DG1")

interacting with commit

  7c5c15dffe1e ("drm/i915/gt: Declare gen9 has 64 mocs entries!")

from the drm-intel-fixes tree.

I have applied the following merge fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 9 Dec 2020 12:47:45 +1100
Subject: [PATCH] fixup for "drm/i915/gt: Declare gen9 has 64 mocs entries!"

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

diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c b/drivers/gpu/drm/i915/gt/intel_mocs.c
index c60ca62b38df..ab6870242e18 100644
--- a/drivers/gpu/drm/i915/gt/intel_mocs.c
+++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
@@ -360,7 +360,7 @@ static unsigned int get_mocs_settings(const struct drm_i915_private *i915,
 	if (IS_DG1(i915)) {
 		table->size = ARRAY_SIZE(dg1_mocs_table);
 		table->table = dg1_mocs_table;
-		table->n_entries = GEN11_NUM_MOCS_ENTRIES;
+		table->n_entries = GEN9_NUM_MOCS_ENTRIES;
 	} else if (INTEL_GEN(i915) >= 12) {
 		table->size  = ARRAY_SIZE(tgl_mocs_table);
 		table->table = tgl_mocs_table;
-- 
2.29.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-30 16:45                       ` Paul Cercueil
@ 2020-09-30 16:52                         ` Christoph Hellwig
  0 siblings, 0 replies; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-30 16:52 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christoph Hellwig, Stephen Rothwell, Dave Airlie, DRI,
	Linux Next Mailing List, Linux Kernel Mailing List

On Wed, Sep 30, 2020 at 06:45:02PM +0200, Paul Cercueil wrote:
>> We don't have such a thing in the Linux API at all.
>
> dma_pgprot(dev, vma->vm_page_prot, DMA_ATTR_NON_CONSISTENT);
>
> That was giving me non-coherent cached memory, and now I don't have an 
> alternative.

Looking at Linux 5.9-rc dma_pgprot is defined as:

pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs)
{
	if (force_dma_unencrypted(dev))
		prot = pgprot_decrypted(prot);
	if (dev_is_dma_coherent(dev) ||
	    (IS_ENABLED(CONFIG_DMA_NONCOHERENT_CACHE_SYNC) &&
             (attrs & DMA_ATTR_NON_CONSISTENT)))
		return prot;
#ifdef CONFIG_ARCH_HAS_DMA_WRITE_COMBINE
	if (attrs & DMA_ATTR_WRITE_COMBINE)
		return pgprot_writecombine(prot);
#endif
	return pgprot_dmacoherent(prot);
}

so it doesn't change vma->vm_page_prot at all.

The only place that uses _CACHE_CACHABLE_NONCOHERENT is the MIPS specific
kmap_noncoherent which ha sa single caller that doesn't leak anywhere
into driver code.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-30 16:40                     ` Christoph Hellwig
@ 2020-09-30 16:45                       ` Paul Cercueil
  2020-09-30 16:52                         ` Christoph Hellwig
  0 siblings, 1 reply; 134+ messages in thread
From: Paul Cercueil @ 2020-09-30 16:45 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Dave Airlie, DRI, Linux Next Mailing List,
	Linux Kernel Mailing List



Le mer. 30 sept. 2020 à 18:40, Christoph Hellwig <hch@lst.de> a écrit 
:
> On Wed, Sep 30, 2020 at 06:39:18PM +0200, Paul Cercueil wrote:
>>>  dma_alloc_pages gives you cached memory, so you can't just use an
>>>  uncached protection for the userspace mmap here.  If you want 
>>> uncached
>>>  memory you need to use dma_alloc_coherent paired with 
>>> dma_mmap_coherent.
>>>  Or dma_alloc_wc for a slightly different flavor of uncached. (both
>>>  of the map to dma_alloc_attrs / dma_mmap_attrs eventually).
>> 
>>  I don't want uncached memory, I want non-coherent cached memory.
> 
> We don't have such a thing in the Linux API at all.

dma_pgprot(dev, vma->vm_page_prot, DMA_ATTR_NON_CONSISTENT);

That was giving me non-coherent cached memory, and now I don't have an 
alternative.

-Paul



^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-30 16:39                   ` Paul Cercueil
@ 2020-09-30 16:40                     ` Christoph Hellwig
  2020-09-30 16:45                       ` Paul Cercueil
  0 siblings, 1 reply; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-30 16:40 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christoph Hellwig, Stephen Rothwell, Dave Airlie, DRI,
	Linux Next Mailing List, Linux Kernel Mailing List

On Wed, Sep 30, 2020 at 06:39:18PM +0200, Paul Cercueil wrote:
>> dma_alloc_pages gives you cached memory, so you can't just use an
>> uncached protection for the userspace mmap here.  If you want uncached
>> memory you need to use dma_alloc_coherent paired with dma_mmap_coherent.
>> Or dma_alloc_wc for a slightly different flavor of uncached. (both
>> of the map to dma_alloc_attrs / dma_mmap_attrs eventually).
>
> I don't want uncached memory, I want non-coherent cached memory.

We don't have such a thing in the Linux API at all.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-30 16:11                 ` Christoph Hellwig
@ 2020-09-30 16:39                   ` Paul Cercueil
  2020-09-30 16:40                     ` Christoph Hellwig
  0 siblings, 1 reply; 134+ messages in thread
From: Paul Cercueil @ 2020-09-30 16:39 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Dave Airlie, DRI, Linux Next Mailing List,
	Linux Kernel Mailing List



Le mer. 30 sept. 2020 à 18:11, Christoph Hellwig <hch@lst.de> a écrit 
:
> On Wed, Sep 30, 2020 at 03:33:13PM +0200, Paul Cercueil wrote:
>>  One thing missing for remap_pfn_range(), I have no alternative for 
>> this:
>> 
>>  vma->vm_page_prot = dma_pgprot(dev, vma->vm_page_prot,
>>  DMA_ATTR_NON_CONSISTENT);
>> 
>>  So I have to do:
>> 
>>  vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
>>  pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
>>  pgprot_val(vma->vm_page_prot) |= _CACHE_CACHABLE_NONCOHERENT;
>> 
>>  And that will only compile on MIPS, because these _CACHE_* macros 
>> are only
>>  defined there.
>> 
>>  I would need something like a pgprot_noncoherent(), I think.
> 
> dma_alloc_pages gives you cached memory, so you can't just use an
> uncached protection for the userspace mmap here.  If you want uncached
> memory you need to use dma_alloc_coherent paired with 
> dma_mmap_coherent.
> Or dma_alloc_wc for a slightly different flavor of uncached. (both
> of the map to dma_alloc_attrs / dma_mmap_attrs eventually).

I don't want uncached memory, I want non-coherent cached memory.

-Paul



^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-30 13:33               ` Paul Cercueil
@ 2020-09-30 16:11                 ` Christoph Hellwig
  2020-09-30 16:39                   ` Paul Cercueil
  0 siblings, 1 reply; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-30 16:11 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christoph Hellwig, Stephen Rothwell, Dave Airlie, DRI,
	Linux Next Mailing List, Linux Kernel Mailing List

On Wed, Sep 30, 2020 at 03:33:13PM +0200, Paul Cercueil wrote:
> One thing missing for remap_pfn_range(), I have no alternative for this:
>
> vma->vm_page_prot = dma_pgprot(dev, vma->vm_page_prot, 
> DMA_ATTR_NON_CONSISTENT);
>
> So I have to do:
>
> vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
> pgprot_val(vma->vm_page_prot) |= _CACHE_CACHABLE_NONCOHERENT;
>
> And that will only compile on MIPS, because these _CACHE_* macros are only 
> defined there.
>
> I would need something like a pgprot_noncoherent(), I think.

dma_alloc_pages gives you cached memory, so you can't just use an
uncached protection for the userspace mmap here.  If you want uncached
memory you need to use dma_alloc_coherent paired with dma_mmap_coherent.
Or dma_alloc_wc for a slightly different flavor of uncached. (both
of the map to dma_alloc_attrs / dma_mmap_attrs eventually).

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-30  9:02             ` Christoph Hellwig
@ 2020-09-30 13:33               ` Paul Cercueil
  2020-09-30 16:11                 ` Christoph Hellwig
  0 siblings, 1 reply; 134+ messages in thread
From: Paul Cercueil @ 2020-09-30 13:33 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Dave Airlie, DRI, Linux Next Mailing List,
	Linux Kernel Mailing List

Hi Christoph,

Le mer. 30 sept. 2020 à 11:02, Christoph Hellwig <hch@lst.de> a écrit 
:
> On Mon, Sep 28, 2020 at 03:31:28PM +0200, Paul Cercueil wrote:
>>  It's allocated with dma_alloc_wc, but then it's only accessed as
>>  non-coherent.
>> 
>>  Anyway, for the time being I guess you could revert 37054fc81443. 
>> But I
>>  have patches on top of it in drm-misc-next so it's going to be a 
>> mess.
>> 
>>  If we have time I can come up with a custom dumb_create() fonction, 
>> to make
>>  sure that the GEM buffers are allocated with 
>> dma_alloc_noncoherent(). Is
>>  there a dma_mmap_noncoherent() too?
> 
> Please use the lower-level dma_alloc_pages and then just insert the
> pages directly using remap_pfn_range.  Although it might make sense
> to eventually create a wrapper around remap_pfn_range for all the
> vma sizing sanity checks.

One thing missing for remap_pfn_range(), I have no alternative for this:

vma->vm_page_prot = dma_pgprot(dev, vma->vm_page_prot, 
DMA_ATTR_NON_CONSISTENT);

So I have to do:

vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
pgprot_val(vma->vm_page_prot) |= _CACHE_CACHABLE_NONCOHERENT;

And that will only compile on MIPS, because these _CACHE_* macros are 
only defined there.

I would need something like a pgprot_noncoherent(), I think.

-Paul



^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28 13:31           ` Paul Cercueil
@ 2020-09-30  9:02             ` Christoph Hellwig
  2020-09-30 13:33               ` Paul Cercueil
  0 siblings, 1 reply; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-30  9:02 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christoph Hellwig, Stephen Rothwell, Dave Airlie, DRI,
	Linux Next Mailing List, Linux Kernel Mailing List

On Mon, Sep 28, 2020 at 03:31:28PM +0200, Paul Cercueil wrote:
> It's allocated with dma_alloc_wc, but then it's only accessed as 
> non-coherent.
>
> Anyway, for the time being I guess you could revert 37054fc81443. But I 
> have patches on top of it in drm-misc-next so it's going to be a mess.
>
> If we have time I can come up with a custom dumb_create() fonction, to make 
> sure that the GEM buffers are allocated with dma_alloc_noncoherent(). Is 
> there a dma_mmap_noncoherent() too?

Please use the lower-level dma_alloc_pages and then just insert the
pages directly using remap_pfn_range.  Although it might make sense
to eventually create a wrapper around remap_pfn_range for all the
vma sizing sanity checks.


>
> -Paul
>
---end quoted text---

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28 12:10         ` Christoph Hellwig
@ 2020-09-28 13:31           ` Paul Cercueil
  2020-09-30  9:02             ` Christoph Hellwig
  0 siblings, 1 reply; 134+ messages in thread
From: Paul Cercueil @ 2020-09-28 13:31 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Dave Airlie, DRI, Linux Next Mailing List,
	Linux Kernel Mailing List



Le lun. 28 sept. 2020 à 14:10, Christoph Hellwig <hch@lst.de> a écrit 
:
> On Mon, Sep 28, 2020 at 01:46:55PM +0200, Paul Cercueil wrote:
>>>  dma_mmap_attrs can only be used on allocations from dma_mmap_attrs 
>>> with
>>>  the same attrs.  As there is no allocation using 
>>> DMA_ATTR_NON_CONSISTENT
>>>  in the drm core, something looks very fishy here.
>> 
>>  Is that a fact? I don't see why you couldn't change the cache 
>> settings
>>  after allocation. In practice it works just fine.
> 
> Accessing the same physical address using different caching attributes
> is undefined behavior and fairly dangerous on most architectures, and
> thus not supported by the DMA API.

It's allocated with dma_alloc_wc, but then it's only accessed as 
non-coherent.

Anyway, for the time being I guess you could revert 37054fc81443. But I 
have patches on top of it in drm-misc-next so it's going to be a mess.

If we have time I can come up with a custom dumb_create() fonction, to 
make sure that the GEM buffers are allocated with 
dma_alloc_noncoherent(). Is there a dma_mmap_noncoherent() too?

-Paul



^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28 11:46       ` Paul Cercueil
@ 2020-09-28 12:10         ` Christoph Hellwig
  2020-09-28 13:31           ` Paul Cercueil
  0 siblings, 1 reply; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-28 12:10 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christoph Hellwig, Stephen Rothwell, Dave Airlie, DRI,
	Linux Next Mailing List, Linux Kernel Mailing List

On Mon, Sep 28, 2020 at 01:46:55PM +0200, Paul Cercueil wrote:
>> dma_mmap_attrs can only be used on allocations from dma_mmap_attrs with
>> the same attrs.  As there is no allocation using DMA_ATTR_NON_CONSISTENT
>> in the drm core, something looks very fishy here.
>
> Is that a fact? I don't see why you couldn't change the cache settings 
> after allocation. In practice it works just fine.

Accessing the same physical address using different caching attributes
is undefined behavior and fairly dangerous on most architectures, and
thus not supported by the DMA API.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28 11:34     ` Christoph Hellwig
@ 2020-09-28 11:46       ` Paul Cercueil
  2020-09-28 12:10         ` Christoph Hellwig
  0 siblings, 1 reply; 134+ messages in thread
From: Paul Cercueil @ 2020-09-28 11:46 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Dave Airlie, DRI, Linux Next Mailing List,
	Linux Kernel Mailing List



Le lun. 28 sept. 2020 à 13:34, Christoph Hellwig <hch@lst.de> a écrit 
:
> On Mon, Sep 28, 2020 at 12:15:56PM +0200, Paul Cercueil wrote:
>>  Hi Christoph,
>> 
>>  Le lun. 28 sept. 2020 à 8:04, Christoph Hellwig <hch@lst.de> a 
>> écrit :
>>>  On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote:
>>>>   Hi all,
>>>> 
>>>>   After merging the drm tree, today's linux-next build (x86_64
>>>>  allmodconfig)
>>>>   failed like this:
>>> 
>>>  The driver needs to switch do dma_alloc_noncoherent + 
>>> dma_sync_single*
>>>  like the other drivers converted in the dma tree.  Paul, let me 
>>> know if
>>>  you have any questions.
>> 
>>  I don't dma_alloc* anything, DRM core does. I use the
>>  DMA_ATTR_NON_CONSISTENT attr with dma_mmap_attrs(). Is there a 
>> replacement
>>  for that?
> 
> dma_mmap_attrs can only be used on allocations from dma_mmap_attrs 
> with
> the same attrs.  As there is no allocation using 
> DMA_ATTR_NON_CONSISTENT
> in the drm core, something looks very fishy here.

Is that a fact? I don't see why you couldn't change the cache settings 
after allocation. In practice it works just fine.

> Where does the allocation you try to mmap come from?  All the 
> allocations
> in drivers/gpu/drm/drm_gem_cma_helper.c seems to use dma_alloc_wc (aka
> dma_allloc_attrs with the DMA_ATTR_WRITE_COMBINE flag).

It's the dma_alloc_wc.

-Paul



^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28 10:15   ` Paul Cercueil
@ 2020-09-28 11:34     ` Christoph Hellwig
  2020-09-28 11:46       ` Paul Cercueil
  0 siblings, 1 reply; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-28 11:34 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christoph Hellwig, Stephen Rothwell, Dave Airlie, DRI,
	Linux Next Mailing List, Linux Kernel Mailing List

On Mon, Sep 28, 2020 at 12:15:56PM +0200, Paul Cercueil wrote:
> Hi Christoph,
>
> Le lun. 28 sept. 2020 à 8:04, Christoph Hellwig <hch@lst.de> a écrit :
>> On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote:
>>>  Hi all,
>>>
>>>  After merging the drm tree, today's linux-next build (x86_64 
>>> allmodconfig)
>>>  failed like this:
>>
>> The driver needs to switch do dma_alloc_noncoherent + dma_sync_single*
>> like the other drivers converted in the dma tree.  Paul, let me know if
>> you have any questions.
>
> I don't dma_alloc* anything, DRM core does. I use the 
> DMA_ATTR_NON_CONSISTENT attr with dma_mmap_attrs(). Is there a replacement 
> for that?

dma_mmap_attrs can only be used on allocations from dma_mmap_attrs with
the same attrs.  As there is no allocation using DMA_ATTR_NON_CONSISTENT
in the drm core, something looks very fishy here.

Where does the allocation you try to mmap come from?  All the allocations
in drivers/gpu/drm/drm_gem_cma_helper.c seems to use dma_alloc_wc (aka
dma_allloc_attrs with the DMA_ATTR_WRITE_COMBINE flag).

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28  6:04 ` Christoph Hellwig
  2020-09-28  6:08   ` Dave Airlie
@ 2020-09-28 10:15   ` Paul Cercueil
  2020-09-28 11:34     ` Christoph Hellwig
  1 sibling, 1 reply; 134+ messages in thread
From: Paul Cercueil @ 2020-09-28 10:15 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Dave Airlie, DRI, Linux Next Mailing List,
	Linux Kernel Mailing List

Hi Christoph,

Le lun. 28 sept. 2020 à 8:04, Christoph Hellwig <hch@lst.de> a écrit :
> On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote:
>>  Hi all,
>> 
>>  After merging the drm tree, today's linux-next build (x86_64 
>> allmodconfig)
>>  failed like this:
> 
> The driver needs to switch do dma_alloc_noncoherent + dma_sync_single*
> like the other drivers converted in the dma tree.  Paul, let me know 
> if
> you have any questions.

I don't dma_alloc* anything, DRM core does. I use the 
DMA_ATTR_NON_CONSISTENT attr with dma_mmap_attrs(). Is there a 
replacement for that?

-Paul



^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28  6:08   ` Dave Airlie
@ 2020-09-28  6:14     ` Christoph Hellwig
  0 siblings, 0 replies; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-28  6:14 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Christoph Hellwig, Stephen Rothwell, Dave Airlie, DRI,
	Paul Cercueil, Linux Next Mailing List,
	Linux Kernel Mailing List

On Mon, Sep 28, 2020 at 04:08:36PM +1000, Dave Airlie wrote:
> Is this possible in drm-next now (it's 5.9.0-rc5 based)?
> 
> or will I need to get a stable shared git tree that goes into drm-next
> and you send to Linus early in the MR?

I think we'll need a stable branch.   Let me help Paul with the
conversion first, and once we are done I'll create a shared branch.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28  6:04 ` Christoph Hellwig
@ 2020-09-28  6:08   ` Dave Airlie
  2020-09-28  6:14     ` Christoph Hellwig
  2020-09-28 10:15   ` Paul Cercueil
  1 sibling, 1 reply; 134+ messages in thread
From: Dave Airlie @ 2020-09-28  6:08 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Dave Airlie, DRI, Paul Cercueil,
	Linux Next Mailing List, Linux Kernel Mailing List

On Mon, 28 Sep 2020 at 16:05, Christoph Hellwig <hch@lst.de> wrote:
>
> On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
>
> The driver needs to switch do dma_alloc_noncoherent + dma_sync_single*
> like the other drivers converted in the dma tree.  Paul, let me know if
> you have any questions.

Is this possible in drm-next now (it's 5.9.0-rc5 based)?

or will I need to get a stable shared git tree that goes into drm-next
and you send to Linus early in the MR?

Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2020-09-28  3:54 Stephen Rothwell
@ 2020-09-28  6:04 ` Christoph Hellwig
  2020-09-28  6:08   ` Dave Airlie
  2020-09-28 10:15   ` Paul Cercueil
  0 siblings, 2 replies; 134+ messages in thread
From: Christoph Hellwig @ 2020-09-28  6:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, DRI, Christoph Hellwig, Paul Cercueil,
	Linux Next Mailing List, Linux Kernel Mailing List

On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:

The driver needs to switch do dma_alloc_noncoherent + dma_sync_single*
like the other drivers converted in the dma tree.  Paul, let me know if
you have any questions.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2020-09-28  3:54 Stephen Rothwell
  2020-09-28  6:04 ` Christoph Hellwig
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2020-09-28  3:54 UTC (permalink / raw)
  To: Dave Airlie, DRI, Christoph Hellwig
  Cc: Paul Cercueil, Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/ingenic/ingenic-drm-drv.c: In function 'ingenic_drm_sync_data':
drivers/gpu/drm/ingenic/ingenic-drm-drv.c:478:4: error: implicit declaration of function 'dma_cache_sync'; did you mean 'regcache_sync'? [-Werror=implicit-function-declaration]
  478 |    dma_cache_sync(priv->dev, addr + offset,
      |    ^~~~~~~~~~~~~~
      |    regcache_sync
drivers/gpu/drm/ingenic/ingenic-drm-drv.c: In function 'ingenic_drm_gem_mmap':
drivers/gpu/drm/ingenic/ingenic-drm-drv.c:671:11: error: 'DMA_ATTR_NON_CONSISTENT' undeclared (first use in this function)
  671 |   attrs = DMA_ATTR_NON_CONSISTENT;
      |           ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ingenic/ingenic-drm-drv.c:671:11: note: each undeclared identifier is reported only once for each function it appears in

Caused by commit

  37054fc81443 ("gpu/drm: ingenic: Add option to mmap GEM buffers cached")

interacting with commits

  5a8429227140 ("dma-mapping: remove dma_cache_sync")
  efa70f2fdc84 ("dma-mapping: add a new dma_alloc_pages API")

from the dma-mapping tree.

Its not immediately obvious how to fix this up, so I have just marked
CONFIG_DRM_INGENIC as BROKEN until a fix up is provided.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2020-05-08  4:29 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2020-05-08  4:29 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, Intel Graphics, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Chris Wilson

[-- Attachment #1: Type: text/plain, Size: 4395 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from include/asm-generic/bug.h:19,
                 from arch/x86/include/asm/bug.h:83,
                 from include/linux/bug.h:5,
                 from include/linux/seq_file.h:7,
                 from include/drm/drm_print.h:31,
                 from drivers/gpu/drm/i915/gt/intel_engine_cs.c:25:
drivers/gpu/drm/i915/gt/intel_engine_cs.c: In function 'intel_engine_print_registers':
drivers/gpu/drm/i915/gt/intel_engine_cs.c:1428:31: error: 'struct intel_context' has no member named 'lrc_desc'
 1428 |      upper_32_bits(rq->context->lrc_desc));
      |                               ^~
drivers/gpu/drm/i915/gt/intel_engine_cs.c:1440:31: error: 'struct intel_context' has no member named 'lrc_desc'
 1440 |      upper_32_bits(rq->context->lrc_desc));
      |                               ^~
In file included from include/linux/interrupt.h:6,
                 from drivers/gpu/drm/i915/gt/intel_lrc.c:134:
drivers/gpu/drm/i915/gt/intel_lrc.c: In function 'active_context':
drivers/gpu/drm/i915/gt/intel_lrc.c:2850:32: error: 'struct intel_context' has no member named 'lrc_desc'
 2850 |   if (upper_32_bits(rq->context->lrc_desc) == ccid) {
      |                                ^~
drivers/gpu/drm/i915/gt/intel_lrc.c:2859:32: error: 'struct intel_context' has no member named 'lrc_desc'
 2859 |   if (upper_32_bits(rq->context->lrc_desc) == ccid) {
      |                                ^~

Caused by commit

  53b2622e7746 ("drm/i915/execlists: Avoid reusing the same logical CCID")

from the drm-intel-fixes tree interacting with commits

  606727842d8b ("drm/i915/gt: Include the execlists CCID of each port in the engine dump")
  4c977837ba29 ("drm/i915/execlists: Peek at the next submission for error interrupts")

from the drm tree.

I have added teh following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 8 May 2020 14:21:40 +1000
Subject: [PATCH] drm/i915/execlists: fix up for "Avoid reusing the same logical CCID"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/gt/intel_engine_cs.c | 4 ++--
 drivers/gpu/drm/i915/gt/intel_lrc.c       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index b1f8527f02c8..7c3cb5aedfdf 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1425,7 +1425,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
 			len = scnprintf(hdr, sizeof(hdr),
 					"\t\tActive[%d]:  ccid:%08x, ",
 					(int)(port - execlists->active),
-					upper_32_bits(rq->context->lrc_desc));
+					rq->context->lrc.ccid);
 			len += print_ring(hdr + len, sizeof(hdr) - len, rq);
 			scnprintf(hdr + len, sizeof(hdr) - len, "rq: ");
 			print_request(m, rq, hdr);
@@ -1437,7 +1437,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
 			len = scnprintf(hdr, sizeof(hdr),
 					"\t\tPending[%d]: ccid:%08x, ",
 					(int)(port - execlists->pending),
-					upper_32_bits(rq->context->lrc_desc));
+					rq->context->lrc.ccid);
 			len += print_ring(hdr + len, sizeof(hdr) - len, rq);
 			scnprintf(hdr + len, sizeof(hdr) - len, "rq: ");
 			print_request(m, rq, hdr);
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 233f815c3c86..456d286c17dd 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -2847,7 +2847,7 @@ active_context(struct intel_engine_cs *engine, u32 ccid)
 	 */
 
 	for (port = el->active; (rq = *port); port++) {
-		if (upper_32_bits(rq->context->lrc_desc) == ccid) {
+		if (rq->context->lrc.ccid == ccid) {
 			ENGINE_TRACE(engine,
 				     "ccid found at active:%zd\n",
 				     port - el->active);
@@ -2856,7 +2856,7 @@ active_context(struct intel_engine_cs *engine, u32 ccid)
 	}
 
 	for (port = el->pending; (rq = *port); port++) {
-		if (upper_32_bits(rq->context->lrc_desc) == ccid) {
+		if (rq->context->lrc.ccid == ccid) {
 			ENGINE_TRACE(engine,
 				     "ccid found at pending:%zd\n",
 				     port - el->pending);
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2019-11-05  2:54 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2019-11-05  2:54 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Chris Wilson

[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/platforms/embedded6xx/Kconfig:2:error: recursive dependency detected!
arch/powerpc/platforms/embedded6xx/Kconfig:2:   symbol EMBEDDED6xx depends on BROKEN_ON_SMP
init/Kconfig:79:        symbol BROKEN_ON_SMP depends on BROKEN
init/Kconfig:76:        symbol BROKEN is selected by DRM_I915_DEBUG
drivers/gpu/drm/i915/Kconfig.debug:20:  symbol DRM_I915_DEBUG depends on DRM_I915
drivers/gpu/drm/i915/Kconfig:2: symbol DRM_I915 depends on DRM
drivers/gpu/drm/Kconfig:8:      symbol DRM depends on AGP
drivers/char/agp/Kconfig:2:     symbol AGP depends on PCI
drivers/pci/Kconfig:16: symbol PCI depends on HAVE_PCI
drivers/pci/Kconfig:7:  symbol HAVE_PCI is selected by FORCE_PCI
drivers/pci/Kconfig:11: symbol FORCE_PCI is selected by MVME5100
arch/powerpc/platforms/embedded6xx/Kconfig:51:  symbol MVME5100 depends on EMBEDDED6xx
For a resolution refer to Documentation/kbuild/kconfig-language.rst
subsection "Kconfig recursive dependency limitations"

Caused by commit

  d9d54a530a70 ("drm/i915: Put future HW and their uAPIs under STAGING & BROKEN")

You really should not select BROKEN.  It is assumed to always be false
so we can make actually broken code depend on it (and therefore not
be built).

I have used the drm tree from next-20191031 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2019-10-10  0:22 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2019-10-10  0:22 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, Intel Graphics, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Chris Wilson

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from drivers/gpu/drm/i915/i915_vma.h:35,
                 from drivers/gpu/drm/i915/gt/uc/intel_guc.h:17,
                 from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9,
                 from drivers/gpu/drm/i915/gt/intel_gt_types.h:16,
                 from drivers/gpu/drm/i915/i915_drv.h:81,
                 from drivers/gpu/drm/i915/i915_getparam.c:7:
drivers/gpu/drm/i915/gem/i915_gem_object.h:174:1: error: redefinition of 'i915_gem_object_never_bind_ggtt'
  174 | i915_gem_object_never_bind_ggtt(const struct drm_i915_gem_object *obj)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_object.h:168:1: note: previous definition of 'i915_gem_object_never_bind_ggtt' was here
  168 | i915_gem_object_never_bind_ggtt(const struct drm_i915_gem_object *obj)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by the automatic merge of commit

  3a1fea6d2353 ("drm/i915/userptr: Never allow userptr into the mappable GGTT")

from the drm-intel-fixes tree and commits

  a4311745bba9 ("drm/i915/userptr: Never allow userptr into the mappable GGTT")
  3cbad5d77749 ("drm/i915/gem: Refactor tests on obj->ops->flags")

from the drm tree.

I fixed it up by removing the extra definition.  This sort of thing will
keep happening as longs as bugs are fixed in your development trees
and then cherry-picked back into your -fixes trees.  This practise also
causes quite a few unnecessary conflicts that each have to be checked
and merged by hand.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2019-07-08  4:48 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2019-07-08  4:48 UTC (permalink / raw)
  To: Dave Airlie, DRI, Al Viro
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	David Howells, Greg Hackmann, Sumit Semwal, Chenbo Feng

[-- Attachment #1: Type: text/plain, Size: 2539 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/dma-buf/dma-buf.c: In function 'dma_buf_fs_mount':
drivers/dma-buf/dma-buf.c:65:9: error: implicit declaration of function 'mount_pseudo'; did you mean 'mount_bdev'? [-Werror=implicit-function-declaration]
  return mount_pseudo(fs_type, "dmabuf:", NULL, &dma_buf_dentry_ops,
         ^~~~~~~~~~~~
         mount_bdev
drivers/dma-buf/dma-buf.c:65:9: warning: returning 'int' from a function with return type 'struct dentry *' makes pointer from integer without a cast [-Wint-conversion]
  return mount_pseudo(fs_type, "dmabuf:", NULL, &dma_buf_dentry_ops,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    DMA_BUF_MAGIC);
    ~~~~~~~~~~~~~~

Caused by commit

  ed63bb1d1f84 ("dma-buf: give each buffer a full-fledged inode")

interacting with commit

  8d9e46d80777 ("fold mount_pseudo_xattr() into pseudo_fs_get_tree()")

from the vfs tree.

I have added the following merge fix patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 8 Jul 2019 14:36:53 +1000
Subject: [PATCH] dma-buf: convert to new mount api

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/dma-buf/dma-buf.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index dc4b2c521d79..e8587c5eedb7 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -24,6 +24,7 @@
 #include <linux/reservation.h>
 #include <linux/mm.h>
 #include <linux/mount.h>
+#include <linux/pseudo_fs.h>
 
 #include <uapi/linux/dma-buf.h>
 #include <uapi/linux/magic.h>
@@ -59,16 +60,19 @@ static const struct dentry_operations dma_buf_dentry_ops = {
 
 static struct vfsmount *dma_buf_mnt;
 
-static struct dentry *dma_buf_fs_mount(struct file_system_type *fs_type,
-		int flags, const char *name, void *data)
+static int dma_buf_init_fs_context(struct fs_context *fc)
 {
-	return mount_pseudo(fs_type, "dmabuf:", NULL, &dma_buf_dentry_ops,
-			DMA_BUF_MAGIC);
+	struct pseudo_fs_context *ctx = init_pseudo(fc, DMA_BUF_MAGIC);
+
+	if (!ctx)
+		return -ENOMEM;
+	ctx->dops = &dma_buf_dentry_ops;
+	return 0;
 }
 
 static struct file_system_type dma_buf_fs_type = {
 	.name = "dmabuf",
-	.mount = dma_buf_fs_mount,
+	.init_fs_context = dma_buf_init_fs_context,
 	.kill_sb = kill_anon_super,
 };
 
-- 
2.20.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2019-04-26  2:17 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2019-04-26  2:17 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Gerd Hoffmann, Marc-André Lureau, Noralf Trønnes

[-- Attachment #1: Type: text/plain, Size: 1886 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/virtio/virtgpu_prime.c:43:18: error: redefinition of 'virtgpu_gem_prime_get_sg_table'
 struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_prime.c:31:18: note: previous definition of 'virtgpu_gem_prime_get_sg_table' was here
 struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by a bad automaic merge between commit

  a0cecc23cfcb ("Revert "drm/virtio: drop prime import/export callbacks"")

from Linus' tree and commit

  98f41dc3b3ee ("drm/virtio: implement prime export")

from the drm tree.

I dropped the version of this function from the drm-fixes tree:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 26 Apr 2019 12:13:26 +1000
Subject: [PATCH] drm/virtio: fix up bad merge of virtgpu_gem_prime_get_sg_table

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/virtio/virtgpu_prime.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
index 0f670fc6c954..8fbf71bd0c5e 100644
--- a/drivers/gpu/drm/virtio/virtgpu_prime.c
+++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
@@ -40,11 +40,6 @@ struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
 				     bo->tbo.ttm->num_pages);
 }
 
-struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
-{
-	return ERR_PTR(-ENODEV);
-}
-
 struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
 	struct drm_device *dev, struct dma_buf_attachment *attach,
 	struct sg_table *table)
-- 
2.20.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2018-05-16  8:09 ` Oded Gabbay
@ 2018-05-17  5:00   ` Dave Airlie
  0 siblings, 0 replies; 134+ messages in thread
From: Dave Airlie @ 2018-05-17  5:00 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: Stephen Rothwell, Dave Airlie, Felix Kuehling,
	Linux-Next Mailing List, Linux Kernel Mailing List, DRI

I've applied this locally for now so I can continue arm64 builds :-)

Dave.

On 16 May 2018 at 18:09, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> On Wed, May 16, 2018 at 9:53 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi all,
>>
>> After merging the drm tree, today's linux-next build (powerpc
>> allyesconfig) failed like this:
>>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function 'init_user_pages':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:632:3: error: implicit declaration of function 'release_pages'; did you mean 'release_task'? [-Werror=implicit-function-declaration]
>>    release_pages(mem->user_pages, bo->tbo.ttm->num_pages);
>>    ^~~~~~~~~~~~~
>>    release_task
>>
>> Caused by commit
>>
>>   5ae0283e831a ("drm/amdgpu: Add userptr support for KFD")
>>
>> I have applied the following patch for today:
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Wed, 16 May 2018 16:43:34 +1000
>> Subject: [PATCH] drm/amdgpu: include pagemap.h for release_pages()
>>
>> Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD"
>> Cc: Felix Kuehling <Felix.Kuehling@amd.com>
>> Cc: Oded Gabbay <oded.gabbay@gmail.com>
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> ---
>>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> index 72ab2b1ffe75..ff8fd75f7ca5 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> @@ -23,6 +23,7 @@
>>  #define pr_fmt(fmt) "kfd2kgd: " fmt
>>
>>  #include <linux/list.h>
>> +#include <linux/pagemap.h>
>>  #include <linux/sched/mm.h>
>>  #include <drm/drmP.h>
>>  #include "amdgpu_object.h"
>> --
>> 2.17.0
>>
>> --
>> Cheers,
>> Stephen Rothwell
>
> Thanks Stephen,
>
> I'll add it to amdkfd-next and send it to Dave with other fixes.
>
> Oded
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2018-05-16  6:53 Stephen Rothwell
@ 2018-05-16  8:09 ` Oded Gabbay
  2018-05-17  5:00   ` Dave Airlie
  0 siblings, 1 reply; 134+ messages in thread
From: Oded Gabbay @ 2018-05-16  8:09 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, DRI, Linux-Next Mailing List,
	Linux Kernel Mailing List, Felix Kuehling

On Wed, May 16, 2018 at 9:53 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the drm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function 'init_user_pages':
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:632:3: error: implicit declaration of function 'release_pages'; did you mean 'release_task'? [-Werror=implicit-function-declaration]
>    release_pages(mem->user_pages, bo->tbo.ttm->num_pages);
>    ^~~~~~~~~~~~~
>    release_task
>
> Caused by commit
>
>   5ae0283e831a ("drm/amdgpu: Add userptr support for KFD")
>
> I have applied the following patch for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 16 May 2018 16:43:34 +1000
> Subject: [PATCH] drm/amdgpu: include pagemap.h for release_pages()
>
> Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD"
> Cc: Felix Kuehling <Felix.Kuehling@amd.com>
> Cc: Oded Gabbay <oded.gabbay@gmail.com>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> index 72ab2b1ffe75..ff8fd75f7ca5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> @@ -23,6 +23,7 @@
>  #define pr_fmt(fmt) "kfd2kgd: " fmt
>
>  #include <linux/list.h>
> +#include <linux/pagemap.h>
>  #include <linux/sched/mm.h>
>  #include <drm/drmP.h>
>  #include "amdgpu_object.h"
> --
> 2.17.0
>
> --
> Cheers,
> Stephen Rothwell

Thanks Stephen,

I'll add it to amdkfd-next and send it to Dave with other fixes.

Oded

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2018-05-16  6:53 Stephen Rothwell
  2018-05-16  8:09 ` Oded Gabbay
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2018-05-16  6:53 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Felix Kuehling, Oded Gabbay

[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function 'init_user_pages':
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:632:3: error: implicit declaration of function 'release_pages'; did you mean 'release_task'? [-Werror=implicit-function-declaration]
   release_pages(mem->user_pages, bo->tbo.ttm->num_pages);
   ^~~~~~~~~~~~~
   release_task

Caused by commit

  5ae0283e831a ("drm/amdgpu: Add userptr support for KFD")

I have applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 16 May 2018 16:43:34 +1000
Subject: [PATCH] drm/amdgpu: include pagemap.h for release_pages()

Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD"
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 72ab2b1ffe75..ff8fd75f7ca5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -23,6 +23,7 @@
 #define pr_fmt(fmt) "kfd2kgd: " fmt
 
 #include <linux/list.h>
+#include <linux/pagemap.h>
 #include <linux/sched/mm.h>
 #include <drm/drmP.h>
 #include "amdgpu_object.h"
-- 
2.17.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2018-03-13  5:46 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2018-03-13  5:46 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Rex Zhu,
	Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 1963 bytes --]

Hi all,

After merging the drm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c: In function 'smu7_notify_link_speed_change_after_state_change':
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:3830:7: error: implicit declaration of function 'amdgpu_acpi_pcie_performance_request'; did you mean 'smu7_pcie_performance_request'? [-Werror=implicit-function-declaration]
   if (amdgpu_acpi_pcie_performance_request(hwmgr->adev, request, false)) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       smu7_pcie_performance_request

Caused by commit

  e1deba285156 ("drm/amd/pp: Use amdgpu acpi helper functions in powerplay")

and commit

  37a94791a097 ("drm/amd/pp: Add #ifdef checks for CONFIG_ACPI")

missed this instance.

I added this hack patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 13 Mar 2018 16:24:31 +1100
Subject: [PATCH] drm/amd/pp: add another CONFIG_ACPI check

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index d4d1d2e7e233..df2a312ca6c9 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -3827,12 +3827,14 @@ static int smu7_notify_link_speed_change_after_state_change(
 				smu7_get_current_pcie_speed(hwmgr) > 0)
 			return 0;
 
+#ifdef CONFIG_ACPI
 		if (amdgpu_acpi_pcie_performance_request(hwmgr->adev, request, false)) {
 			if (PP_PCIEGen2 == target_link_speed)
 				pr_info("PSPP request to switch to Gen2 from Gen3 Failed!");
 			else
 				pr_info("PSPP request to switch to Gen1 from Gen2 Failed!");
 		}
+#endif
 	}
 
 	return 0;
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2018-01-02  1:48 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2018-01-02  1:48 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Jerry (Fangzhi) Zuo, Alex Deucher

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:219:6: error: redefinition of 'dm_dp_mst_dc_sink_create'
 void dm_dp_mst_dc_sink_create(struct drm_connector *connector)
      ^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:183:6: note: previous definition of 'dm_dp_mst_dc_sink_create' was here
 void dm_dp_mst_dc_sink_create(struct drm_connector *connector)
      ^

Caused by commit

  391ef035200f ("drm/amd/display: Fix rehook MST display not light back on")

automatically mergeing badly with commit

  becd0875f439 ("drm/amd/display: Fix rehook MST display not light back on")

from Linus' tree.

I applied this merge fix patch (to remove the second copy of
dm_dp_mst_dc_sink_create):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 2 Jan 2018 12:43:32 +1100
Subject: [PATCH] drm/amd/display: fix mismerge of identical patches

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    | 36 ----------------------
 1 file changed, 36 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 7ace4dd302c1..f3d87f418d2e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -216,42 +216,6 @@ void dm_dp_mst_dc_sink_create(struct drm_connector *connector)
 					&aconnector->base, aconnector->edid);
 }
 
-void dm_dp_mst_dc_sink_create(struct drm_connector *connector)
-{
-	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
-	struct edid *edid;
-	struct dc_sink *dc_sink;
-	struct dc_sink_init_data init_params = {
-			.link = aconnector->dc_link,
-			.sink_signal = SIGNAL_TYPE_DISPLAY_PORT_MST };
-
-	edid = drm_dp_mst_get_edid(connector, &aconnector->mst_port->mst_mgr, aconnector->port);
-
-	if (!edid) {
-		drm_mode_connector_update_edid_property(
-			&aconnector->base,
-			NULL);
-		return;
-	}
-
-	aconnector->edid = edid;
-
-	dc_sink = dc_link_add_remote_sink(
-		aconnector->dc_link,
-		(uint8_t *)aconnector->edid,
-		(aconnector->edid->extensions + 1) * EDID_LENGTH,
-		&init_params);
-
-	dc_sink->priv = aconnector;
-	aconnector->dc_sink = dc_sink;
-
-	amdgpu_dm_add_sink_to_freesync_module(
-			connector, aconnector->edid);
-
-	drm_mode_connector_update_edid_property(
-					&aconnector->base, aconnector->edid);
-}
-
 static int dm_dp_mst_get_modes(struct drm_connector *connector)
 {
 	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
-- 
2.15.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2017-09-28  4:57 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2017-09-28  4:57 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Rex Zhu,
	Alex Deucher

Hi Dave,

After merging the drm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.o:(.opd+0xd8): multiple definition of `ci_send_msg_to_smc'
drivers/gpu/drm/radeon/ci_smc.o:(.opd+0xc0): first defined here
drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.o: In function `.ci_send_msg_to_smc':
(.text+0xea0): multiple definition of `.ci_send_msg_to_smc'
drivers/gpu/drm/radeon/ci_smc.o:(.text+0x760): first defined here


Caused by commit

  9f4b35411cfe ("drm/amd/powerplay: add CI asics support to smumgr (v3)")

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 28 Sep 2017 14:50:51 +1000
Subject: [PATCH] drm/amd/powerplay: uniquify ci_send_msg_to_smc

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c    | 4 ++--
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h    | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
index 9ee14315dce7..fcf88b8fc738 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
@@ -208,7 +208,7 @@ static int ci_read_smc_sram_dword(struct pp_hwmgr *hwmgr, uint32_t smc_addr,
 	return 0;
 }
 
-int ci_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
+int sumgr_ci_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
 {
 	int ret;
 
@@ -231,7 +231,7 @@ int ci_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr,
 					uint16_t msg, uint32_t parameter)
 {
 	cgs_write_register(hwmgr->device, mmSMC_MSG_ARG_0, parameter);
-	return ci_send_msg_to_smc(hwmgr, msg);
+	return sumgr_ci_send_msg_to_smc(hwmgr, msg);
 }
 
 static void ci_initialize_power_tune_defaults(struct pp_hwmgr *hwmgr)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h
index cc4176d2d25f..61d17e354d6d 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h
@@ -32,7 +32,7 @@ struct amd_pp_profile;
 
 int ci_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr,
 					uint16_t msg, uint32_t parameter);
-int ci_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg);
+int sumgr_ci_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg);
 int ci_populate_all_graphic_levels(struct pp_hwmgr *hwmgr);
 int ci_populate_all_memory_levels(struct pp_hwmgr *hwmgr);
 int ci_init_smc_table(struct pp_hwmgr *hwmgr);
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
index f265f42a7ed3..ce3c13f9e97b 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
@@ -68,7 +68,7 @@ const struct pp_smumgr_func ci_smu_funcs = {
 	.check_fw_load_finish = NULL,
 	.request_smu_load_fw = NULL,
 	.request_smu_load_specific_fw = NULL,
-	.send_msg_to_smc = ci_send_msg_to_smc,
+	.send_msg_to_smc = sumgr_ci_send_msg_to_smc,
 	.send_msg_to_smc_with_parameter = ci_send_msg_to_smc_with_parameter,
 	.download_pptable_settings = NULL,
 	.upload_pptable_settings = NULL,
-- 
2.14.1

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2017-03-20  8:03 ` Daniel Vetter
@ 2017-03-20  8:05   ` Daniel Vetter
  0 siblings, 0 replies; 134+ messages in thread
From: Daniel Vetter @ 2017-03-20  8:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, Intel Graphics, DRI, linux-next,
	Linux Kernel Mailing List, Chris Wilson, Jani Nikula

On Mon, Mar 20, 2017 at 9:03 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> On Mon, Mar 20, 2017 at 1:51 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> This cherry picking of fixes from new development back to Linus' tree
>> can be a real pain when so many other changes happen in the same files.
>
> One possible fix for this would be if you reuse our rerere cache. The
> only reason we don't go insane with all the drm conflicts is that we
> completely distributed conflict resolution. Developers push a patch,
> script tells them there's a conflict, they resolve it, maintainers
> never even notice.We only notice when we double-check the merge
> resolution when rerere re-applies it for the real backmerge :-) The
> merge order in drm-tip should also match what you have in linux-next,
> so you should be able to entirely reuse them.
>
> Anyway, if you trust us enough to scoop up random git rerere caches
> (or at least use them to double-check your own), they're all public:
>
> git://anongit.freedesktop.org/drm-tip rerere-cache
>
> Or
>
> https://cgit.freedesktop.org/drm-tip/tree/rr-cache?h=rerere-cache
>
> Yes we should probably gc them, but disk space is cheap.

And the merge order, in case you want to check that. We can adjust it ofc:

https://cgit.freedesktop.org/drm-tip/tree/nightly.conf?h=rerere-cache

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2017-03-20  0:51 Stephen Rothwell
@ 2017-03-20  8:03 ` Daniel Vetter
  2017-03-20  8:05   ` Daniel Vetter
  0 siblings, 1 reply; 134+ messages in thread
From: Daniel Vetter @ 2017-03-20  8:03 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, Intel Graphics, DRI, linux-next,
	Linux Kernel Mailing List, Chris Wilson, Jani Nikula

On Mon, Mar 20, 2017 at 1:51 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> This cherry picking of fixes from new development back to Linus' tree
> can be a real pain when so many other changes happen in the same files.

One possible fix for this would be if you reuse our rerere cache. The
only reason we don't go insane with all the drm conflicts is that we
completely distributed conflict resolution. Developers push a patch,
script tells them there's a conflict, they resolve it, maintainers
never even notice.We only notice when we double-check the merge
resolution when rerere re-applies it for the real backmerge :-) The
merge order in drm-tip should also match what you have in linux-next,
so you should be able to entirely reuse them.

Anyway, if you trust us enough to scoop up random git rerere caches
(or at least use them to double-check your own), they're all public:

git://anongit.freedesktop.org/drm-tip rerere-cache

Or

https://cgit.freedesktop.org/drm-tip/tree/rr-cache?h=rerere-cache

Yes we should probably gc them, but disk space is cheap.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2017-03-20  0:51 Stephen Rothwell
  2017-03-20  8:03 ` Daniel Vetter
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2017-03-20  0:51 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: linux-next, linux-kernel, Chris Wilson, Jani Nikula

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/i915/i915_irq.c: In function 'gen6_rps_reset_ei':
drivers/gpu/drm/i915/i915_irq.c:1115:38: error: 'struct intel_gen6_power_mgmt' has no member named 'down_ei'
  vlv_c0_read(dev_priv, &dev_priv->rps.down_ei);
                                      ^
drivers/gpu/drm/i915/i915_irq.c:1116:15: error: 'struct intel_gen6_power_mgmt' has no member named 'up_ei'
  dev_priv->rps.up_ei = dev_priv->rps.down_ei;
               ^
drivers/gpu/drm/i915/i915_irq.c:1116:37: error: 'struct intel_gen6_power_mgmt' has no member named 'down_ei'
  dev_priv->rps.up_ei = dev_priv->rps.down_ei;
                                     ^
drivers/gpu/drm/i915/i915_irq.c: In function 'vlv_wa_c0_ei':
drivers/gpu/drm/i915/i915_irq.c:1133:21: error: 'struct intel_gen6_power_mgmt' has no member named 'down_ei'
       &dev_priv->rps.down_ei, &now,
                     ^
drivers/gpu/drm/i915/i915_irq.c:1136:16: error: 'struct intel_gen6_power_mgmt' has no member named 'down_ei'
   dev_priv->rps.down_ei = now;
                ^
drivers/gpu/drm/i915/i915_irq.c:1141:20: error: 'struct intel_gen6_power_mgmt' has no member named 'up_ei'
      &dev_priv->rps.up_ei, &now,
                    ^
drivers/gpu/drm/i915/i915_irq.c:1144:16: error: 'struct intel_gen6_power_mgmt' has no member named 'up_ei'
   dev_priv->rps.up_ei = now;
                ^
Caused by commit

  8f68d591d476 ("drm/i915: Stop using RP_DOWN_EI on Baytrail")

from the drm-intel-fixes tree and a bad merge resolution on my part.

I reapplied that commit by hand.  It would be nice if this conflict was
resolved in the drm tree.

This cherry picking of fixes from new development back to Linus' tree
can be a real pain when so many other changes happen in the same files.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2017-02-23 23:25 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2017-02-23 23:25 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Noralf Trønnes

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:198:26: error: redefinition of 'tinydrm_of_find_backlight'
 struct backlight_device *tinydrm_of_find_backlight(struct device *dev)
                          ^
In file included from drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:11:0:
include/drm/tinydrm/tinydrm-helpers.h:53:1: note: previous definition of 'tinydrm_of_find_backlight' was here
 tinydrm_of_find_backlight(struct device *dev)
 ^
drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:230:5: error: redefinition of 'tinydrm_enable_backlight'
 int tinydrm_enable_backlight(struct backlight_device *backlight)
     ^
In file included from drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:11:0:
include/drm/tinydrm/tinydrm-helpers.h:58:19: note: previous definition of 'tinydrm_enable_backlight' was here
 static inline int tinydrm_enable_backlight(struct backlight_device *backlight)
                   ^
drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:258:5: error: redefinition of 'tinydrm_disable_backlight'
 int tinydrm_disable_backlight(struct backlight_device *backlight)
     ^
In file included from drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:11:0:
include/drm/tinydrm/tinydrm-helpers.h:64:1: note: previous definition of 'tinydrm_disable_backlight' was here
 tinydrm_disable_backlight(struct backlight_device *backlight)
 ^

Caused by commit

  9f69eb5c36a6 ("drm/tinydrm: Add helper functions")

I have used the drm tree from next-20170223 for today.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 134+ messages in thread

* RE: linux-next: build failure after merge of the drm tree
  2017-01-24  1:25 Stephen Rothwell
@ 2017-01-25 10:52 ` Vincent ABRIOU
  0 siblings, 0 replies; 134+ messages in thread
From: Vincent ABRIOU @ 2017-01-25 10:52 UTC (permalink / raw)
  To: Stephen Rothwell, Dave Airlie
  Cc: linux-next, linux-kernel, Ville Syrjälä

Dave,

Here is the patch from Chris Wilson to solve the build issue:
[PATCH] drm/sti: Fix compilation failure for drm_framebuffer.pixel_format

BR
Vincent

> -----Original Message-----
> From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
> Sent: mardi 24 janvier 2017 02:25
> To: Dave Airlie <airlied@linux.ie>
> Cc: linux-next@vger.kernel.org; linux-kernel@vger.kernel.org; Vincent
> ABRIOU <vincent.abriou@st.com>; Ville Syrjälä
> <ville.syrjala@linux.intel.com>
> Subject: linux-next: build failure after merge of the drm tree
> 
> Hi Dave,
> 
> After merging the drm tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> drivers/gpu/drm/sti/sti_plane.c: In function 'sti_plane_update_fps':
> drivers/gpu/drm/sti/sti_plane.c:76:33: error: 'struct drm_framebuffer' has
> no member named 'pixel_format'
>      (char *)&plane->drm_plane.fb->pixel_format,
>                                  ^
> 
> Caused by commit
> 
>   a69e466b0666 ("drm/sti: update fps debugfs entries")
> 
> Interacting with commit
> 
>   438b74a5497c ("drm: Nuke fb->pixel_format")
> 
> This should have been fixed up in commit
> 
>   d64a1661c8f7 ("Merge tag 'sti-drm-next-2017-01-06' of
> https://github.com/vinceab/linux into drm-next")
> 
> I have used the drm tree from next-20170123 for today.
> 
> --
> Cheers,
> Stephen Rothwell

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2017-01-24  1:25 Stephen Rothwell
  2017-01-25 10:52 ` Vincent ABRIOU
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2017-01-24  1:25 UTC (permalink / raw)
  To: Dave Airlie
  Cc: linux-next, linux-kernel, Vincent Abriou, Ville Syrjälä

Hi Dave,

After merging the drm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/gpu/drm/sti/sti_plane.c: In function 'sti_plane_update_fps':
drivers/gpu/drm/sti/sti_plane.c:76:33: error: 'struct drm_framebuffer' has no member named 'pixel_format'
     (char *)&plane->drm_plane.fb->pixel_format,
                                 ^

Caused by commit

  a69e466b0666 ("drm/sti: update fps debugfs entries")

Interacting with commit

  438b74a5497c ("drm: Nuke fb->pixel_format")

This should have been fixed up in commit

  d64a1661c8f7 ("Merge tag 'sti-drm-next-2017-01-06' of https://github.com/vinceab/linux into drm-next")

I have used the drm tree from next-20170123 for today.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2016-07-15  3:40 Stephen Rothwell
@ 2016-07-15  4:32 ` Sedat Dilek
  0 siblings, 0 replies; 134+ messages in thread
From: Sedat Dilek @ 2016-07-15  4:32 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, Daniel Vetter, intel-gfx, dri-devel, linux-next,
	linux-kernel, Ville Syrjälä,
	Chris Wilson

On 7/15/16, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Dave,
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> In file included from drivers/gpu/drm/i915/intel_opregion.c:34:0:
> drivers/gpu/drm/i915/intel_opregion.c: In function
> 'intel_opregion_get_panel_type':
> drivers/gpu/drm/i915/intel_opregion.c:1042:17: error: 'dev' undeclared
> (first use in this function)
>   if (IS_SKYLAKE(dev)) {
>                  ^
> drivers/gpu/drm/i915/i915_drv.h:2603:43: note: in definition of macro
> '__I915__'
>   if (__builtin_types_compatible_p(typeof(*p), struct drm_i915_private)) \
>                                            ^
> drivers/gpu/drm/i915/i915_drv.h:2670:26: note: in expansion of macro
> 'INTEL_INFO'
>  #define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake)
>                           ^
> drivers/gpu/drm/i915/intel_opregion.c:1042:6: note: in expansion of macro
> 'IS_SKYLAKE'
>   if (IS_SKYLAKE(dev)) {
>       ^
> drivers/gpu/drm/i915/intel_opregion.c:1042:17: note: each undeclared
> identifier is reported only once for each function it appears in
>   if (IS_SKYLAKE(dev)) {
>                  ^
> drivers/gpu/drm/i915/i915_drv.h:2603:43: note: in definition of macro
> '__I915__'
>   if (__builtin_types_compatible_p(typeof(*p), struct drm_i915_private)) \
>                                            ^
> drivers/gpu/drm/i915/i915_drv.h:2670:26: note: in expansion of macro
> 'INTEL_INFO'
>  #define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake)
>                           ^
> drivers/gpu/drm/i915/intel_opregion.c:1042:6: note: in expansion of macro
> 'IS_SKYLAKE'
>   if (IS_SKYLAKE(dev)) {
>       ^
>
> Caused by commit
>
>   6f9f4b7a2cf7 ("drm/i915/opregion: Convert to using native
> drm_i915_private")
>
> interacting with commit
>
>   aeddda06c1a7 ("drm/i915: Ignore panel type from OpRegion on SKL")
>
> from the drm-intel-fixes tree.
>
> I applied this merge fix patch:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 15 Jul 2016 13:34:05 +1000
> Subject: [PATCH] drm/i915/opregion: fix up for argument change
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/i915/intel_opregion.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c
> b/drivers/gpu/drm/i915/intel_opregion.c
> index 21f19641e33e..dcdb346b596c 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -1039,7 +1039,7 @@ intel_opregion_get_panel_type(struct drm_i915_private
> *dev_priv)
>  	 * vswing instead. Low vswing results in some display flickers, so
>  	 * let's simply ignore the OpRegion panel type on SKL for now.
>  	 */
> -	if (IS_SKYLAKE(dev)) {
> +	if (IS_SKYLAKE(dev_priv)) {
>  		DRM_DEBUG_KMS("Ignoring OpRegion panel type (%d)\n", ret - 1);
>  		return -ENODEV;
>  	}
> --
> 2.8.1
>

I fell over the same issue when testing drm-intel-nightly and sent a patch.

- Sedat -

https://lists.freedesktop.org/archives/intel-gfx/2016-July/100691.html

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2016-07-15  3:40 Stephen Rothwell
  2016-07-15  4:32 ` Sedat Dilek
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2016-07-15  3:40 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, intel-gfx, dri-devel
  Cc: linux-next, linux-kernel, Ville Syrjälä, Chris Wilson

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from drivers/gpu/drm/i915/intel_opregion.c:34:0:
drivers/gpu/drm/i915/intel_opregion.c: In function 'intel_opregion_get_panel_type':
drivers/gpu/drm/i915/intel_opregion.c:1042:17: error: 'dev' undeclared (first use in this function)
  if (IS_SKYLAKE(dev)) {
                 ^
drivers/gpu/drm/i915/i915_drv.h:2603:43: note: in definition of macro '__I915__'
  if (__builtin_types_compatible_p(typeof(*p), struct drm_i915_private)) \
                                           ^
drivers/gpu/drm/i915/i915_drv.h:2670:26: note: in expansion of macro 'INTEL_INFO'
 #define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake)
                          ^
drivers/gpu/drm/i915/intel_opregion.c:1042:6: note: in expansion of macro 'IS_SKYLAKE'
  if (IS_SKYLAKE(dev)) {
      ^
drivers/gpu/drm/i915/intel_opregion.c:1042:17: note: each undeclared identifier is reported only once for each function it appears in
  if (IS_SKYLAKE(dev)) {
                 ^
drivers/gpu/drm/i915/i915_drv.h:2603:43: note: in definition of macro '__I915__'
  if (__builtin_types_compatible_p(typeof(*p), struct drm_i915_private)) \
                                           ^
drivers/gpu/drm/i915/i915_drv.h:2670:26: note: in expansion of macro 'INTEL_INFO'
 #define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake)
                          ^
drivers/gpu/drm/i915/intel_opregion.c:1042:6: note: in expansion of macro 'IS_SKYLAKE'
  if (IS_SKYLAKE(dev)) {
      ^

Caused by commit

  6f9f4b7a2cf7 ("drm/i915/opregion: Convert to using native drm_i915_private")

interacting with commit

  aeddda06c1a7 ("drm/i915: Ignore panel type from OpRegion on SKL")

from the drm-intel-fixes tree.

I applied this merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 15 Jul 2016 13:34:05 +1000
Subject: [PATCH] drm/i915/opregion: fix up for argument change

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

diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 21f19641e33e..dcdb346b596c 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -1039,7 +1039,7 @@ intel_opregion_get_panel_type(struct drm_i915_private *dev_priv)
 	 * vswing instead. Low vswing results in some display flickers, so
 	 * let's simply ignore the OpRegion panel type on SKL for now.
 	 */
-	if (IS_SKYLAKE(dev)) {
+	if (IS_SKYLAKE(dev_priv)) {
 		DRM_DEBUG_KMS("Ignoring OpRegion panel type (%d)\n", ret - 1);
 		return -ENODEV;
 	}
-- 
2.8.1

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2016-04-28  1:57 Stephen Rothwell
@ 2016-04-28  8:11 ` Jani Nikula
  0 siblings, 0 replies; 134+ messages in thread
From: Jani Nikula @ 2016-04-28  8:11 UTC (permalink / raw)
  To: Stephen Rothwell, Dave Airlie, Daniel Vetter, intel-gfx, dri-devel
  Cc: linux-next, linux-kernel, Mika Kahola

On Thu, 28 Apr 2016, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Dave,
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> drivers/gpu/drm/i915/intel_ddi.c: In function 'intel_prepare_ddi_buffer':
> drivers/gpu/drm/i915/intel_ddi.c:447:15: error: 'struct drm_i915_private' has no member named 'edp_low_vswing'
>    if (dev_priv->edp_low_vswing) {
>                ^
>
> Caused by commit
>
>   06411f08b3f3 ("drm/i915: move edp low vswing config to vbt data")
>
> interacting with commit
>
>   992e7a41f9fc ("drm/i915: Fix eDP low vswing for Broadwell")
>
> from the drm-intel-fixes tree.
>
> I applied the following merge fixup patch (which is suggested by the "v3:
> Change dev_priv->edp_low_vswing to use dev_priv->vbt.edp.low_vswing"
> comment in the drm-intel-fixes tree patch, but clearly could not be
> done there).
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 28 Apr 2016 11:53:36 +1000
> Subject: [PATCH] drm/i915: fix up for edp_low_vswing change
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

FWIW,

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 6080b5481984..e304857ba405 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -444,7 +444,7 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
>  		ddi_translations_fdi = bdw_ddi_translations_fdi;
>  		ddi_translations_dp = bdw_ddi_translations_dp;
>  
> -		if (dev_priv->edp_low_vswing) {
> +		if (dev_priv->vbt.edp.low_vswing) {
>  			ddi_translations_edp = bdw_ddi_translations_edp;
>  			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
>  		} else {
> -- 
> 2.7.0

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2016-04-28  1:57 Stephen Rothwell
  2016-04-28  8:11 ` Jani Nikula
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2016-04-28  1:57 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, intel-gfx, dri-devel
  Cc: linux-next, linux-kernel, Mika Kahola, Jani Nikula

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/i915/intel_ddi.c: In function 'intel_prepare_ddi_buffer':
drivers/gpu/drm/i915/intel_ddi.c:447:15: error: 'struct drm_i915_private' has no member named 'edp_low_vswing'
   if (dev_priv->edp_low_vswing) {
               ^

Caused by commit

  06411f08b3f3 ("drm/i915: move edp low vswing config to vbt data")

interacting with commit

  992e7a41f9fc ("drm/i915: Fix eDP low vswing for Broadwell")

from the drm-intel-fixes tree.

I applied the following merge fixup patch (which is suggested by the "v3:
Change dev_priv->edp_low_vswing to use dev_priv->vbt.edp.low_vswing"
comment in the drm-intel-fixes tree patch, but clearly could not be
done there).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 28 Apr 2016 11:53:36 +1000
Subject: [PATCH] drm/i915: fix up for edp_low_vswing change

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

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 6080b5481984..e304857ba405 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -444,7 +444,7 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
 		ddi_translations_fdi = bdw_ddi_translations_fdi;
 		ddi_translations_dp = bdw_ddi_translations_dp;
 
-		if (dev_priv->edp_low_vswing) {
+		if (dev_priv->vbt.edp.low_vswing) {
 			ddi_translations_edp = bdw_ddi_translations_edp;
 			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
 		} else {
-- 
2.7.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2016-03-17  4:41 Stephen Rothwell
@ 2016-03-17  8:41 ` Christian König
  0 siblings, 0 replies; 134+ messages in thread
From: Christian König @ 2016-03-17  8:41 UTC (permalink / raw)
  To: Stephen Rothwell, Dave Airlie; +Cc: linux-next, linux-kernel, Alex Deucher

Hi Stephen,

yeah, indeed the release_pages() function is now used in two more files.

Your fix is Reviewed-by: Christian König <christian.koenig@amd.com>.

Regards,
Christian.

Am 17.03.2016 um 05:41 schrieb Stephen Rothwell:
> Hi Dave,
>
> After merging the drm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c: In function 'amdgpu_gem_userptr_ioctl':
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c:321:2: error: implicit declaration of function 'release_pages' [-Werror=implicit-function-declaration]
>    release_pages(bo->tbo.ttm->pages, bo->tbo.ttm->num_pages, false);
>    ^
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c: In function 'amdgpu_cs_parser_bos':
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:410:5: error: implicit declaration of function 'release_pages' [-Werror=implicit-function-declaration]
>       release_pages(e->user_pages,
>       ^
>
> Caused by commit
>
>    2f568dbd6b94 ("drm/amdgpu: move get_user_pages out of amdgpu_ttm_tt_pin_userptr v6")
>
> Presumably a forgotten include file.
>
> I added this fix patch for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 17 Mar 2016 15:30:49 +1100
> Subject: [PATCH] drm/amdgpu: release_pages requires linux/pagemap.h
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c  | 1 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 +
>   2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 4f5ef4149e87..9392e50a7ba4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -25,6 +25,7 @@
>    *    Jerome Glisse <glisse@freedesktop.org>
>    */
>   #include <linux/list_sort.h>
> +#include <linux/pagemap.h>
>   #include <drm/drmP.h>
>   #include <drm/amdgpu_drm.h>
>   #include "amdgpu.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 1ecdf6c01368..0f2391ec1ed9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -26,6 +26,7 @@
>    *          Jerome Glisse
>    */
>   #include <linux/ktime.h>
> +#include <linux/pagemap.h>
>   #include <drm/drmP.h>
>   #include <drm/amdgpu_drm.h>
>   #include "amdgpu.h"

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2016-03-17  4:41 Stephen Rothwell
  2016-03-17  8:41 ` Christian König
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2016-03-17  4:41 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Christian König, Alex Deucher

Hi Dave,

After merging the drm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c: In function 'amdgpu_gem_userptr_ioctl':
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c:321:2: error: implicit declaration of function 'release_pages' [-Werror=implicit-function-declaration]
  release_pages(bo->tbo.ttm->pages, bo->tbo.ttm->num_pages, false);
  ^
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c: In function 'amdgpu_cs_parser_bos':
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:410:5: error: implicit declaration of function 'release_pages' [-Werror=implicit-function-declaration]
     release_pages(e->user_pages,
     ^

Caused by commit

  2f568dbd6b94 ("drm/amdgpu: move get_user_pages out of amdgpu_ttm_tt_pin_userptr v6")

Presumably a forgotten include file.

I added this fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 17 Mar 2016 15:30:49 +1100
Subject: [PATCH] drm/amdgpu: release_pages requires linux/pagemap.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c  | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 4f5ef4149e87..9392e50a7ba4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -25,6 +25,7 @@
  *    Jerome Glisse <glisse@freedesktop.org>
  */
 #include <linux/list_sort.h>
+#include <linux/pagemap.h>
 #include <drm/drmP.h>
 #include <drm/amdgpu_drm.h>
 #include "amdgpu.h"
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 1ecdf6c01368..0f2391ec1ed9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -26,6 +26,7 @@
  *          Jerome Glisse
  */
 #include <linux/ktime.h>
+#include <linux/pagemap.h>
 #include <drm/drmP.h>
 #include <drm/amdgpu_drm.h>
 #include "amdgpu.h"
-- 
2.7.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2016-02-22  0:45 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2016-02-22  0:45 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:818:6: error: redefinition of 'amdgpu_ttm_tt_affect_userptr'
 bool amdgpu_ttm_tt_affect_userptr(struct ttm_tt *ttm, unsigned long start,
      ^
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:799:6: note: previous definition of 'amdgpu_ttm_tt_affect_userptr' was here
 bool amdgpu_ttm_tt_affect_userptr(struct ttm_tt *ttm, unsigned long start,
      ^

Caused by a bad git resolution in commit

  971f3e7dd355 ("Merge remote-tracking branch 'drm/drm-next'")

I have added the following as a merge fix up patch and can carry it
as necessary.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 22 Feb 2016 11:40:08 +1100
Subject: [PATCH] drm: fix bad merge of drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index b3e90cd91496..9ccdd189d717 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -815,25 +815,6 @@ bool amdgpu_ttm_tt_affect_userptr(struct ttm_tt *ttm, unsigned long start,
 	return true;
 }
 
-bool amdgpu_ttm_tt_affect_userptr(struct ttm_tt *ttm, unsigned long start,
-				  unsigned long end)
-{
-	struct amdgpu_ttm_tt *gtt = (void *)ttm;
-	unsigned long size;
-
-	if (gtt == NULL)
-		return false;
-
-	if (gtt->ttm.ttm.state != tt_bound || !gtt->userptr)
-		return false;
-
-	size = (unsigned long)gtt->ttm.ttm.num_pages * PAGE_SIZE;
-	if (gtt->userptr > end || gtt->userptr + size <= start)
-		return false;
-
-	return true;
-}
-
 bool amdgpu_ttm_tt_is_readonly(struct ttm_tt *ttm)
 {
 	struct amdgpu_ttm_tt *gtt = (void *)ttm;
-- 
2.7.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* RE: linux-next: build failure after merge of the drm tree
  2016-01-12  4:35       ` Stephen Rothwell
@ 2016-01-12  7:48         ` Zhu, Rex
  0 siblings, 0 replies; 134+ messages in thread
From: Zhu, Rex @ 2016-01-12  7:48 UTC (permalink / raw)
  To: Stephen Rothwell, Dave Airlie
  Cc: linux-next, linux-kernel, Deucher, Alexander

Hi,

In my end, this declaration of function 'do_div'  can be founded.

In file included from ./arch/x86/include/asm/div64.h:63:0,
                 from include/linux/math64.h:5,
                 from ./arch/x86/include/asm/processor.h:30,
                 from ./arch/x86/include/asm/atomic.h:6,
                 from include/linux/atomic.h:4,
                 from include/linux/mutex.h:18,
                 from include/linux/seq_file.h:7,
                 from drivers/gpu/drm/amd/powerplay/inc/hwmgr.h:26,
                 from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.h:27,
                 from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c:24:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c: In function 'tonga_fan_ctrl_get_fan_speed_info'


So I will add  "#include <asm/div64.h>" to fix the warning.


Best Regards
Rex
-----Original Message-----
From: Stephen Rothwell [mailto:sfr@canb.auug.org.au] 
Sent: Tuesday, January 12, 2016 12:35 PM
To: Dave Airlie
Cc: linux-next@vger.kernel.org; linux-kernel@vger.kernel.org; Zhu, Rex; Deucher, Alexander
Subject: Re: linux-next: build failure after merge of the drm tree

Hi Dave,

[This time keeping cc's]

On Tue, 12 Jan 2016 00:31:17 +0000 (GMT) Dave Airlie <airlied@linux.ie> wrote:
>
> > 
> > Did this get fixed in some non-obvious way?
> >   
> 
> I don't think so, I just applied it as is.

/me refetches the drm tree

Ah, there it is! :-)

Thanks.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2016-01-12  0:31     ` Dave Airlie
@ 2016-01-12  4:35       ` Stephen Rothwell
  2016-01-12  7:48         ` Zhu, Rex
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2016-01-12  4:35 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Rex Zhu, Alex Deucher

Hi Dave,

[This time keeping cc's]

On Tue, 12 Jan 2016 00:31:17 +0000 (GMT) Dave Airlie <airlied@linux.ie> wrote:
>
> > 
> > Did this get fixed in some non-obvious way?
> >   
> 
> I don't think so, I just applied it as is.

/me refetches the drm tree

Ah, there it is! :-)

Thanks.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2016-01-11 22:54   ` Stephen Rothwell
@ 2016-01-12  0:31     ` Dave Airlie
  2016-01-12  4:35       ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Dave Airlie @ 2016-01-12  0:31 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Rex Zhu, Alex Deucher

> 
> Did this get fixed in some non-obvious way?
> 

I don't think so, I just applied it as is.

Thanks,
Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2016-01-07  2:44 ` Stephen Rothwell
@ 2016-01-11 22:54   ` Stephen Rothwell
  2016-01-12  0:31     ` Dave Airlie
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2016-01-11 22:54 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Rex Zhu, Alex Deucher

Hi Dave,

On Thu, 7 Jan 2016 13:44:03 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 31 Dec 2015 21:31:24 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the drm tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c: In function 'tonga_fan_ctrl_get_fan_speed_percent':
> > drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c:84:2: error: implicit declaration of function 'do_div' [-Werror=implicit-function-declaration]
> >   do_div(tmp64, duty100);
> >   ^
> > drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c: In function 'fiji_fan_ctrl_get_fan_speed_percent':
> > drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c:78:2: error: implicit declaration of function 'do_div' [-Werror=implicit-function-declaration]
> >   do_div(tmp64, duty100);
> >   ^
> > 
> > Caused by commit
> > 
> >   1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.")
> > 
> > [I notice that that commit does not have a Signed-off-by from its
> > committer (Alex)]
> > 
> > I applied the following fix patch for today:
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Thu, 31 Dec 2015 21:20:20 +1100
> > Subject: [PATCH] drm/amdgpu/powerplay: include asm/div64.h for do_div()
> > 
> > Fixes: 1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.")
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c  | 2 +-
> >  drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
> > index def57d0675ed..e76a7de9aa32 100644
> > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
> > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
> > @@ -20,7 +20,7 @@
> >   * OTHER DEALINGS IN THE SOFTWARE.
> >   *
> >   */
> > -
> > +#include <asm/div64.h>
> >  #include "fiji_thermal.h"
> >  #include "fiji_hwmgr.h"
> >  #include "fiji_smumgr.h"
> > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
> > index 2e159b003e71..a188174747c9 100644
> > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
> > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
> > @@ -20,7 +20,7 @@
> >   * OTHER DEALINGS IN THE SOFTWARE.
> >   *
> >   */
> > -
> > +#include <asm/div64.h>
> >  #include "tonga_thermal.h"
> >  #include "tonga_hwmgr.h"
> >  #include "tonga_smumgr.h"
> > -- 
> > 2.6.4  
> 
> Ping?  I am still applying that patch ...

Did this get fixed in some non-obvious way?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-12-31 10:31 Stephen Rothwell
@ 2016-01-07  2:44 ` Stephen Rothwell
  2016-01-11 22:54   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2016-01-07  2:44 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Rex Zhu, Alex Deucher

Hi all,

On Thu, 31 Dec 2015 21:31:24 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c: In function 'tonga_fan_ctrl_get_fan_speed_percent':
> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c:84:2: error: implicit declaration of function 'do_div' [-Werror=implicit-function-declaration]
>   do_div(tmp64, duty100);
>   ^
> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c: In function 'fiji_fan_ctrl_get_fan_speed_percent':
> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c:78:2: error: implicit declaration of function 'do_div' [-Werror=implicit-function-declaration]
>   do_div(tmp64, duty100);
>   ^
> 
> Caused by commit
> 
>   1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.")
> 
> [I notice that that commit does not have a Signed-off-by from its
> committer (Alex)]
> 
> I applied the following fix patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 31 Dec 2015 21:20:20 +1100
> Subject: [PATCH] drm/amdgpu/powerplay: include asm/div64.h for do_div()
> 
> Fixes: 1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.")
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c  | 2 +-
>  drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
> index def57d0675ed..e76a7de9aa32 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
> @@ -20,7 +20,7 @@
>   * OTHER DEALINGS IN THE SOFTWARE.
>   *
>   */
> -
> +#include <asm/div64.h>
>  #include "fiji_thermal.h"
>  #include "fiji_hwmgr.h"
>  #include "fiji_smumgr.h"
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
> index 2e159b003e71..a188174747c9 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
> @@ -20,7 +20,7 @@
>   * OTHER DEALINGS IN THE SOFTWARE.
>   *
>   */
> -
> +#include <asm/div64.h>
>  #include "tonga_thermal.h"
>  #include "tonga_hwmgr.h"
>  #include "tonga_smumgr.h"
> -- 
> 2.6.4

Ping?  I am still applying that patch ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2015-12-31 10:31 Stephen Rothwell
  2016-01-07  2:44 ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-12-31 10:31 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Rex Zhu, Alex Deucher

Hi Dave,

After merging the drm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c: In function 'tonga_fan_ctrl_get_fan_speed_percent':
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_thermal.c:84:2: error: implicit declaration of function 'do_div' [-Werror=implicit-function-declaration]
  do_div(tmp64, duty100);
  ^
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c: In function 'fiji_fan_ctrl_get_fan_speed_percent':
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c:78:2: error: implicit declaration of function 'do_div' [-Werror=implicit-function-declaration]
  do_div(tmp64, duty100);
  ^

Caused by commit

  1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.")

[I notice that that commit does not have a Signed-off-by from its
committer (Alex)]

I applied the following fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 31 Dec 2015 21:20:20 +1100
Subject: [PATCH] drm/amdgpu/powerplay: include asm/div64.h for do_div()

Fixes: 1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c  | 2 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
index def57d0675ed..e76a7de9aa32 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
@@ -20,7 +20,7 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
  */
-
+#include <asm/div64.h>
 #include "fiji_thermal.h"
 #include "fiji_hwmgr.h"
 #include "fiji_smumgr.h"
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
index 2e159b003e71..a188174747c9 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
@@ -20,7 +20,7 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
  */
-
+#include <asm/div64.h>
 #include "tonga_thermal.h"
 #include "tonga_hwmgr.h"
 #include "tonga_smumgr.h"
-- 
2.6.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-12-31  2:40 Stephen Rothwell
@ 2015-12-31  5:14 ` Mark yao
  0 siblings, 0 replies; 134+ messages in thread
From: Mark yao @ 2015-12-31  5:14 UTC (permalink / raw)
  To: Stephen Rothwell, Dave Airlie; +Cc: linux-next, linux-kernel

On 2015年12月31日 10:40, Stephen Rothwell wrote:
> Hi Dave,
>
> After merging the drm tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> ERROR: "vop_component_ops" [drivers/gpu/drm/rockchip/rockchip_vop_reg.ko] undefined!
>
> Caused by commit
>
>    a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c")
>
> I have added the following fix patch for today (just because its
> Christmas :-)):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 31 Dec 2015 13:35:27 +1100
> Subject: [PATCH] drm/rockchip: vop: export vop_component_ops to modules
>
> Fixes: a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c")
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index d83bf87ba71e..f5b3da2f92d7 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1395,3 +1395,4 @@ const struct component_ops vop_component_ops = {
>   	.bind = vop_bind,
>   	.unbind = vop_unbind,
>   };
> +EXPORT_SYMBOL_GPL(vop_component_ops);
Hi Stephen

Thanks for the fix, Sorry for forgetting test it with modules,  and

Acked-by: Mark Yao <mark.yao@rock-chips.com>

Hi Dave
    Can you pick this one?


Thanks.:-)

-- 
Mark Yao



^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2015-12-31  2:40 Stephen Rothwell
  2015-12-31  5:14 ` Mark yao
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-12-31  2:40 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Mark Yao

Hi Dave,

After merging the drm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

ERROR: "vop_component_ops" [drivers/gpu/drm/rockchip/rockchip_vop_reg.ko] undefined!

Caused by commit

  a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c")

I have added the following fix patch for today (just because its
Christmas :-)):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 31 Dec 2015 13:35:27 +1100
Subject: [PATCH] drm/rockchip: vop: export vop_component_ops to modules

Fixes: a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index d83bf87ba71e..f5b3da2f92d7 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1395,3 +1395,4 @@ const struct component_ops vop_component_ops = {
 	.bind = vop_bind,
 	.unbind = vop_unbind,
 };
+EXPORT_SYMBOL_GPL(vop_component_ops);
-- 
2.6.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-11-09 16:45 ` Guenter Roeck
@ 2015-11-10  4:55   ` Alexandre Courbot
  0 siblings, 0 replies; 134+ messages in thread
From: Alexandre Courbot @ 2015-11-10  4:55 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Stephen Rothwell, Dave Airlie, linux-next,
	Linux Kernel Mailing List, Alexandre Courbot, Ben Skeggs

On Tue, Nov 10, 2015 at 1:45 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> On Wed, Nov 04, 2015 at 08:22:26PM +1100, Stephen Rothwell wrote:
>> Hi Dave,
>>
>> After merging the drm tree, today's linux-next build (s390 allmodconfig)
>> failed like this:
>>
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:143:2: error: implicit declaration of function 'dma_to_phys' [-Werror=implicit-function-declaration]
>>
>> Caused by commit
>>
>>   69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
>>
>> Discovered after the release.
>>
> Still seen in next-20151109, affecting at least alpha, i386, parisc, s390,
> and xtensa, but probably other architectures as well.
>
> dma_to_phys() was until now not used from driver code, and is only declared
> for an architecture if it is used/needed there.

Mmm there doesn't seem to be a portable way of getting a physical
address from a DMA handle, which is what we are trying to do in this
code.

In that particular case a cast is enough though, so we should probably
just do that. I will send a patch for Ben/David to include in order to
fix this issue at least.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-11-04  9:22 Stephen Rothwell
@ 2015-11-09 16:45 ` Guenter Roeck
  2015-11-10  4:55   ` Alexandre Courbot
  0 siblings, 1 reply; 134+ messages in thread
From: Guenter Roeck @ 2015-11-09 16:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, linux-next, linux-kernel, Alexandre Courbot, Ben Skeggs

On Wed, Nov 04, 2015 at 08:22:26PM +1100, Stephen Rothwell wrote:
> Hi Dave,
> 
> After merging the drm tree, today's linux-next build (s390 allmodconfig)
> failed like this:
> 
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:143:2: error: implicit declaration of function 'dma_to_phys' [-Werror=implicit-function-declaration]
> 
> Caused by commit
> 
>   69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
> 
> Discovered after the release.
> 
Still seen in next-20151109, affecting at least alpha, i386, parisc, s390,
and xtensa, but probably other architectures as well.

dma_to_phys() was until now not used from driver code, and is only declared
for an architecture if it is used/needed there.

Also:

ERROR: "drm_gem_cma_create" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_mmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_get_sg_table" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_vm_ops" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_mmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_vunmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_import_sg_table" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_free_object" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_vmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_dumb_map_offset" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_create" [drivers/gpu/drm/drm_kms_helper.ko] undefined!
ERROR: "drm_gem_cma_describe" [drivers/gpu/drm/drm_kms_helper.ko] undefined!
ERROR: "drm_gem_cma_free_object" [drivers/gpu/drm/drm_kms_helper.ko] undefined!

seen with m68k:allmodconfig.

Guenter

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2015-11-04  9:22 Stephen Rothwell
  2015-11-09 16:45 ` Guenter Roeck
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-11-04  9:22 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Alexandre Courbot, Ben Skeggs

Hi Dave,

After merging the drm tree, today's linux-next build (s390 allmodconfig)
failed like this:

drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:143:2: error: implicit declaration of function 'dma_to_phys' [-Werror=implicit-function-declaration]

Caused by commit

  69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")

Discovered after the release.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2015-10-06  1:09 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2015-10-06  1:09 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Alex Deucher, Daniel Vetter

Hi Dave,

After merging the drm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/gpu/drm/drm_fb_helper.c: In function 'restore_fbdev_mode':
drivers/gpu/drm/drm_fb_helper.c:448:5: error: 'error' undeclared (first use in this function)
     error = true;
     ^

Caused by commit

  03f9abb28c3e ("drm: handle cursor_set2 in restore_fbdev_mode")

>From Linus' tree interacting with commit

  b7bdf0a87add ("drm/fb-helper: Use -errno return in restore_mode_unlocked")

from the drm tree.

I added the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Oct 2015 12:04:49 +1100
Subject: [PATCH] drm/fb-helper: merge fix for "Use -errno return in restore_mode_unlocked"

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

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 97d1a4633c5c..bd6d4ab27512 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -445,7 +445,7 @@ static int restore_fbdev_mode(struct drm_fb_helper *fb_helper)
 		if (crtc->funcs->cursor_set2) {
 			ret = crtc->funcs->cursor_set2(crtc, NULL, 0, 0, 0, 0, 0);
 			if (ret)
-				error = true;
+				return ret;
 		} else if (crtc->funcs->cursor_set) {
 			ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0);
 			if (ret)
-- 
2.5.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-06-09 14:02 ` Deucher, Alexander
@ 2015-06-10  0:28   ` Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2015-06-10  0:28 UTC (permalink / raw)
  To: Deucher, Alexander; +Cc: Dave Airlie, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2274 bytes --]

Hi Alex,

On Tue, 9 Jun 2015 14:02:21 +0000 "Deucher, Alexander" <Alexander.Deucher@amd.com> wrote:
>
> > -----Original Message-----
> > From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
> > Sent: Tuesday, June 09, 2015 9:43 AM
> > To: Dave Airlie
> > Cc: linux-next@vger.kernel.org; linux-kernel@vger.kernel.org; Deucher,
> > Alexander
> > Subject: linux-next: build failure after merge of the drm tree
> > 
> > Hi Dave,
> > 
> > After merging the drm tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c: In function
> > 'gfx_v7_0_cp_gfx_resume':
> > drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2879:9: error: 'BUF_SWAP_32BIT'
> > undeclared (first use in this function)
> >   tmp |= BUF_SWAP_32BIT;
> >          ^
> > drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2879:9: note: each undeclared
> > identifier is reported only once for each function it appears in
> > drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c: In function
> > 'gfx_v7_0_cp_compute_resume':
> > drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3398:41: error:
> > 'BUF_SWAP_32BIT' undeclared (first use in this function)
> >    mqd->queue_state.cp_hqd_pq_control |= BUF_SWAP_32BIT;
> >                                          ^
> > drivers/gpu/drm/amd/amdgpu/cik_sdma.c: In function
> > 'cik_sdma_gfx_resume':
> > drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:14: error:
> > 'SDMA_RB_SWAP_ENABLE' undeclared (first use in this function)
> >    rb_cntl |= SDMA_RB_SWAP_ENABLE |
> > SDMA_RPTR_WRITEBACK_SWAP_ENABLE;
> >               ^
> > drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:14: note: each undeclared
> > identifier is reported only once for each function it appears in
> > drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:36: error:
> > 'SDMA_RPTR_WRITEBACK_SWAP_ENABLE' undeclared (first use in this
> > function)
> >    rb_cntl |= SDMA_RB_SWAP_ENABLE |
> > SDMA_RPTR_WRITEBACK_SWAP_ENABLE;
> >                                     ^
> > 
> > Caused by commit a2e73f56fa62 ("drm/amdgpu: Add support for CIK parts").
> > 
> 
> Should be fixed with this patch.  Sorry for the breakage.

I will apply this as a fix to the drm tree merge today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* RE: linux-next: build failure after merge of the drm tree
  2015-06-09 13:42 Stephen Rothwell
@ 2015-06-09 14:02 ` Deucher, Alexander
  2015-06-10  0:28   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Deucher, Alexander @ 2015-06-09 14:02 UTC (permalink / raw)
  To: Stephen Rothwell, Dave Airlie; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2884 bytes --]

> -----Original Message-----
> From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
> Sent: Tuesday, June 09, 2015 9:43 AM
> To: Dave Airlie
> Cc: linux-next@vger.kernel.org; linux-kernel@vger.kernel.org; Deucher,
> Alexander
> Subject: linux-next: build failure after merge of the drm tree
> 
> Hi Dave,
> 
> After merging the drm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c: In function
> 'gfx_v7_0_cp_gfx_resume':
> drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2879:9: error: 'BUF_SWAP_32BIT'
> undeclared (first use in this function)
>   tmp |= BUF_SWAP_32BIT;
>          ^
> drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2879:9: note: each undeclared
> identifier is reported only once for each function it appears in
> drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c: In function
> 'gfx_v7_0_cp_compute_resume':
> drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3398:41: error:
> 'BUF_SWAP_32BIT' undeclared (first use in this function)
>    mqd->queue_state.cp_hqd_pq_control |= BUF_SWAP_32BIT;
>                                          ^
> drivers/gpu/drm/amd/amdgpu/cik_sdma.c: In function
> 'cik_sdma_gfx_resume':
> drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:14: error:
> 'SDMA_RB_SWAP_ENABLE' undeclared (first use in this function)
>    rb_cntl |= SDMA_RB_SWAP_ENABLE |
> SDMA_RPTR_WRITEBACK_SWAP_ENABLE;
>               ^
> drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:14: note: each undeclared
> identifier is reported only once for each function it appears in
> drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:36: error:
> 'SDMA_RPTR_WRITEBACK_SWAP_ENABLE' undeclared (first use in this
> function)
>    rb_cntl |= SDMA_RB_SWAP_ENABLE |
> SDMA_RPTR_WRITEBACK_SWAP_ENABLE;
>                                     ^
> 
> Caused by commit a2e73f56fa62 ("drm/amdgpu: Add support for CIK parts").
> 

Should be fixed with this patch.  Sorry for the breakage.

Alex


> I added the following patch to disable this code for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 9 Jun 2015 23:38:30 +1000
> Subject: [PATCH] drm/amdgpu: disable CIK parts for now
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/amd/amdgpu/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig
> b/drivers/gpu/drm/amd/amdgpu/Kconfig
> index b30fcfa4b1f2..8da6bf7f39c8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Kconfig
> +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig
> @@ -1,6 +1,7 @@
>  config DRM_AMDGPU_CIK
>  	bool "Enable amdgpu support for CIK parts"
>  	depends on DRM_AMDGPU
> +	depends on BROKEN
>  	help
>  	  Choose this option if you want to enable experimental support
>  	  for CIK asics.
> --
> 2.1.4
> 
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: 0001-drm-amdgpu-fix-the-build-on-big-endian.patch --]
[-- Type: application/octet-stream, Size: 2165 bytes --]

From 35d029a20fe1312309fd01cb78e565657fa21e5f Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Tue, 9 Jun 2015 09:58:23 -0400
Subject: [PATCH] drm/amdgpu: fix the build on big endian

Some leftover copy and pastes from radeon that never
got updated.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index fb93163..ab83cc1 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -411,7 +411,8 @@ static int cik_sdma_gfx_resume(struct amdgpu_device *adev)
 		rb_bufsz = order_base_2(ring->ring_size / 4);
 		rb_cntl = rb_bufsz << 1;
 #ifdef __BIG_ENDIAN
-		rb_cntl |= SDMA_RB_SWAP_ENABLE | SDMA_RPTR_WRITEBACK_SWAP_ENABLE;
+		rb_cntl |= SDMA0_GFX_RB_CNTL__RB_SWAP_ENABLE_MASK |
+			SDMA0_GFX_RB_CNTL__RPTR_WRITEBACK_SWAP_ENABLE_MASK;
 #endif
 		WREG32(mmSDMA0_GFX_RB_CNTL + sdma_offsets[i], rb_cntl);
 
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index afa703c..cb790744 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -2881,7 +2881,7 @@ static int gfx_v7_0_cp_gfx_resume(struct amdgpu_device *adev)
 	rb_bufsz = order_base_2(ring->ring_size / 8);
 	tmp = (order_base_2(AMDGPU_GPU_PAGE_SIZE/8) << 8) | rb_bufsz;
 #ifdef __BIG_ENDIAN
-	tmp |= BUF_SWAP_32BIT;
+	tmp |= 2 << CP_RB0_CNTL__BUF_SWAP__SHIFT;
 #endif
 	WREG32(mmCP_RB0_CNTL, tmp);
 
@@ -3400,7 +3400,8 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
 		mqd->queue_state.cp_hqd_pq_control |=
 			(order_base_2(AMDGPU_GPU_PAGE_SIZE/8) << 8);
 #ifdef __BIG_ENDIAN
-		mqd->queue_state.cp_hqd_pq_control |= BUF_SWAP_32BIT;
+		mqd->queue_state.cp_hqd_pq_control |=
+			2 << CP_HQD_PQ_CONTROL__ENDIAN_SWAP__SHIFT;
 #endif
 		mqd->queue_state.cp_hqd_pq_control &=
 			~(CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK |
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2015-06-09 13:42 Stephen Rothwell
  2015-06-09 14:02 ` Deucher, Alexander
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-06-09 13:42 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 2364 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c: In function 'gfx_v7_0_cp_gfx_resume':
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2879:9: error: 'BUF_SWAP_32BIT' undeclared (first use in this function)
  tmp |= BUF_SWAP_32BIT;
         ^
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2879:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c: In function 'gfx_v7_0_cp_compute_resume':
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3398:41: error: 'BUF_SWAP_32BIT' undeclared (first use in this function)
   mqd->queue_state.cp_hqd_pq_control |= BUF_SWAP_32BIT;
                                         ^
drivers/gpu/drm/amd/amdgpu/cik_sdma.c: In function 'cik_sdma_gfx_resume':
drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:14: error: 'SDMA_RB_SWAP_ENABLE' undeclared (first use in this function)
   rb_cntl |= SDMA_RB_SWAP_ENABLE | SDMA_RPTR_WRITEBACK_SWAP_ENABLE;
              ^
drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:14: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/amd/amdgpu/cik_sdma.c:413:36: error: 'SDMA_RPTR_WRITEBACK_SWAP_ENABLE' undeclared (first use in this function)
   rb_cntl |= SDMA_RB_SWAP_ENABLE | SDMA_RPTR_WRITEBACK_SWAP_ENABLE;
                                    ^

Caused by commit a2e73f56fa62 ("drm/amdgpu: Add support for CIK parts").

I added the following patch to disable this code for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 9 Jun 2015 23:38:30 +1000
Subject: [PATCH] drm/amdgpu: disable CIK parts for now

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/amdgpu/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig
index b30fcfa4b1f2..8da6bf7f39c8 100644
--- a/drivers/gpu/drm/amd/amdgpu/Kconfig
+++ b/drivers/gpu/drm/amd/amdgpu/Kconfig
@@ -1,6 +1,7 @@
 config DRM_AMDGPU_CIK
 	bool "Enable amdgpu support for CIK parts"
 	depends on DRM_AMDGPU
+	depends on BROKEN
 	help
 	  Choose this option if you want to enable experimental support
 	  for CIK asics.
-- 
2.1.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-05-20  6:01       ` Oded Gabbay
@ 2015-05-20  6:08         ` Dave Airlie
  0 siblings, 0 replies; 134+ messages in thread
From: Dave Airlie @ 2015-05-20  6:08 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: Stephen Rothwell, linux-next, Linux-Kernel@Vger. Kernel. Org,
	Alex Deucher


> >> > drm-next and fix it up there.
> >>
> >> Yep, against commit 79b066bd76d5 ("drm/amdkfd: Initialize sdma vm when
> >> creating sdma queue") which is in v4.1-rc3.
> >
> > So you could, of course, just merge that commit instead of Linus'
> > tree ...
> >
> > --
> > Cheers,
> > Stephen Rothwell                    sfr@canb.auug.org.au
> 
> Hi,
> Did I need to do something different in order to prevent this conflict ?
> Do some manual merge before sending the pull request ?
> 

Well this sort of thing is why linux-next exists, you can pull Linus's 
tree into yours to see if it builds before pulling, but you can find 
yourself fixing conflicts in other parts of the drm stack then.

I'll pull v4.1-rc4 tag in as a nicer merge point that misc Linus master.

Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-05-20  5:31     ` Stephen Rothwell
@ 2015-05-20  6:01       ` Oded Gabbay
  2015-05-20  6:08         ` Dave Airlie
  0 siblings, 1 reply; 134+ messages in thread
From: Oded Gabbay @ 2015-05-20  6:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, linux-next, Linux-Kernel@Vger. Kernel. Org, Alex Deucher

On Wed, May 20, 2015 at 8:31 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Dave,
>
> On Wed, 20 May 2015 15:25:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> On Wed, 20 May 2015 05:41:46 +0100 (IST) Dave Airlie <airlied@linux.ie> wrote:
>> >
>> > > After merging the drm tree, today's linux-next build (powerpc
>> > > ppc64_defconfig) failed like this:
>> > >
>> > > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: In function 'create_queue_cpsch':
>> > > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:888:2: error: implicit declaration of function 'init_sdma_vm' [-Werror=implicit-function-declaration]
>> > >   init_sdma_vm(dqm, q, qpd);
>> > >   ^
>> > >
>> > > Caused by commit 3e3f6e1a90a8 ("drm/amdkfd: make the sdma vm init to be
>> > > asic specific").
>> > >
>> > > I have used the drm tree from next-20150519 for today.
>> >
>> > Okay this looks like a silent conflict, I'll have to pull Linus tree into
>> > drm-next and fix it up there.
>>
>> Yep, against commit 79b066bd76d5 ("drm/amdkfd: Initialize sdma vm when
>> creating sdma queue") which is in v4.1-rc3.
>
> So you could, of course, just merge that commit instead of Linus'
> tree ...
>
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au

Hi,
Did I need to do something different in order to prevent this conflict ?
Do some manual merge before sending the pull request ?

Thanks,
          Oded

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-05-20  5:25   ` Stephen Rothwell
@ 2015-05-20  5:31     ` Stephen Rothwell
  2015-05-20  6:01       ` Oded Gabbay
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-05-20  5:31 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Oded Gabbay, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

Hi Dave,

On Wed, 20 May 2015 15:25:38 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Wed, 20 May 2015 05:41:46 +0100 (IST) Dave Airlie <airlied@linux.ie> wrote:
> >
> > > After merging the drm tree, today's linux-next build (powerpc
> > > ppc64_defconfig) failed like this:
> > > 
> > > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: In function 'create_queue_cpsch':
> > > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:888:2: error: implicit declaration of function 'init_sdma_vm' [-Werror=implicit-function-declaration]
> > >   init_sdma_vm(dqm, q, qpd);
> > >   ^
> > > 
> > > Caused by commit 3e3f6e1a90a8 ("drm/amdkfd: make the sdma vm init to be
> > > asic specific").
> > > 
> > > I have used the drm tree from next-20150519 for today.
> > 
> > Okay this looks like a silent conflict, I'll have to pull Linus tree into
> > drm-next and fix it up there.
> 
> Yep, against commit 79b066bd76d5 ("drm/amdkfd: Initialize sdma vm when
> creating sdma queue") which is in v4.1-rc3.

So you could, of course, just merge that commit instead of Linus'
tree ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-05-20  4:41 ` Dave Airlie
@ 2015-05-20  5:25   ` Stephen Rothwell
  2015-05-20  5:31     ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-05-20  5:25 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Oded Gabbay, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

Hi Dave,

On Wed, 20 May 2015 05:41:46 +0100 (IST) Dave Airlie <airlied@linux.ie> wrote:
>
> > After merging the drm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: In function 'create_queue_cpsch':
> > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:888:2: error: implicit declaration of function 'init_sdma_vm' [-Werror=implicit-function-declaration]
> >   init_sdma_vm(dqm, q, qpd);
> >   ^
> > 
> > Caused by commit 3e3f6e1a90a8 ("drm/amdkfd: make the sdma vm init to be
> > asic specific").
> > 
> > I have used the drm tree from next-20150519 for today.
> 
> Okay this looks like a silent conflict, I'll have to pull Linus tree into
> drm-next and fix it up there.

Yep, against commit 79b066bd76d5 ("drm/amdkfd: Initialize sdma vm when
creating sdma queue") which is in v4.1-rc3.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-05-20  3:08 Stephen Rothwell
@ 2015-05-20  4:41 ` Dave Airlie
  2015-05-20  5:25   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Dave Airlie @ 2015-05-20  4:41 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Oded Gabbay, Alex Deucher


> Hi Dave,
> 
> After merging the drm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: In function 'create_queue_cpsch':
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:888:2: error: implicit declaration of function 'init_sdma_vm' [-Werror=implicit-function-declaration]
>   init_sdma_vm(dqm, q, qpd);
>   ^
> 
> Caused by commit 3e3f6e1a90a8 ("drm/amdkfd: make the sdma vm init to be
> asic specific").
> 
> I have used the drm tree from next-20150519 for today.

Okay this looks like a silent conflict, I'll have to pull Linus tree into
drm-next and fix it up there.

Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2015-05-20  3:08 Stephen Rothwell
  2015-05-20  4:41 ` Dave Airlie
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-05-20  3:08 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Oded Gabbay, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: In function 'create_queue_cpsch':
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:888:2: error: implicit declaration of function 'init_sdma_vm' [-Werror=implicit-function-declaration]
  init_sdma_vm(dqm, q, qpd);
  ^

Caused by commit 3e3f6e1a90a8 ("drm/amdkfd: make the sdma vm init to be
asic specific").

I have used the drm tree from next-20150519 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-01-29  8:21 ` Oded Gabbay
@ 2015-01-29  9:35   ` Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2015-01-29  9:35 UTC (permalink / raw)
  To: Oded Gabbay; +Cc: Dave Airlie, linux-next, linux-kernel, Ben Goz

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Hi Oded,

On Thu, 29 Jan 2015 10:21:04 +0200 Oded Gabbay <oded.gabbay@amd.com> wrote:
>
> So I think that Dave's drm-next now contains the correct code.
> Will you merge it again, or do you do it daily anyway ? I fear I'm entirely 
> clear with the details of the linux-next process.

I fetch all the trees again each morning and then merge them, so
tomorrow all will be well.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2015-01-29  2:38 Stephen Rothwell
@ 2015-01-29  8:21 ` Oded Gabbay
  2015-01-29  9:35   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Oded Gabbay @ 2015-01-29  8:21 UTC (permalink / raw)
  To: Stephen Rothwell, Dave Airlie; +Cc: linux-next, linux-kernel, Ben Goz



On 01/29/2015 04:38 AM, Stephen Rothwell wrote:
> After merging the drm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/gpu/drm/amd/amdkfd/kfd_device.c: In function 'kgd2kfd_device_init':
> drivers/gpu/drm/amd/amdkfd/kfd_device.c:193:11: error: 'max_num_of_processes' undeclared (first use in this function)
>    size += (max_num_of_processes * sizeof(struct pm4_map_process) +
>             ^
> drivers/gpu/drm/amd/amdkfd/kfd_device.c:193:11: note: each undeclared identifier is reported only once for each function it appears in
> drivers/gpu/drm/amd/amdkfd/kfd_device.c:194:26: error: 'max_num_of_queues_per_process' undeclared (first use in this function)
>     max_num_of_processes * max_num_of_queues_per_process *
>                            ^
So I think that Dave's drm-next now contains the correct code.
Will you merge it again, or do you do it daily anyway ? I fear I'm entirely 
clear with the details of the linux-next process.

	Oded

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2015-01-29  2:38 Stephen Rothwell
  2015-01-29  8:21 ` Oded Gabbay
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2015-01-29  2:38 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Oded Gabbay, Ben Goz

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/gpu/drm/amd/amdkfd/kfd_device.c: In function 'kgd2kfd_device_init':
drivers/gpu/drm/amd/amdkfd/kfd_device.c:193:11: error: 'max_num_of_processes' undeclared (first use in this function)
  size += (max_num_of_processes * sizeof(struct pm4_map_process) +
           ^
drivers/gpu/drm/amd/amdkfd/kfd_device.c:193:11: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/amd/amdkfd/kfd_device.c:194:26: error: 'max_num_of_queues_per_process' undeclared (first use in this function)
   max_num_of_processes * max_num_of_queues_per_process *
                          ^

Caused by commit b8cbab042cd6 ("drm/amdkfd: Allow user to limit only
queues per device") from Linus' tree interacting with commit
e18e794e6ba0 ("drm/amdkfd: Fixed calculation of gart buffer size") from
the drm tree.

I couldn't easily figure out how to fix this, so I just disabled the
driver using the patch below.  Please let me know when it is fixed, or
provide me with a merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Jan 2015 13:34:22 +1100
Subject: [PATCH] drm/amdkfd: disable driver due to interaction with a bug fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
index 8dfac37ff327..e96b4d6e3567 100644
--- a/drivers/gpu/drm/amd/amdkfd/Kconfig
+++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
@@ -5,5 +5,6 @@
 config HSA_AMD
 	tristate "HSA kernel driver for AMD GPU devices"
 	depends on DRM_RADEON && AMD_IOMMU_V2 && X86_64
+	depends on BROKEN
 	help
 	  Enable this if you want to use HSA features on AMD GPU devices.
-- 
2.1.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2014-09-08  4:26 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2014-09-08  4:26 UTC (permalink / raw)
  To: Dave Airlie
  Cc: linux-next, linux-kernel, Paulo Zanoni, Jani Nikula,
	Ville Syrjälä,
	Daniel Vetter

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/i915/intel_display.c: In function 'intel_crtc_cursor_set_obj':
drivers/gpu/drm/i915/intel_display.c:8302:24: error: 'dev_priv' undeclared (first use in this function)
   intel_runtime_pm_get(dev_priv);
                        ^

Caused by commit d7ce484eeec4 ("drm/i915: Move CURSIZE setup to
i845_update_cursor()") interacting with commit d6dd6843ff4a ("drm/i915:
fix plane/cursor handling when runtime suspended") from Linus' tree.

I am not sure why this hasn't failed before as both commits have been
in linux-next since (at least) Sept 3.

I have applied this merge fix patch (which reverts part of d7ce484eeec4):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 8 Sep 2014 14:17:21 +1000
Subject: [PATCH] drm/i915: fix up for recent merge

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

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a1acf8376c0f..18da8349a070 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8253,6 +8253,7 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
 				     uint32_t width, uint32_t height)
 {
 	struct drm_device *dev = crtc->dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	enum pipe pipe = intel_crtc->pipe;
 	unsigned old_width, stride;
-- 
2.1.0

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2014-06-05  4:12 Stephen Rothwell
@ 2014-06-05  4:28 ` Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2014-06-05  4:28 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Dave Airlie, linux-next, linux-kernel, Chris Wilson, Jani Nikula

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Hi Daniel,

On Thu, 5 Jun 2014 14:12:27 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/gpu/drm/i915/intel_fbdev.c: In function 'intel_fb_initial_config':
> drivers/gpu/drm/i915/intel_fbdev.c:392:4: error: implicit declaration of function 'drm_get_connector_name' [-Werror=implicit-function-declaration]
>     DRM_DEBUG_KMS("using first mode listed on connector %s\n",
>     ^
> 
> Caused by commits c0c97622c1bd ("drm/i915: Use the connector name in
> fbdev debug messages") and c23cc4178dd1 ("drm/i915: replace
> drm_get_connector_name() with direct name field use").
> 
> I have used the drm tree from next-20140604 for today.

This affected the drm-intel tree as well, so it is back to
next-20140604.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2014-06-05  4:12 Stephen Rothwell
  2014-06-05  4:28 ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2014-06-05  4:12 UTC (permalink / raw)
  To: Dave Airlie
  Cc: linux-next, linux-kernel, Chris Wilson, Daniel Vetter, Jani Nikula

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/gpu/drm/i915/intel_fbdev.c: In function 'intel_fb_initial_config':
drivers/gpu/drm/i915/intel_fbdev.c:392:4: error: implicit declaration of function 'drm_get_connector_name' [-Werror=implicit-function-declaration]
    DRM_DEBUG_KMS("using first mode listed on connector %s\n",
    ^

Caused by commits c0c97622c1bd ("drm/i915: Use the connector name in
fbdev debug messages") and c23cc4178dd1 ("drm/i915: replace
drm_get_connector_name() with direct name field use").

I have used the drm tree from next-20140604 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2012-09-24 11:31 ` Daniel Vetter
@ 2012-09-24 11:58   ` Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2012-09-24 11:58 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Dave Airlie, linux-next, linux-kernel, Daniel Vetter, Wang Xingchao

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

Hi Daniel,

On Mon, 24 Sep 2012 13:31:54 +0200 Daniel Vetter <daniel@ffwll.ch> wrote:
>
> Looks good. I've known about this issue and tried to improve matters by
> applying the patch to both trees (to at least force a conflict), but not
> even with that patch applied in my drm-intel-next queue I get a proper
> conflict. I guess I need to do a proper backmerge.
> 
> Fixup patch looks good for now.

If that is all that is needed, just make sure Linus is informed of the
merge conflict fix when he merged the drm tree.  If there is more, it is
up to you and Dave.  If you do a back merge, make sure that it is
properly commented.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2012-09-24  3:18 Stephen Rothwell
@ 2012-09-24 11:31 ` Daniel Vetter
  2012-09-24 11:58   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Daniel Vetter @ 2012-09-24 11:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, linux-next, linux-kernel, Daniel Vetter, Wang Xingchao

On Mon, Sep 24, 2012 at 01:18:34PM +1000, Stephen Rothwell wrote:
> Hi Dave,
> 
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> drivers/gpu/drm/i915/intel_hdmi.c: In function 'intel_enable_hdmi':
> drivers/gpu/drm/i915/intel_hdmi.c:633:31: error: 'mode' undeclared (first use in this function)
> 
> Caused by commit b98b60167279 ("drm/i915: HDMI - Clear Audio Enable bit
> for Hot Plug") from Linus' tree interacting with commit 5ab432ef4997
> ("drm/i915/hdmi: convert to encoder->disable/enable") from the drm tree.
> 
> I added the following merge fix patch (which may be wrong, of course):
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 24 Sep 2012 13:14:40 +1000
> Subject: [PATCH] drm/i915: HDMI: update for API change
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Looks good. I've known about this issue and tried to improve matters by
applying the patch to both trees (to at least force a conflict), but not
even with that patch applied in my drm-intel-next queue I get a proper
conflict. I guess I need to do a proper backmerge.

Fixup patch looks good for now.

Thanks, Daniel

> ---
>  drivers/gpu/drm/i915/intel_hdmi.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 2ec9c76..d39ed58 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -630,7 +630,7 @@ static void intel_enable_hdmi(struct intel_encoder *encoder)
>  	u32 temp;
>  	u32 enable_bits = SDVO_ENABLE;
>  
> -	if (intel_hdmi->has_audio || mode != DRM_MODE_DPMS_ON)
> +	if (intel_hdmi->has_audio)
>  		enable_bits |= SDVO_AUDIO_ENABLE;
>  
>  	temp = I915_READ(intel_hdmi->sdvox_reg);
> @@ -676,8 +676,7 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
>  	u32 temp;
>  	u32 enable_bits = SDVO_ENABLE;
>  
> -	if (intel_hdmi->has_audio)
> -		enable_bits |= SDVO_AUDIO_ENABLE;
> +	enable_bits |= SDVO_AUDIO_ENABLE;
>  
>  	temp = I915_READ(intel_hdmi->sdvox_reg);
>  
> -- 
> 1.7.10.280.gaa39
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2012-09-24  3:18 Stephen Rothwell
  2012-09-24 11:31 ` Daniel Vetter
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2012-09-24  3:18 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Daniel Vetter, Wang Xingchao

[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/i915/intel_hdmi.c: In function 'intel_enable_hdmi':
drivers/gpu/drm/i915/intel_hdmi.c:633:31: error: 'mode' undeclared (first use in this function)

Caused by commit b98b60167279 ("drm/i915: HDMI - Clear Audio Enable bit
for Hot Plug") from Linus' tree interacting with commit 5ab432ef4997
("drm/i915/hdmi: convert to encoder->disable/enable") from the drm tree.

I added the following merge fix patch (which may be wrong, of course):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 24 Sep 2012 13:14:40 +1000
Subject: [PATCH] drm/i915: HDMI: update for API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/intel_hdmi.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 2ec9c76..d39ed58 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -630,7 +630,7 @@ static void intel_enable_hdmi(struct intel_encoder *encoder)
 	u32 temp;
 	u32 enable_bits = SDVO_ENABLE;
 
-	if (intel_hdmi->has_audio || mode != DRM_MODE_DPMS_ON)
+	if (intel_hdmi->has_audio)
 		enable_bits |= SDVO_AUDIO_ENABLE;
 
 	temp = I915_READ(intel_hdmi->sdvox_reg);
@@ -676,8 +676,7 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
 	u32 temp;
 	u32 enable_bits = SDVO_ENABLE;
 
-	if (intel_hdmi->has_audio)
-		enable_bits |= SDVO_AUDIO_ENABLE;
+	enable_bits |= SDVO_AUDIO_ENABLE;
 
 	temp = I915_READ(intel_hdmi->sdvox_reg);
 
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2012-08-24  3:49 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2012-08-24  3:49 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Alan Cox

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/gma500/cdv_intel_display.c: In function 'cdv_intel_crtc_mode_set':
drivers/gpu/drm/gma500/cdv_intel_display.c:1129:3: error: implicit declaration of function 'cdv_intel_dp_set_m_n' [-Werror=implicit-function-declaration]

Introducd by commit 220801bdb53c ("gma500/cdv: add the bits that don't
need the new code") and exposed by commit f76c0dde78fb ("gma500/cdv: Fix
call to cdv_intel_dp_set_m_n").

I have used the drm tree form next-20120823 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2012-05-17  3:47 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2012-05-17  3:47 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Matthew Garrett, H. Peter Anvin

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

arch/x86/pci/fixup.c: In function 'pci_fixup_video':
arch/x86/pci/fixup.c:352:3: error: implicit declaration of function 'vga_default_device' [-Werror=implicit-function-declaration]
arch/x86/pci/fixup.c:353:4: error: implicit declaration of function 'vga_set_default_device' [-Werror=implicit-function-declaration]

Caused by commit 6cf20beec4b9 ("x86/vga: set the default device from the
fixup").

I have used the drm tree from next-20120516 for today.

If it is relevant, I merged the drm tree before the sound tree today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2012-04-30  3:22 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2012-04-30  3:22 UTC (permalink / raw)
  To: Dave Airlie
  Cc: linux-next, linux-kernel, Adam Jackson, Alex Deucher, Chris Wilson

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/drm_edid_load.c: In function 'edid_load':
drivers/gpu/drm/drm_edid_load.c:176:2: error: too few arguments to function 'drm_edid_block_valid'
include/drm/drm_crtc.h:1015:13: note: declared here
drivers/gpu/drm/drm_edid_load.c:188:3: error: too few arguments to function 'drm_edid_block_valid'

Caused by commit f89ec8a456dd ("drm/edid: Try harder to fix up base EDID
blocks"). drivers/gpu/drm/drm_edid_load.c was added before v3.4-rc1 ...
grep is your friend.

I have used the drm tree from next-20120427 for today.

-- 
Stephen Rothwell <sfr@canb.auug.org.au>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2012-04-23  3:42 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2012-04-23  3:42 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Matthew Garrett

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

ERROR: "vga_default_device" [arch/x86/video/fbdev.ko] undefined!

Caused by commit 49c33b97c5f4 ("x86: Use vga_default_device() when
determining whether an fb is primary").

I have used the drm tree from next-20120420 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2012-03-16  2:53 Stephen Rothwell
@ 2012-03-19  2:45 ` Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2012-03-19  2:45 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Hi Dave,

On Fri, 16 Mar 2012 13:53:03 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> ERROR: "drm_usb_init" [drivers/gpu/drm/udl/udl.ko] undefined!
> ERROR: "drm_get_usb_dev" [drivers/gpu/drm/udl/udl.ko] undefined!
> ERROR: "drm_usb_exit" [drivers/gpu/drm/udl/udl.ko] undefined!
> 
> Caused by commit 5320918b9a87 ("drm/udl: initial UDL driver (v4)").
> 
> I have used the drm tree from next-20120315 for today.

Your attempted fix (commit 2de6d4a9e46c "drm: fix build with UDL if USB
is a module") hasn't worked as I still get the same errors ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2012-03-16  2:53 Stephen Rothwell
  2012-03-19  2:45 ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2012-03-16  2:53 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

ERROR: "drm_usb_init" [drivers/gpu/drm/udl/udl.ko] undefined!
ERROR: "drm_get_usb_dev" [drivers/gpu/drm/udl/udl.ko] undefined!
ERROR: "drm_usb_exit" [drivers/gpu/drm/udl/udl.ko] undefined!

Caused by commit 5320918b9a87 ("drm/udl: initial UDL driver (v4)").

I have used the drm tree from next-20120315 for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

P.S. on the bright side, I didn't get any conflicts in the merge ...

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28 13:53               ` Stephen Rothwell
  2011-11-28 14:05                 ` Dave Airlie
@ 2011-11-28 14:08                 ` Alan Cox
  1 sibling, 0 replies; 134+ messages in thread
From: Alan Cox @ 2011-11-28 14:08 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

> Which I assumed was aimed at Dave.  Then Jesse (whose changes broke the
> code in staging) responded with a patch which I assumed that Dave would
> do something with.  Then the next day you responded with:

Dave did include Jesse's patch to gma500 in his DRM branch - that wasn't
complete but I assumed it was which confused me. Fixes just went to Dave. 

> > If the staging gma500 is causing this still please resolve it by marking
> > the GMA500 in staging "&& BROKEN" for the moment.
> 
> And maybe I should have done something then.  I fall back on the excuse
> that I have about 200 trees to merge every day and when I use to fix
> things for people I used to have lots of 12-16 hour days ...

Fair enough - can't argue with that.

> In the future, I will try to remember to "kill staging first", but this
> is the first time it has come up since staging started being built by an
> allmodconfig build (which it used not to be - and that change was not my
> choice)

Ok.

Alan

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28 13:53               ` Stephen Rothwell
@ 2011-11-28 14:05                 ` Dave Airlie
  2011-11-28 14:08                 ` Alan Cox
  1 sibling, 0 replies; 134+ messages in thread
From: Dave Airlie @ 2011-11-28 14:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Alan Cox, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

On Mon, Nov 28, 2011 at 1:53 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Alan,
>
> On Mon, 28 Nov 2011 13:18:47 +0000 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>>
>> > > Well its very hard to sort stuff out when you are juggling a cross tree
>> > > set of dependancies and someone pointlessly stops one of them being
>> > > visible in next for ten days.
>> >
>> > The mess in the drm tree has nothing to do with the staging tree.
>>
>> I would suggest you re-read the paragraph above, and the mails I sent you
>> about marking the staging gma500 tree broken (which given nothing
>> happened in response to any of them I imagine you didn't).
>
> When I originally reported this problem, you responded:
>
>> gma500 is frozen pending Dave Airlie's applying the patches moving it out
>> of staging.
>>
>> <Prod, prod>
>
> Which I assumed was aimed at Dave.  Then Jesse (whose changes broke the
> code in staging) responded with a patch which I assumed that Dave would
> do something with.  Then the next day you responded with:
>
>> If the staging gma500 is causing this still please resolve it by marking
>> the GMA500 in staging "&& BROKEN" for the moment.
>
> And maybe I should have done something then.  I fall back on the excuse
> that I have about 200 trees to merge every day and when I use to fix
> things for people I used to have lots of 12-16 hour days ...
>
>> And if you still think that blocking the DRM tree from -next for ten days
>> thus stopping all sorts of other integration work and forcing people's
>> hands on moving from staging and the like didn't cause the problems and
>> is the right policy then we'll just have to agree to differ.
>
> If you are trying to get something merged into the drm tree, you should
> be working with the drm tree and with the drm maintainer, not
> linux-next.  Linux-next is here to find integration problems between
> trees and across architectures not to find problems with changes within
> one tree.
>
> And I repeat, the breakage today is nothing to do with the staging tree,
> it is in the drm tree and how your gma500 changes were merged there (and
> to be clear, there is nothing wrong with the gma500 changes per se).
>
> In the future, I will try to remember to "kill staging first", but this
> is the first time it has come up since staging started being built by an
> allmodconfig build (which it used not to be - and that change was not my
> choice).

Yeah I've tracked it down here, I had messed up the configs locally so
Alan's code wasn't built, I'll pile some fixes on top of it today.

Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28 13:18             ` Alan Cox
@ 2011-11-28 13:53               ` Stephen Rothwell
  2011-11-28 14:05                 ` Dave Airlie
  2011-11-28 14:08                 ` Alan Cox
  0 siblings, 2 replies; 134+ messages in thread
From: Stephen Rothwell @ 2011-11-28 13:53 UTC (permalink / raw)
  To: Alan Cox; +Cc: Dave Airlie, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

[-- Attachment #1: Type: text/plain, Size: 2438 bytes --]

Hi Alan,

On Mon, 28 Nov 2011 13:18:47 +0000 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> > > Well its very hard to sort stuff out when you are juggling a cross tree
> > > set of dependancies and someone pointlessly stops one of them being
> > > visible in next for ten days.
> > 
> > The mess in the drm tree has nothing to do with the staging tree. 
> 
> I would suggest you re-read the paragraph above, and the mails I sent you
> about marking the staging gma500 tree broken (which given nothing
> happened in response to any of them I imagine you didn't).

When I originally reported this problem, you responded:

> gma500 is frozen pending Dave Airlie's applying the patches moving it out
> of staging.
>
> <Prod, prod>

Which I assumed was aimed at Dave.  Then Jesse (whose changes broke the
code in staging) responded with a patch which I assumed that Dave would
do something with.  Then the next day you responded with:

> If the staging gma500 is causing this still please resolve it by marking
> the GMA500 in staging "&& BROKEN" for the moment.

And maybe I should have done something then.  I fall back on the excuse
that I have about 200 trees to merge every day and when I use to fix
things for people I used to have lots of 12-16 hour days ...

> And if you still think that blocking the DRM tree from -next for ten days
> thus stopping all sorts of other integration work and forcing people's
> hands on moving from staging and the like didn't cause the problems and
> is the right policy then we'll just have to agree to differ.

If you are trying to get something merged into the drm tree, you should
be working with the drm tree and with the drm maintainer, not
linux-next.  Linux-next is here to find integration problems between
trees and across architectures not to find problems with changes within
one tree.

And I repeat, the breakage today is nothing to do with the staging tree,
it is in the drm tree and how your gma500 changes were merged there (and
to be clear, there is nothing wrong with the gma500 changes per se).

In the future, I will try to remember to "kill staging first", but this
is the first time it has come up since staging started being built by an
allmodconfig build (which it used not to be - and that change was not my
choice).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28 13:13           ` Stephen Rothwell
@ 2011-11-28 13:18             ` Alan Cox
  2011-11-28 13:53               ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Alan Cox @ 2011-11-28 13:18 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

> > Well its very hard to sort stuff out when you are juggling a cross tree
> > set of dependancies and someone pointlessly stops one of them being
> > visible in next for ten days.
> 
> The mess in the drm tree has nothing to do with the staging tree. 

I would suggest you re-read the paragraph above, and the mails I sent you
about marking the staging gma500 tree broken (which given nothing
happened in response to any of them I imagine you didn't).

And if you still think that blocking the DRM tree from -next for ten days
thus stopping all sorts of other integration work and forcing people's
hands on moving from staging and the like didn't cause the problems and
is the right policy then we'll just have to agree to differ.

Alan

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28 11:30         ` Alan Cox
@ 2011-11-28 13:13           ` Stephen Rothwell
  2011-11-28 13:18             ` Alan Cox
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2011-11-28 13:13 UTC (permalink / raw)
  To: Alan Cox; +Cc: Dave Airlie, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

Hi Alan,

On Mon, 28 Nov 2011 11:30:56 +0000 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> On Mon, 28 Nov 2011 13:53:17 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > On Fri, 25 Nov 2011 10:34:19 +0000 Dave Airlie <airlied@gmail.com> wrote:
> > >
> > > I just pushed jbarnes patch into my tree for now, at pushed out the
> > > mainline gma500 code with it.
> > 
> > And it is a mess (see my linux-next reports).
> 
> Well its very hard to sort stuff out when you are juggling a cross tree
> set of dependancies and someone pointlessly stops one of them being
> visible in next for ten days.

The mess in the drm tree has nothing to do with the staging tree.  It has
happened because the merge of your gms500 changes into the drm tree
interacted with other changes in that tree and the interactions were not
fixed in that tree.

You did read my error report from today, didn't you?  The build failure
was in drivers/gpu/drm/gma500/psb_drv.c.  The warnings indicating other
unfixed interactions were in drivers/gpu/drm/gma500/framebuffer.c.

As far as I can see, building the gma500 driver in the drm tree (on its
own) will fail.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28  2:52     ` Stephen Rothwell
  2011-11-28  5:07       ` Greg KH
@ 2011-11-28 11:33       ` Alan Cox
  1 sibling, 0 replies; 134+ messages in thread
From: Alan Cox @ 2011-11-28 11:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, linux-next, linux-kernel, Jesse Barnes,
	Ville Syrjälä,
	Rob Clark, Greg KH

> Then if you are moving a driver out of staging, you should put a patch in
> your tree to disable it in staging (or remove it in staging) and send
> that patch to Greg as well.

I was migrating *part* of it. You've forced me to mark it all broken
despite several requests (to which no reply was recieved) not to do so
simply so the poor DRM team can get their work done. As a result anyone
working off Medfield hardware will have to go use other trees. In this
case it's not going to hurt anyone I suspect but who knows in future if
this sort of thing occurs again.

Staging build fail - just mark the staging item as broken, that or stop
including staging in -next.

Alan

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28  2:53       ` Stephen Rothwell
@ 2011-11-28 11:30         ` Alan Cox
  2011-11-28 13:13           ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Alan Cox @ 2011-11-28 11:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

On Mon, 28 Nov 2011 13:53:17 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Dave,
> 
> On Fri, 25 Nov 2011 10:34:19 +0000 Dave Airlie <airlied@gmail.com> wrote:
> >
> > I just pushed jbarnes patch into my tree for now, at pushed out the
> > mainline gma500 code with it.
> 
> And it is a mess (see my linux-next reports).

Well its very hard to sort stuff out when you are juggling a cross tree
set of dependancies and someone pointlessly stops one of them being
visible in next for ten days.

Whatever. I'm onto it, but I think blocking -next merges for staging
breakage is broken to the point that -next needs fixing, or we should
kill staging off.

Alan

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-28  2:52     ` Stephen Rothwell
@ 2011-11-28  5:07       ` Greg KH
  2011-11-28 11:33       ` Alan Cox
  1 sibling, 0 replies; 134+ messages in thread
From: Greg KH @ 2011-11-28  5:07 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Alan Cox, Dave Airlie, linux-next, linux-kernel, Jesse Barnes,
	Ville Syrjälä,
	Rob Clark

On Mon, Nov 28, 2011 at 01:52:04PM +1100, Stephen Rothwell wrote:
> Hi Alan,
> 
> On Fri, 25 Nov 2011 10:30:11 +0000 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >
> > > Ping?
> > 
> > As I said last time you asked this - the correct merge resolution is to
> > pull the DRM updates and mark the staging GMA500 Kconfig "&& BROKEN". The
> > staging driver is frozen while we merge outside of staging and will not
> > be getting any attention at this point - changes there just mess up the
> > move work which is far more important.
> > 
> > Also nothing in staging should be allowed to hold up real work. The
> > resolution for anything in staging blocking merges is to mark the staging
> > parts && BROKEN IMHO
> 
> Then if you are moving a driver out of staging, you should put a patch in
> your tree to disable it in staging (or remove it in staging) and send
> that patch to Greg as well.

That patch is already in my staging-next tree, so all should be good
now.

Even then, I don't think that broken staging drivers should stop any
other tree from being included, except for the staging tree itself.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-25 10:34     ` Dave Airlie
@ 2011-11-28  2:53       ` Stephen Rothwell
  2011-11-28 11:30         ` Alan Cox
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2011-11-28  2:53 UTC (permalink / raw)
  To: Dave Airlie; +Cc: Alan Cox, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Hi Dave,

On Fri, 25 Nov 2011 10:34:19 +0000 Dave Airlie <airlied@gmail.com> wrote:
>
> I just pushed jbarnes patch into my tree for now, at pushed out the
> mainline gma500 code with it.

And it is a mess (see my linux-next reports).

> But if someone can send a patch to Greg to mark GMA500 broken in
> staging that would be good.

See my reply to Alan.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-25 10:30   ` Alan Cox
  2011-11-25 10:34     ` Dave Airlie
@ 2011-11-28  2:52     ` Stephen Rothwell
  2011-11-28  5:07       ` Greg KH
  2011-11-28 11:33       ` Alan Cox
  1 sibling, 2 replies; 134+ messages in thread
From: Stephen Rothwell @ 2011-11-28  2:52 UTC (permalink / raw)
  To: Alan Cox
  Cc: Dave Airlie, linux-next, linux-kernel, Jesse Barnes,
	Ville Syrjälä,
	Rob Clark, Greg KH

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

Hi Alan,

On Fri, 25 Nov 2011 10:30:11 +0000 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> > Ping?
> 
> As I said last time you asked this - the correct merge resolution is to
> pull the DRM updates and mark the staging GMA500 Kconfig "&& BROKEN". The
> staging driver is frozen while we merge outside of staging and will not
> be getting any attention at this point - changes there just mess up the
> move work which is far more important.
> 
> Also nothing in staging should be allowed to hold up real work. The
> resolution for anything in staging blocking merges is to mark the staging
> parts && BROKEN IMHO

Then if you are moving a driver out of staging, you should put a patch in
your tree to disable it in staging (or remove it in staging) and send
that patch to Greg as well.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-25 10:30   ` Alan Cox
@ 2011-11-25 10:34     ` Dave Airlie
  2011-11-28  2:53       ` Stephen Rothwell
  2011-11-28  2:52     ` Stephen Rothwell
  1 sibling, 1 reply; 134+ messages in thread
From: Dave Airlie @ 2011-11-25 10:34 UTC (permalink / raw)
  To: Alan Cox
  Cc: Stephen Rothwell, Dave Airlie, linux-next, linux-kernel, Jesse Barnes

On Fri, Nov 25, 2011 at 10:30 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> Ping?
>
> As I said last time you asked this - the correct merge resolution is to
> pull the DRM updates and mark the staging GMA500 Kconfig "&& BROKEN". The
> staging driver is frozen while we merge outside of staging and will not
> be getting any attention at this point - changes there just mess up the
> move work which is far more important.
>
> Also nothing in staging should be allowed to hold up real work. The
> resolution for anything in staging blocking merges is to mark the staging
> parts && BROKEN IMHO
>

I just pushed jbarnes patch into my tree for now, at pushed out the
mainline gma500 code with it.

But if someone can send a patch to Greg to mark GMA500 broken in
staging that would be good.

Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-25  1:49 ` Stephen Rothwell
@ 2011-11-25 10:30   ` Alan Cox
  2011-11-25 10:34     ` Dave Airlie
  2011-11-28  2:52     ` Stephen Rothwell
  0 siblings, 2 replies; 134+ messages in thread
From: Alan Cox @ 2011-11-25 10:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, linux-next, linux-kernel, Jesse Barnes,
	Ville Syrjälä,
	Rob Clark

> Ping?

As I said last time you asked this - the correct merge resolution is to
pull the DRM updates and mark the staging GMA500 Kconfig "&& BROKEN". The
staging driver is frozen while we merge outside of staging and will not
be getting any attention at this point - changes there just mess up the
move work which is far more important.

Also nothing in staging should be allowed to hold up real work. The
resolution for anything in staging blocking merges is to mark the staging
parts && BROKEN IMHO

Alan

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-16  0:30 Stephen Rothwell
  2011-11-16 10:16 ` Alan Cox
@ 2011-11-25  1:49 ` Stephen Rothwell
  2011-11-25 10:30   ` Alan Cox
  1 sibling, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2011-11-25  1:49 UTC (permalink / raw)
  To: Dave Airlie
  Cc: linux-next, linux-kernel, Jesse Barnes, Ville Syrjälä,
	Alan Cox, Rob Clark

[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]

Hi Dave,

On Wed, 16 Nov 2011 11:30:07 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> drivers/staging/gma500/framebuffer.c: In function 'psb_user_framebuffer_create':
> drivers/staging/gma500/framebuffer.c:558:44: error: 'struct drm_mode_fb_cmd2' has no member named 'handle'
> 
> Caused by commit 308e5bcbdb10 ("drm: add an fb creation ioctl that takes
> a pixel format v5").  Please build test *before* publishing code.  :-(
> 
> I have used the drm tree from next-20111115 for today.
> 
> I also get the following warnings in that file:
> 
> drivers/staging/gma500/framebuffer.c: In function 'psb_framebuffer_init':
> drivers/staging/gma500/framebuffer.c:297:2: warning: passing argument 2 of 'drm_helper_mode_fill_fb_struct' from incompatible pointer type [enabled by default]
> include/drm/drm_crtc_helper.h:121:12: note: expected 'struct drm_mode_fb_cmd2 *' but argument is of type 'struct drm_mode_fb_cmd *'
> drivers/staging/gma500/framebuffer.c:564:2: warning: passing argument 2 of 'psb_framebuffer_create' from incompatible pointer type [enabled by default]
> drivers/staging/gma500/framebuffer.c:314:32: note: expected 'struct drm_mode_fb_cmd *' but argument is of type 'struct drm_mode_fb_cmd2 *'

Ping?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-16 10:16 ` Alan Cox
@ 2011-11-16 16:42   ` Jesse Barnes
  0 siblings, 0 replies; 134+ messages in thread
From: Jesse Barnes @ 2011-11-16 16:42 UTC (permalink / raw)
  To: Alan Cox
  Cc: Stephen Rothwell, Dave Airlie, linux-next, linux-kernel, Rob Clark

On Wed, 16 Nov 2011 10:16:23 +0000
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> > drivers/staging/gma500/framebuffer.c: In function 'psb_framebuffer_init':
> > drivers/staging/gma500/framebuffer.c:297:2: warning: passing argument 2 of 'drm_helper_mode_fill_fb_struct' from incompatible pointer type [enabled by default]
> > include/drm/drm_crtc_helper.h:121:12: note: expected 'struct drm_mode_fb_cmd2 *' but argument is of type 'struct drm_mode_fb_cmd *'
> > drivers/staging/gma500/framebuffer.c:564:2: warning: passing argument 2 of 'psb_framebuffer_create' from incompatible pointer type [enabled by default]
> > drivers/staging/gma500/framebuffer.c:314:32: note: expected 'struct drm_mode_fb_cmd *' but argument is of type 'struct drm_mode_fb_cmd2 *'
> 
> gma500 is frozen pending Dave Airlie's applying the patches moving it out
> of staging.
> 
> <Prod, prod>

Here's a patch to move things over to the new addfb2 interfaces at
least.

-- 
Jesse Barnes, Intel Open Source Technology Center

diff --git a/drivers/staging/gma500/framebuffer.c b/drivers/staging/gma500/framebuffer.c
index 1e77229..29f25b5 100644
--- a/drivers/staging/gma500/framebuffer.c
+++ b/drivers/staging/gma500/framebuffer.c
@@ -32,6 +32,7 @@
 #include <drm/drmP.h>
 #include <drm/drm.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_fb_helper.h>
 
 #include "psb_drv.h"
 #include "psb_intel_reg.h"
@@ -273,14 +274,17 @@ static struct fb_ops psbfb_unaccel_ops = {
  */
 static int psb_framebuffer_init(struct drm_device *dev,
 					struct psb_framebuffer *fb,
-					struct drm_mode_fb_cmd *mode_cmd,
+					struct drm_mode_fb_cmd2 *mode_cmd,
 					struct gtt_range *gt)
 {
+	u32 bpp, depth;
 	int ret;
 
-	if (mode_cmd->pitch & 63)
+	drm_helper_get_fb_bpp_depth(mode_cmd->pixel_format, &depth, &bpp);
+
+	if (mode_cmd->pitches[0] & 63)
 		return -EINVAL;
-	switch (mode_cmd->bpp) {
+	switch (bpp) {
 	case 8:
 	case 16:
 	case 24:
@@ -313,7 +317,7 @@ static int psb_framebuffer_init(struct drm_device *dev,
 
 static struct drm_framebuffer *psb_framebuffer_create
 			(struct drm_device *dev,
-			 struct drm_mode_fb_cmd *mode_cmd,
+			 struct drm_mode_fb_cmd2 *mode_cmd,
 			 struct gtt_range *gt)
 {
 	struct psb_framebuffer *fb;
@@ -387,27 +391,28 @@ static int psbfb_create(struct psb_fbdev *fbdev,
 	struct fb_info *info;
 	struct drm_framebuffer *fb;
 	struct psb_framebuffer *psbfb = &fbdev->pfb;
-	struct drm_mode_fb_cmd mode_cmd;
+	struct drm_mode_fb_cmd2 mode_cmd;
 	struct device *device = &dev->pdev->dev;
 	int size;
 	int ret;
 	struct gtt_range *backing;
 	int gtt_roll = 1;
+	u32 bpp, depth;
 
 	mode_cmd.width = sizes->surface_width;
 	mode_cmd.height = sizes->surface_height;
-	mode_cmd.bpp = sizes->surface_bpp;
+	bpp = sizes->surface_bpp;
 
 	/* No 24bit packed */
-	if (mode_cmd.bpp == 24)
-		mode_cmd.bpp = 32;
+	if (bpp == 24)
+		bpp = 32;
 
 	/* Acceleration via the GTT requires pitch to be 4096 byte aligned 
 	   (ie 1024 or 2048 pixels in normal use) */
-	mode_cmd.pitch =  ALIGN(mode_cmd.width * ((mode_cmd.bpp + 7) / 8), 4096);
-	mode_cmd.depth = sizes->surface_depth;
+	mode_cmd.pitches[0] =  ALIGN(mode_cmd.width * ((bpp + 7) / 8), 4096);
+	depth = sizes->surface_depth;
 
-	size = mode_cmd.pitch * mode_cmd.height;
+	size = mode_cmd.pitches[0] * mode_cmd.height;
 	size = ALIGN(size, PAGE_SIZE);
 
 	/* Allocate the framebuffer in the GTT with stolen page backing */
@@ -421,10 +426,10 @@ static int psbfb_create(struct psb_fbdev *fbdev,
 
 		gtt_roll = 0;	/* Don't use GTT accelerated scrolling */
 
-		mode_cmd.pitch =  ALIGN(mode_cmd.width * ((mode_cmd.bpp + 7) / 8), 64);
-		mode_cmd.depth = sizes->surface_depth;
+		mode_cmd.pitches[0] =  ALIGN(mode_cmd.width * ((bpp + 7) / 8), 64);
+		depth = sizes->surface_depth;
 
-		size = mode_cmd.pitch * mode_cmd.height;
+		size = mode_cmd.pitches[0] * mode_cmd.height;
 		size = ALIGN(size, PAGE_SIZE);
 
 		/* Allocate the framebuffer in the GTT with stolen page
@@ -443,6 +448,8 @@ static int psbfb_create(struct psb_fbdev *fbdev,
 	}
 	info->par = fbdev;
 
+	mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth);
+
 	ret = psb_framebuffer_init(dev, psbfb, &mode_cmd, backing);
 	if (ret)
 		goto out_unref;
@@ -555,7 +562,7 @@ static struct drm_framebuffer *psb_user_framebuffer_create
 	 *	Find the GEM object and thus the gtt range object that is
 	 *	to back this space
 	 */
-	obj = drm_gem_object_lookup(dev, filp, cmd->handle);
+	obj = drm_gem_object_lookup(dev, filp, cmd->handles[0]);
 	if (obj == NULL)
 		return ERR_PTR(-ENOENT);
 

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2011-11-16  0:30 Stephen Rothwell
@ 2011-11-16 10:16 ` Alan Cox
  2011-11-16 16:42   ` Jesse Barnes
  2011-11-25  1:49 ` Stephen Rothwell
  1 sibling, 1 reply; 134+ messages in thread
From: Alan Cox @ 2011-11-16 10:16 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, linux-next, linux-kernel, Jesse Barnes, Rob Clark

> drivers/staging/gma500/framebuffer.c: In function 'psb_framebuffer_init':
> drivers/staging/gma500/framebuffer.c:297:2: warning: passing argument 2 of 'drm_helper_mode_fill_fb_struct' from incompatible pointer type [enabled by default]
> include/drm/drm_crtc_helper.h:121:12: note: expected 'struct drm_mode_fb_cmd2 *' but argument is of type 'struct drm_mode_fb_cmd *'
> drivers/staging/gma500/framebuffer.c:564:2: warning: passing argument 2 of 'psb_framebuffer_create' from incompatible pointer type [enabled by default]
> drivers/staging/gma500/framebuffer.c:314:32: note: expected 'struct drm_mode_fb_cmd *' but argument is of type 'struct drm_mode_fb_cmd2 *'

gma500 is frozen pending Dave Airlie's applying the patches moving it out
of staging.

<Prod, prod>

Alan

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2011-11-16  0:30 Stephen Rothwell
  2011-11-16 10:16 ` Alan Cox
  2011-11-25  1:49 ` Stephen Rothwell
  0 siblings, 2 replies; 134+ messages in thread
From: Stephen Rothwell @ 2011-11-16  0:30 UTC (permalink / raw)
  To: Dave Airlie
  Cc: linux-next, linux-kernel, Jesse Barnes, Ville Syrjälä,
	Alan Cox, Rob Clark

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/staging/gma500/framebuffer.c: In function 'psb_user_framebuffer_create':
drivers/staging/gma500/framebuffer.c:558:44: error: 'struct drm_mode_fb_cmd2' has no member named 'handle'

Caused by commit 308e5bcbdb10 ("drm: add an fb creation ioctl that takes
a pixel format v5").  Please build test *before* publishing code.  :-(

I have used the drm tree from next-20111115 for today.

I also get the following warnings in that file:

drivers/staging/gma500/framebuffer.c: In function 'psb_framebuffer_init':
drivers/staging/gma500/framebuffer.c:297:2: warning: passing argument 2 of 'drm_helper_mode_fill_fb_struct' from incompatible pointer type [enabled by default]
include/drm/drm_crtc_helper.h:121:12: note: expected 'struct drm_mode_fb_cmd2 *' but argument is of type 'struct drm_mode_fb_cmd *'
drivers/staging/gma500/framebuffer.c:564:2: warning: passing argument 2 of 'psb_framebuffer_create' from incompatible pointer type [enabled by default]
drivers/staging/gma500/framebuffer.c:314:32: note: expected 'struct drm_mode_fb_cmd *' but argument is of type 'struct drm_mode_fb_cmd2 *'

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2011-03-15  3:49 Stephen Rothwell
  0 siblings, 0 replies; 134+ messages in thread
From: Stephen Rothwell @ 2011-03-15  3:49 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Alex Deucher

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/radeon/ni.c: In function 'cayman_cp_enable':
drivers/gpu/drm/radeon/ni.c:1042: error: 'struct radeon_mc' has no member named 'active_vram_size'

Caused by commit 0c88a02ef6b7 ("drm/radeon/kms: add support for CP setup
on cayman asics") interacting with commit 5359533801e3 ("drm/radeon: fix
problem with changing active VRAM size. (v2)") from Linus' tree.

I allied the following fix up patch for today (I am not sure if it is
correct).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 15 Mar 2011 14:44:59 +1100
Subject: [PATCH] drm/radeon/kms: update for active_vram_size removal

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/radeon/ni.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 8c199c4..7aade20 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1039,7 +1039,7 @@ static void cayman_cp_enable(struct radeon_device *rdev, bool enable)
 	if (enable)
 		WREG32(CP_ME_CNTL, 0);
 	else {
-		rdev->mc.active_vram_size = rdev->mc.visible_vram_size;
+		radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size);
 		WREG32(CP_ME_CNTL, (CP_ME_HALT | CP_PFP_HALT));
 		WREG32(SCRATCH_UMSK, 0);
 	}
-- 
1.7.4.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2010-04-08 16:19     ` Tony Luck
@ 2010-04-08 20:50       ` Pauli Nieminen
  0 siblings, 0 replies; 134+ messages in thread
From: Pauli Nieminen @ 2010-04-08 20:50 UTC (permalink / raw)
  To: Tony Luck
  Cc: Stephen Rothwell, Dave Airlie, linux-next, linux-kernel, Jerome Glisse

On Thu, Apr 8, 2010 at 7:19 PM, Tony Luck <tony.luck@gmail.com> wrote:
> Does anyone else see:
>
> drivers/gpu/drm/ttm/ttm_page_alloc.c: In function ‘ttm_page_alloc_debugfs’:
> drivers/gpu/drm/ttm/ttm_page_alloc.c:830: error: implicit declaration
> of function ‘seq_printf’
>
> when building the next-20100408 tag?
>
> -Tony
>

http://marc.info/?l=dri-devel&m=127067975811418&w=2

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2010-04-08  4:14   ` Stephen Rothwell
@ 2010-04-08 16:19     ` Tony Luck
  2010-04-08 20:50       ` Pauli Nieminen
  0 siblings, 1 reply; 134+ messages in thread
From: Tony Luck @ 2010-04-08 16:19 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, linux-next, linux-kernel, Pauli Nieminen, Jerome Glisse

Does anyone else see:

drivers/gpu/drm/ttm/ttm_page_alloc.c: In function ‘ttm_page_alloc_debugfs’:
drivers/gpu/drm/ttm/ttm_page_alloc.c:830: error: implicit declaration
of function ‘seq_printf’

when building the next-20100408 tag?

-Tony

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2010-04-08  3:52 ` Dave Airlie
@ 2010-04-08  4:14   ` Stephen Rothwell
  2010-04-08 16:19     ` Tony Luck
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2010-04-08  4:14 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Pauli Nieminen, Jerome Glisse

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

Hi Dave,

On Thu, 8 Apr 2010 04:52:44 +0100 (IST) Dave Airlie <airlied@linux.ie> wrote:
>
> applied for next drm-next.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 134+ messages in thread

* Re: linux-next: build failure after merge of the drm tree
  2010-04-08  3:12 Stephen Rothwell
@ 2010-04-08  3:52 ` Dave Airlie
  2010-04-08  4:14   ` Stephen Rothwell
  0 siblings, 1 reply; 134+ messages in thread
From: Dave Airlie @ 2010-04-08  3:52 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Pauli Nieminen, Jerome Glisse

> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> drivers/gpu/drm/ttm/ttm_page_alloc.c: In function 'ttm_page_pool_free':
> drivers/gpu/drm/ttm/ttm_page_alloc.c:311: error: implicit declaration of function 'kmalloc'
> drivers/gpu/drm/ttm/ttm_page_alloc.c:312: warning: assignment makes pointer from integer without a cast
> drivers/gpu/drm/ttm/ttm_page_alloc.c:375: error: implicit declaration of function 'kfree'
> drivers/gpu/drm/ttm/ttm_page_alloc.c: In function 'ttm_alloc_new_pages':
> drivers/gpu/drm/ttm/ttm_page_alloc.c:483: warning: assignment makes pointer from integer without a cast
> 
> Caused by commit 1403b1a38e8b19a4cc17e2c158e278628943a436 ("drm/ttm: add
> pool wc/uc page allocator V3") interacting with the removal of slab.h
> from percpu.h.
> 
> I applied the following patch for today.

Thanks Stephen,

applied for next drm-next.

Dave.

^ permalink raw reply	[flat|nested] 134+ messages in thread

* linux-next: build failure after merge of the drm tree
@ 2010-04-08  3:12 Stephen Rothwell
  2010-04-08  3:52 ` Dave Airlie
  0 siblings, 1 reply; 134+ messages in thread
From: Stephen Rothwell @ 2010-04-08  3:12 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-next, linux-kernel, Pauli Nieminen, Jerome Glisse

Hi Dave,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/ttm/ttm_page_alloc.c: In function 'ttm_page_pool_free':
drivers/gpu/drm/ttm/ttm_page_alloc.c:311: error: implicit declaration of function 'kmalloc'
drivers/gpu/drm/ttm/ttm_page_alloc.c:312: warning: assignment makes pointer from integer without a cast
drivers/gpu/drm/ttm/ttm_page_alloc.c:375: error: implicit declaration of function 'kfree'
drivers/gpu/drm/ttm/ttm_page_alloc.c: In function 'ttm_alloc_new_pages':
drivers/gpu/drm/ttm/ttm_page_alloc.c:483: warning: assignment makes pointer from integer without a cast

Caused by commit 1403b1a38e8b19a4cc17e2c158e278628943a436 ("drm/ttm: add
pool wc/uc page allocator V3") interacting with the removal of slab.h
from percpu.h.

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 8 Apr 2010 13:05:05 +1000
Subject: [PATCH] drm/ttm: using kmalloc/kfree requires including slab.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/ttm/ttm_page_alloc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 6ca9b27..d6c40bd 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -36,6 +36,7 @@
 #include <linux/mm_types.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <linux/slab.h>
 
 #include <asm/atomic.h>
 #include <asm/agp.h>
-- 
1.7.0.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 134+ messages in thread

end of thread, other threads:[~2023-04-11  6:47 UTC | newest]

Thread overview: 134+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-28  2:49 linux-next: build failure after merge of the drm tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2023-04-11  6:47 Stephen Rothwell
2023-01-19  2:12 Stephen Rothwell
2022-09-30 10:54 broonie
2022-10-04  2:20 ` Stephen Rothwell
2022-10-04  2:24   ` David Airlie
2022-10-04  3:05     ` Stephen Rothwell
2022-10-04 11:39       ` Mark Brown
2022-10-05 15:30         ` Alex Deucher
2022-10-05 16:45           ` Hamza Mahfooz
2022-10-05 22:28             ` Stephen Rothwell
2022-10-06  8:12               ` Stephen Rothwell
2022-10-06 13:56                 ` Alex Deucher
2022-10-06 16:52                   ` Stephen Rothwell
2022-10-06 16:25                 ` Hamza Mahfooz
2022-02-25 16:42 broonie
2022-02-28  3:46 ` Stephen Rothwell
2022-02-28  6:44 ` Hsin-Yi Wang
2022-02-28  6:48   ` Dave Airlie
2022-02-28 15:33     ` Robert Foss
2021-08-20  2:33 Stephen Rothwell
2021-08-20  6:23 ` Masahiro Yamada
2021-09-01 21:50   ` Stephen Rothwell
2021-09-05 22:49     ` Stephen Rothwell
2021-09-06  7:34       ` Daniel Vetter
2021-09-08  3:13         ` Masahiro Yamada
2021-09-08  9:07           ` Daniel Vetter
2021-04-09  3:36 Stephen Rothwell
2021-01-08  0:55 Stephen Rothwell
2021-01-08  1:25 ` Stephen Rothwell
2021-01-10 23:56   ` Stephen Rothwell
2021-01-18  0:59     ` Stephen Rothwell
2021-01-18  1:06       ` Dave Airlie
2021-01-20 12:12         ` Daniel Vetter
2021-01-20 20:44           ` Stephen Rothwell
2020-12-09  1:53 Stephen Rothwell
2020-09-28  3:54 Stephen Rothwell
2020-09-28  6:04 ` Christoph Hellwig
2020-09-28  6:08   ` Dave Airlie
2020-09-28  6:14     ` Christoph Hellwig
2020-09-28 10:15   ` Paul Cercueil
2020-09-28 11:34     ` Christoph Hellwig
2020-09-28 11:46       ` Paul Cercueil
2020-09-28 12:10         ` Christoph Hellwig
2020-09-28 13:31           ` Paul Cercueil
2020-09-30  9:02             ` Christoph Hellwig
2020-09-30 13:33               ` Paul Cercueil
2020-09-30 16:11                 ` Christoph Hellwig
2020-09-30 16:39                   ` Paul Cercueil
2020-09-30 16:40                     ` Christoph Hellwig
2020-09-30 16:45                       ` Paul Cercueil
2020-09-30 16:52                         ` Christoph Hellwig
2020-05-08  4:29 Stephen Rothwell
2019-11-05  2:54 Stephen Rothwell
2019-10-10  0:22 Stephen Rothwell
2019-07-08  4:48 Stephen Rothwell
2019-04-26  2:17 Stephen Rothwell
2018-05-16  6:53 Stephen Rothwell
2018-05-16  8:09 ` Oded Gabbay
2018-05-17  5:00   ` Dave Airlie
2018-03-13  5:46 Stephen Rothwell
2018-01-02  1:48 Stephen Rothwell
2017-09-28  4:57 Stephen Rothwell
2017-03-20  0:51 Stephen Rothwell
2017-03-20  8:03 ` Daniel Vetter
2017-03-20  8:05   ` Daniel Vetter
2017-02-23 23:25 Stephen Rothwell
2017-01-24  1:25 Stephen Rothwell
2017-01-25 10:52 ` Vincent ABRIOU
2016-07-15  3:40 Stephen Rothwell
2016-07-15  4:32 ` Sedat Dilek
2016-04-28  1:57 Stephen Rothwell
2016-04-28  8:11 ` Jani Nikula
2016-03-17  4:41 Stephen Rothwell
2016-03-17  8:41 ` Christian König
2016-02-22  0:45 Stephen Rothwell
2015-12-31 10:31 Stephen Rothwell
2016-01-07  2:44 ` Stephen Rothwell
2016-01-11 22:54   ` Stephen Rothwell
2016-01-12  0:31     ` Dave Airlie
2016-01-12  4:35       ` Stephen Rothwell
2016-01-12  7:48         ` Zhu, Rex
2015-12-31  2:40 Stephen Rothwell
2015-12-31  5:14 ` Mark yao
2015-11-04  9:22 Stephen Rothwell
2015-11-09 16:45 ` Guenter Roeck
2015-11-10  4:55   ` Alexandre Courbot
2015-10-06  1:09 Stephen Rothwell
2015-06-09 13:42 Stephen Rothwell
2015-06-09 14:02 ` Deucher, Alexander
2015-06-10  0:28   ` Stephen Rothwell
2015-05-20  3:08 Stephen Rothwell
2015-05-20  4:41 ` Dave Airlie
2015-05-20  5:25   ` Stephen Rothwell
2015-05-20  5:31     ` Stephen Rothwell
2015-05-20  6:01       ` Oded Gabbay
2015-05-20  6:08         ` Dave Airlie
2015-01-29  2:38 Stephen Rothwell
2015-01-29  8:21 ` Oded Gabbay
2015-01-29  9:35   ` Stephen Rothwell
2014-09-08  4:26 Stephen Rothwell
2014-06-05  4:12 Stephen Rothwell
2014-06-05  4:28 ` Stephen Rothwell
2012-09-24  3:18 Stephen Rothwell
2012-09-24 11:31 ` Daniel Vetter
2012-09-24 11:58   ` Stephen Rothwell
2012-08-24  3:49 Stephen Rothwell
2012-05-17  3:47 Stephen Rothwell
2012-04-30  3:22 Stephen Rothwell
2012-04-23  3:42 Stephen Rothwell
2012-03-16  2:53 Stephen Rothwell
2012-03-19  2:45 ` Stephen Rothwell
2011-11-16  0:30 Stephen Rothwell
2011-11-16 10:16 ` Alan Cox
2011-11-16 16:42   ` Jesse Barnes
2011-11-25  1:49 ` Stephen Rothwell
2011-11-25 10:30   ` Alan Cox
2011-11-25 10:34     ` Dave Airlie
2011-11-28  2:53       ` Stephen Rothwell
2011-11-28 11:30         ` Alan Cox
2011-11-28 13:13           ` Stephen Rothwell
2011-11-28 13:18             ` Alan Cox
2011-11-28 13:53               ` Stephen Rothwell
2011-11-28 14:05                 ` Dave Airlie
2011-11-28 14:08                 ` Alan Cox
2011-11-28  2:52     ` Stephen Rothwell
2011-11-28  5:07       ` Greg KH
2011-11-28 11:33       ` Alan Cox
2011-03-15  3:49 Stephen Rothwell
2010-04-08  3:12 Stephen Rothwell
2010-04-08  3:52 ` Dave Airlie
2010-04-08  4:14   ` Stephen Rothwell
2010-04-08 16:19     ` Tony Luck
2010-04-08 20:50       ` Pauli Nieminen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).