Skip to contentSkip to conversation

drm: vmwgfx: include linux/highmem.h

PATCH In review Arnd Bergmann 4 participants 5 messages May 8, 2020 – May 12, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: vmwgfx: include linux/highmem.h

In order to call kmap_atomic() etc, we need to include linux/highmem.h:

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c: In function 'vmw_bo_cpu_blit_line':
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:377:4: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]

  377 |    kunmap_atomic(d->src_addr);
      |    ^~~~~~~~~~~~~
      |    in_atomic
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:391:5: error: implicit declaration of function 'kmap_atomic_prot' [-Werror=implicit-function-declaration]
  391 |     kmap_atomic_prot(d->dst_pages[dst_page],
      |     ^~~~~~~~~~~~~~~~

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:390:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
390 | d->dst_addr =
| ^
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:403:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
403 | d->src_addr =
| ^

Fixes 46385a895322 ("drm: remove drm specific kmap_atomic code")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c +1 -0
index 94d456a1d1a9..1629427d5734 100644
@@ -27,6 +27,7 @@
  **************************************************************************/
 
 #include "vmwgfx_drv.h"
+#include <linux/highmem.h>
 
 /*
  * Template that implements find_first_diff() for a generic
Signature · 6 lines
2.26.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi Arnd,

Quoted 39 lines · On Sat, 9 May 2020 00:01:31 +0200 Arnd Bergmann <[email protected]> wrote:

In order to call kmap_atomic() etc, we need to include linux/highmem.h:

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c: In function 'vmw_bo_cpu_blit_line':
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:377:4: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]

  377 |    kunmap_atomic(d->src_addr);
      |    ^~~~~~~~~~~~~
      |    in_atomic
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:391:5: error: implicit declaration of function 'kmap_atomic_prot' [-Werror=implicit-function-declaration]
  391 |     kmap_atomic_prot(d->dst_pages[dst_page],
      |     ^~~~~~~~~~~~~~~~

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:390:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
390 | d->dst_addr =
| ^
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:403:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
403 | d->src_addr =
| ^

Fixes 46385a895322 ("drm: remove drm specific kmap_atomic code")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c +1 -0
index 94d456a1d1a9..1629427d5734 100644
@@ -27,6 +27,7 @@
  **************************************************************************/
 
 #include "vmwgfx_drv.h"
+#include <linux/highmem.h>
 
 /*
  * Template that implements find_first_diff() for a generic
Signature · 1 line
2.26.0

Added to linux-next for Monday (in case Andrew doesn't get around to it).

Signature · 2 lines
Cheers,
Stephen Rothwell
Acked-by
#2 lore raw
Quoted 37 lines · Stephen Rothwell

Hi Arnd,

Quoted 34 lines · On Sat, 9 May 2020 00:01:31 +0200 Arnd Bergmann <[email protected]> wrote:

In order to call kmap_atomic() etc, we need to include linux/highmem.h:

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c: In function 'vmw_bo_cpu_blit_line':
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:377:4: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]

  377 |    kunmap_atomic(d->src_addr);
      |    ^~~~~~~~~~~~~
      |    in_atomic
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:391:5: error: implicit declaration of function 'kmap_atomic_prot' [-Werror=implicit-function-declaration]
  391 |     kmap_atomic_prot(d->dst_pages[dst_page],
      |     ^~~~~~~~~~~~~~~~

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:390:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
390 | d->dst_addr =
| ^
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:403:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
403 | d->src_addr =
| ^

Fixes 46385a895322 ("drm: remove drm specific kmap_atomic code")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c +1 -0
index 94d456a1d1a9..1629427d5734 100644
@@ -27,6 +27,7 @@
  **************************************************************************/
 
 #include "vmwgfx_drv.h"
+#include <linux/highmem.h>
 
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c +0 -0
 /*
  * Template that implements find_first_diff() for a generic
Signature · 1 line
2.26.0

Added to linux-next for Monday (in case Andrew doesn't get around to it).

Hi,

What happened with this patch?
I am seeing the same build problems in linux-next of 20200512.

thanks.

Signature · 1 line
~Randy
Reviewed-by on v1 1/1
#3 lore raw
In reply to Arnd Bergmann
Quoted 17 lines · Arnd Bergmann

In order to call kmap_atomic() etc, we need to include linux/highmem.h:

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c: In function 'vmw_bo_cpu_blit_line':
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:377:4: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]

  377 |    kunmap_atomic(d->src_addr);
      |    ^~~~~~~~~~~~~
      |    in_atomic
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:391:5: error: implicit declaration of function 'kmap_atomic_prot' [-Werror=implicit-function-declaration]
  391 |     kmap_atomic_prot(d->dst_pages[dst_page],
      |     ^~~~~~~~~~~~~~~~

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:390:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
390 | d->dst_addr =
| ^
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:403:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
403 | d->src_addr =
| ^

Quoted 2 lines
Fixes 46385a895322 ("drm: remove drm specific kmap_atomic code")

I'm curious about the config which failed... Because this compiled for me. Regardless it was stupid of me to not include this.

Thanks,

Quoted 19 lines
---
 drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c +1 -0
index 94d456a1d1a9..1629427d5734 100644
@@ -27,6 +27,7 @@
  **************************************************************************/
 
 #include "vmwgfx_drv.h"
+#include <linux/highmem.h>
 
 /*
  * Template that implements find_first_diff() for a generic
Signature · 1 line
2.26.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 22 lines · Ira Weiny
Quoted 17 lines · Arnd Bergmann

In order to call kmap_atomic() etc, we need to include linux/highmem.h:

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c: In function 'vmw_bo_cpu_blit_line':
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:377:4: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]

  377 |    kunmap_atomic(d->src_addr);
      |    ^~~~~~~~~~~~~
      |    in_atomic
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:391:5: error: implicit declaration of function 'kmap_atomic_prot' [-Werror=implicit-function-declaration]
  391 |     kmap_atomic_prot(d->dst_pages[dst_page],
      |     ^~~~~~~~~~~~~~~~

drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:390:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
390 | d->dst_addr =
| ^
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:403:16: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
403 | d->src_addr =
| ^

Quoted 2 lines
Fixes 46385a895322 ("drm: remove drm specific kmap_atomic code")
Quoted 6 lines

I'm curious about the config which failed... Because this compiled for me. Regardless it was stupid of me to not include this.

Thanks,

I do a lot of randconfig build tests and only one of them had this problem.

See https://pastebin.com/LmX0Jfbg for reference, I did not check further which of the options caused this.

Arnd