* [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
@ 2022-02-17 6:25 kernel test robot
2022-02-17 6:36 ` [Intel-gfx] " Lucas De Marchi
0 siblings, 1 reply; 8+ messages in thread
From: kernel test robot @ 2022-02-17 6:25 UTC (permalink / raw)
To: Douglas Anderson; +Cc: llvm, kbuild-all, intel-gfx, dri-devel, Matt Roper
tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip
head: e141e36b2871c529379f7ec7d5d6ebae3137a51b
commit: 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip
config: mips-buildonly-randconfig-r002-20220217 (https://download.01.org/0day-ci/archive/20220217/202202171455.bclm1YBC-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0bad7cb56526f2572c74449fcf97c1fcda42b41d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git remote add drm-tip git://anongit.freedesktop.org/drm/drm-tip
git fetch --no-tags drm-tip drm-tip
git checkout 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/solomon/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/gpu/drm/solomon/ssd130x.c:447:74: warning: declaration of 'struct dma_buf_map' will not be visible outside of this function [-Wvisibility]
static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
^
>> drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
~~~^
drivers/gpu/drm/solomon/ssd130x.c:447:74: note: forward declaration of 'struct dma_buf_map'
static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
^
>> drivers/gpu/drm/solomon/ssd130x.c:506:40: error: incompatible pointer types passing 'struct iosys_map *' to parameter of type 'const struct dma_buf_map *' [-Werror,-Wincompatible-pointer-types]
ssd130x_fb_blit_rect(plane_state->fb, &shadow_plane_state->data[0], &plane_state->dst);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/solomon/ssd130x.c:447:87: note: passing argument to parameter 'map' here
static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
^
drivers/gpu/drm/solomon/ssd130x.c:566:40: error: incompatible pointer types passing 'struct iosys_map *' to parameter of type 'const struct dma_buf_map *' [-Werror,-Wincompatible-pointer-types]
ssd130x_fb_blit_rect(plane_state->fb, &shadow_plane_state->data[0], &dst_clip);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/solomon/ssd130x.c:447:87: note: passing argument to parameter 'map' here
static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
^
1 warning and 3 errors generated.
vim +451 drivers/gpu/drm/solomon/ssd130x.c
a61732e808672cf Javier Martinez Canillas 2022-02-14 446
a61732e808672cf Javier Martinez Canillas 2022-02-14 @447 static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
a61732e808672cf Javier Martinez Canillas 2022-02-14 448 struct drm_rect *rect)
a61732e808672cf Javier Martinez Canillas 2022-02-14 449 {
a61732e808672cf Javier Martinez Canillas 2022-02-14 450 struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
a61732e808672cf Javier Martinez Canillas 2022-02-14 @451 void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
a61732e808672cf Javier Martinez Canillas 2022-02-14 452 int ret = 0;
a61732e808672cf Javier Martinez Canillas 2022-02-14 453 u8 *buf = NULL;
a61732e808672cf Javier Martinez Canillas 2022-02-14 454
a61732e808672cf Javier Martinez Canillas 2022-02-14 455 buf = kcalloc(fb->width, fb->height, GFP_KERNEL);
a61732e808672cf Javier Martinez Canillas 2022-02-14 456 if (!buf)
a61732e808672cf Javier Martinez Canillas 2022-02-14 457 return -ENOMEM;
a61732e808672cf Javier Martinez Canillas 2022-02-14 458
a61732e808672cf Javier Martinez Canillas 2022-02-14 459 drm_fb_xrgb8888_to_mono_reversed(buf, 0, vmap, fb, rect);
a61732e808672cf Javier Martinez Canillas 2022-02-14 460
a61732e808672cf Javier Martinez Canillas 2022-02-14 461 ssd130x_update_rect(ssd130x, buf, rect);
a61732e808672cf Javier Martinez Canillas 2022-02-14 462
a61732e808672cf Javier Martinez Canillas 2022-02-14 463 kfree(buf);
a61732e808672cf Javier Martinez Canillas 2022-02-14 464
a61732e808672cf Javier Martinez Canillas 2022-02-14 465 return ret;
a61732e808672cf Javier Martinez Canillas 2022-02-14 466 }
a61732e808672cf Javier Martinez Canillas 2022-02-14 467
a61732e808672cf Javier Martinez Canillas 2022-02-14 468 static int ssd130x_display_pipe_mode_valid(struct drm_simple_display_pipe *pipe,
a61732e808672cf Javier Martinez Canillas 2022-02-14 469 const struct drm_display_mode *mode)
a61732e808672cf Javier Martinez Canillas 2022-02-14 470 {
a61732e808672cf Javier Martinez Canillas 2022-02-14 471 struct ssd130x_device *ssd130x = drm_to_ssd130x(pipe->crtc.dev);
a61732e808672cf Javier Martinez Canillas 2022-02-14 472
a61732e808672cf Javier Martinez Canillas 2022-02-14 473 if (mode->hdisplay != ssd130x->mode.hdisplay &&
a61732e808672cf Javier Martinez Canillas 2022-02-14 474 mode->vdisplay != ssd130x->mode.vdisplay)
a61732e808672cf Javier Martinez Canillas 2022-02-14 475 return MODE_ONE_SIZE;
a61732e808672cf Javier Martinez Canillas 2022-02-14 476
a61732e808672cf Javier Martinez Canillas 2022-02-14 477 if (mode->hdisplay != ssd130x->mode.hdisplay)
a61732e808672cf Javier Martinez Canillas 2022-02-14 478 return MODE_ONE_WIDTH;
a61732e808672cf Javier Martinez Canillas 2022-02-14 479
a61732e808672cf Javier Martinez Canillas 2022-02-14 480 if (mode->vdisplay != ssd130x->mode.vdisplay)
a61732e808672cf Javier Martinez Canillas 2022-02-14 481 return MODE_ONE_HEIGHT;
a61732e808672cf Javier Martinez Canillas 2022-02-14 482
a61732e808672cf Javier Martinez Canillas 2022-02-14 483 return MODE_OK;
a61732e808672cf Javier Martinez Canillas 2022-02-14 484 }
a61732e808672cf Javier Martinez Canillas 2022-02-14 485
a61732e808672cf Javier Martinez Canillas 2022-02-14 486 static void ssd130x_display_pipe_enable(struct drm_simple_display_pipe *pipe,
a61732e808672cf Javier Martinez Canillas 2022-02-14 487 struct drm_crtc_state *crtc_state,
a61732e808672cf Javier Martinez Canillas 2022-02-14 488 struct drm_plane_state *plane_state)
a61732e808672cf Javier Martinez Canillas 2022-02-14 489 {
a61732e808672cf Javier Martinez Canillas 2022-02-14 490 struct ssd130x_device *ssd130x = drm_to_ssd130x(pipe->crtc.dev);
a61732e808672cf Javier Martinez Canillas 2022-02-14 491 struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
a61732e808672cf Javier Martinez Canillas 2022-02-14 492 struct drm_device *drm = &ssd130x->drm;
a61732e808672cf Javier Martinez Canillas 2022-02-14 493 int idx, ret;
a61732e808672cf Javier Martinez Canillas 2022-02-14 494
a61732e808672cf Javier Martinez Canillas 2022-02-14 495 ret = ssd130x_power_on(ssd130x);
a61732e808672cf Javier Martinez Canillas 2022-02-14 496 if (ret)
a61732e808672cf Javier Martinez Canillas 2022-02-14 497 return;
a61732e808672cf Javier Martinez Canillas 2022-02-14 498
a61732e808672cf Javier Martinez Canillas 2022-02-14 499 ret = ssd130x_init(ssd130x);
a61732e808672cf Javier Martinez Canillas 2022-02-14 500 if (ret)
a61732e808672cf Javier Martinez Canillas 2022-02-14 501 goto out_power_off;
a61732e808672cf Javier Martinez Canillas 2022-02-14 502
a61732e808672cf Javier Martinez Canillas 2022-02-14 503 if (!drm_dev_enter(drm, &idx))
a61732e808672cf Javier Martinez Canillas 2022-02-14 504 goto out_power_off;
a61732e808672cf Javier Martinez Canillas 2022-02-14 505
a61732e808672cf Javier Martinez Canillas 2022-02-14 @506 ssd130x_fb_blit_rect(plane_state->fb, &shadow_plane_state->data[0], &plane_state->dst);
a61732e808672cf Javier Martinez Canillas 2022-02-14 507
a61732e808672cf Javier Martinez Canillas 2022-02-14 508 ssd130x_write_cmd(ssd130x, 1, SSD130X_DISPLAY_ON);
a61732e808672cf Javier Martinez Canillas 2022-02-14 509
a61732e808672cf Javier Martinez Canillas 2022-02-14 510 backlight_enable(ssd130x->bl_dev);
a61732e808672cf Javier Martinez Canillas 2022-02-14 511
a61732e808672cf Javier Martinez Canillas 2022-02-14 512 drm_dev_exit(idx);
a61732e808672cf Javier Martinez Canillas 2022-02-14 513
a61732e808672cf Javier Martinez Canillas 2022-02-14 514 return;
a61732e808672cf Javier Martinez Canillas 2022-02-14 515 out_power_off:
a61732e808672cf Javier Martinez Canillas 2022-02-14 516 ssd130x_power_off(ssd130x);
a61732e808672cf Javier Martinez Canillas 2022-02-14 517 }
a61732e808672cf Javier Martinez Canillas 2022-02-14 518
:::::: The code at line 451 was first introduced by commit
:::::: a61732e808672cfa8c8c6028bcf9feacb953ef40 drm: Add driver for Solomon SSD130x OLED displays
:::::: TO: Javier Martinez Canillas <javierm@redhat.com>
:::::: CC: Javier Martinez Canillas <javierm@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
2022-02-17 6:25 [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map' kernel test robot
@ 2022-02-17 6:36 ` Lucas De Marchi
2022-02-17 9:00 ` Javier Martinez Canillas
2022-02-17 9:09 ` Lucas De Marchi
0 siblings, 2 replies; 8+ messages in thread
From: Lucas De Marchi @ 2022-02-17 6:36 UTC (permalink / raw)
To: kernel test robot
Cc: Douglas Anderson, javierm, intel-gfx, llvm, kbuild-all, dri-devel
+Javier
On Thu, Feb 17, 2022 at 02:25:08PM +0800, kernel test robot wrote:
>tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip
>head: e141e36b2871c529379f7ec7d5d6ebae3137a51b
>commit: 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip
>config: mips-buildonly-randconfig-r002-20220217 (https://download.01.org/0day-ci/archive/20220217/202202171455.bclm1YBC-lkp@intel.com/config)
>compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0bad7cb56526f2572c74449fcf97c1fcda42b41d)
>reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install mips cross compiling tool for clang build
> # apt-get install binutils-mips-linux-gnu
> git remote add drm-tip git://anongit.freedesktop.org/drm/drm-tip
> git fetch --no-tags drm-tip drm-tip
> git checkout 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/solomon/
>
>If you fix the issue, kindly add following tag as appropriate
>Reported-by: kernel test robot <lkp@intel.com>
>
>All error/warnings (new ones prefixed by >>):
>
>>> drivers/gpu/drm/solomon/ssd130x.c:447:74: warning: declaration of 'struct dma_buf_map' will not be visible outside of this function [-Wvisibility]
> static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
> ^
this is now called iosys_map in drm-intel... drm-tip will need a fixup
for the merge.
>>> drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
> void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
> ~~~^
this shouldn't really be done.
Lucas De Marchi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
2022-02-17 6:36 ` [Intel-gfx] " Lucas De Marchi
@ 2022-02-17 9:00 ` Javier Martinez Canillas
2022-02-17 9:25 ` Lucas De Marchi
2022-02-17 9:09 ` Lucas De Marchi
1 sibling, 1 reply; 8+ messages in thread
From: Javier Martinez Canillas @ 2022-02-17 9:00 UTC (permalink / raw)
To: Lucas De Marchi, kernel test robot
Cc: kbuild-all, intel-gfx, llvm, Douglas Anderson, dri-devel
Hello Lucas,
On 2/17/22 07:36, Lucas De Marchi wrote:
> +Javier
>
>
> On Thu, Feb 17, 2022 at 02:25:08PM +0800, kernel test robot wrote:
>> tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip
>> head: e141e36b2871c529379f7ec7d5d6ebae3137a51b
>> commit: 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip
>> config: mips-buildonly-randconfig-r002-20220217 (https://download.01.org/0day-ci/archive/20220217/202202171455.bclm1YBC-lkp@intel.com/config)
>> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0bad7cb56526f2572c74449fcf97c1fcda42b41d)
>> reproduce (this is a W=1 build):
>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # install mips cross compiling tool for clang build
>> # apt-get install binutils-mips-linux-gnu
>> git remote add drm-tip git://anongit.freedesktop.org/drm/drm-tip
>> git fetch --no-tags drm-tip drm-tip
>> git checkout 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f
>> # save the config file to linux build tree
>> mkdir build_dir
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/solomon/
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All error/warnings (new ones prefixed by >>):
>>
>>>> drivers/gpu/drm/solomon/ssd130x.c:447:74: warning: declaration of 'struct dma_buf_map' will not be visible outside of this function [-Wvisibility]
>> static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
>> ^
>
> this is now called iosys_map in drm-intel... drm-tip will need a fixup
> for the merge.
>
I thought that the drm-intel tree was only for Intel DRM drivers changes and
subsystem wide changes should be merged through drm-mic ?
Doing refactoring in that tree will likely lead to merge conflicts like this.
Noticed your series in dri-devel but missed that already landed in drm-intel.
The resolution should just be [0] right? If you confirm that then I can post
a proper patch to dri-devel.
>>>> drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
>> void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
>> ~~~^
>
> this shouldn't really be done.
>
Yes, I know but asked what would be the proper way and didn't get an answer.
We have many drivers doing the same and I couldn't find one that was doing
it correctly to use as a reference:
$ git grep "TODO: Use mapping abstraction properly" | wc -l
15
If you point me the proper way, I'll be happy to post a patch to change it.
> Lucas De Marchi
>
[0]
From f8268e5b15c321b56862904665f5e312bf50d397 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 17 Feb 2022 09:52:37 +0100
Subject: [PATCH] drm/solomon: Rename dma-buf-map to iosys-map
Commit 7938f4218168 ("dma-buf-map: Rename to iosys-map") renamed the struct
dma_buf_map to struct iosys_map, but this change wasn't present in drm-misc
when the ssd130x driver was merged, and it created a merge conflict.
Fix this by renaming the data structure type in the ssd130x driver.
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/solomon/ssd130x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index 19697c8c5a2c..92c1902f53e4 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -444,7 +444,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x)
kfree(buf);
}
-static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
+static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct iosys_map *map,
struct drm_rect *rect)
{
struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
--
2.34.1
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
2022-02-17 6:36 ` [Intel-gfx] " Lucas De Marchi
2022-02-17 9:00 ` Javier Martinez Canillas
@ 2022-02-17 9:09 ` Lucas De Marchi
1 sibling, 0 replies; 8+ messages in thread
From: Lucas De Marchi @ 2022-02-17 9:09 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild-all, intel-gfx, llvm, Douglas Anderson, dri-devel,
javierm@redhat.com Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, Thomas Zimmermann
On Wed, Feb 16, 2022 at 10:36:25PM -0800, Lucas De Marchi wrote:
>+Javier
>
>
>On Thu, Feb 17, 2022 at 02:25:08PM +0800, kernel test robot wrote:
>>tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip
>>head: e141e36b2871c529379f7ec7d5d6ebae3137a51b
>>commit: 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip
>>config: mips-buildonly-randconfig-r002-20220217 (https://download.01.org/0day-ci/archive/20220217/202202171455.bclm1YBC-lkp@intel.com/config)
>>compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0bad7cb56526f2572c74449fcf97c1fcda42b41d)
>>reproduce (this is a W=1 build):
>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # install mips cross compiling tool for clang build
>> # apt-get install binutils-mips-linux-gnu
>> git remote add drm-tip git://anongit.freedesktop.org/drm/drm-tip
>> git fetch --no-tags drm-tip drm-tip
>> git checkout 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f
>> # save the config file to linux build tree
>> mkdir build_dir
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/solomon/
>>
>>If you fix the issue, kindly add following tag as appropriate
>>Reported-by: kernel test robot <lkp@intel.com>
>>
>>All error/warnings (new ones prefixed by >>):
>>
>>>>drivers/gpu/drm/solomon/ssd130x.c:447:74: warning: declaration of 'struct dma_buf_map' will not be visible outside of this function [-Wvisibility]
>> static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
>> ^
just did a dim rebuild-tip and added a fixup to drm-misc-next.
+Cc other maintainers
--------------------8<------------------------
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index 19697c8c5a2c..92c1902f53e4 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -444,7 +444,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x)
kfree(buf);
}
-static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
+static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct iosys_map *map,
struct drm_rect *rect)
{
struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
--------------------8<------------------------
Lucas De Marchi
>
>this is now called iosys_map in drm-intel... drm-tip will need a fixup
>for the merge.
>
>>>>drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
>> void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
>> ~~~^
>
>this shouldn't really be done.
>
>Lucas De Marchi
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
2022-02-17 9:00 ` Javier Martinez Canillas
@ 2022-02-17 9:25 ` Lucas De Marchi
2022-02-17 9:39 ` Javier Martinez Canillas
2022-02-17 9:41 ` Thomas Zimmermann
0 siblings, 2 replies; 8+ messages in thread
From: Lucas De Marchi @ 2022-02-17 9:25 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: kernel test robot, intel-gfx, llvm, kbuild-all, Douglas Anderson,
dri-devel
On Thu, Feb 17, 2022 at 10:00:42AM +0100, Javier Martinez Canillas wrote:
>Hello Lucas,
>
>On 2/17/22 07:36, Lucas De Marchi wrote:
>> +Javier
>>
>>
>> On Thu, Feb 17, 2022 at 02:25:08PM +0800, kernel test robot wrote:
>>> tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip
>>> head: e141e36b2871c529379f7ec7d5d6ebae3137a51b
>>> commit: 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip
>>> config: mips-buildonly-randconfig-r002-20220217 (https://download.01.org/0day-ci/archive/20220217/202202171455.bclm1YBC-lkp@intel.com/config)
>>> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0bad7cb56526f2572c74449fcf97c1fcda42b41d)
>>> reproduce (this is a W=1 build):
>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>> chmod +x ~/bin/make.cross
>>> # install mips cross compiling tool for clang build
>>> # apt-get install binutils-mips-linux-gnu
>>> git remote add drm-tip git://anongit.freedesktop.org/drm/drm-tip
>>> git fetch --no-tags drm-tip drm-tip
>>> git checkout 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f
>>> # save the config file to linux build tree
>>> mkdir build_dir
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/solomon/
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All error/warnings (new ones prefixed by >>):
>>>
>>>>> drivers/gpu/drm/solomon/ssd130x.c:447:74: warning: declaration of 'struct dma_buf_map' will not be visible outside of this function [-Wvisibility]
>>> static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
>>> ^
>>
>> this is now called iosys_map in drm-intel... drm-tip will need a fixup
>> for the merge.
>>
>
>I thought that the drm-intel tree was only for Intel DRM drivers changes and
>subsystem wide changes should be merged through drm-mic ?
>
>Doing refactoring in that tree will likely lead to merge conflicts like this.
Yes, I know. My initial proposal was to split the rename and do it per
branch to avoid this kind of situation, but it was requested to be done
all in a single patch. Since I had other ~15 patches dependent on that
one to be merged in drm-intel, it was agreed to do the rename via
drm-intel. See
https://lore.kernel.org/lkml/e3813696-7b91-510c-987f-85ed2fd502d6@suse.de/
I guess the conflicts won't be that terrible and can be fixed as they
show up.
>Noticed your series in dri-devel but missed that already landed in drm-intel.
>
>The resolution should just be [0] right? If you confirm that then I can post
>a proper patch to dri-devel.
>
>>>>> drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
>>> void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
>>> ~~~^
>>
>> this shouldn't really be done.
>>
>
>Yes, I know but asked what would be the proper way and didn't get an answer.
>We have many drivers doing the same and I couldn't find one that was doing
>it correctly to use as a reference:
>
>$ git grep "TODO: Use mapping abstraction properly" | wc -l
>15
>
>If you point me the proper way, I'll be happy to post a patch to change it.
It depends what you want to do with the address. There are APIs to copy
from/to. I also added a few to read/write to an offset. It seems the
problem here is that you need to pass that to a helper,
drm_fb_xrgb8888_to_mono_reversed(). I think the proper solution would be
to change the helper to accept an iosys_map* as argument rather than a
void*.
Lucas De Marchi
>
>> Lucas De Marchi
>>
>
>[0]
>From f8268e5b15c321b56862904665f5e312bf50d397 Mon Sep 17 00:00:00 2001
>From: Javier Martinez Canillas <javierm@redhat.com>
>Date: Thu, 17 Feb 2022 09:52:37 +0100
>Subject: [PATCH] drm/solomon: Rename dma-buf-map to iosys-map
>
>Commit 7938f4218168 ("dma-buf-map: Rename to iosys-map") renamed the struct
>dma_buf_map to struct iosys_map, but this change wasn't present in drm-misc
>when the ssd130x driver was merged, and it created a merge conflict.
>
>Fix this by renaming the data structure type in the ssd130x driver.
>
>Reported-by: kernel test robot <lkp@intel.com>
>Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
>Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>---
> drivers/gpu/drm/solomon/ssd130x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
>index 19697c8c5a2c..92c1902f53e4 100644
>--- a/drivers/gpu/drm/solomon/ssd130x.c
>+++ b/drivers/gpu/drm/solomon/ssd130x.c
>@@ -444,7 +444,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x)
> kfree(buf);
> }
>
>-static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map,
>+static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct iosys_map *map,
I added this as a fixup to dim, so it's applied on the merge commit. I
think it would be preferred to have this in the merge resolution when
drm-intel propagates all the way back to drm-misc
> struct drm_rect *rect)
> {
> struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
>--
>2.34.1
>
>Best regards,
>--
>Javier Martinez Canillas
>Linux Engineering
>Red Hat
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
2022-02-17 9:25 ` Lucas De Marchi
@ 2022-02-17 9:39 ` Javier Martinez Canillas
2022-02-17 9:41 ` Thomas Zimmermann
1 sibling, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2022-02-17 9:39 UTC (permalink / raw)
To: Lucas De Marchi
Cc: kbuild-all, kernel test robot, intel-gfx, llvm, Douglas Anderson,
dri-devel
On 2/17/22 10:25, Lucas De Marchi wrote:
> On Thu, Feb 17, 2022 at 10:00:42AM +0100, Javier Martinez Canillas wrote:
[snip]
>>> this is now called iosys_map in drm-intel... drm-tip will need a fixup
>>> for the merge.
>>>
>>
>> I thought that the drm-intel tree was only for Intel DRM drivers changes and
>> subsystem wide changes should be merged through drm-mic ?
>>
>> Doing refactoring in that tree will likely lead to merge conflicts like this.
>
> Yes, I know. My initial proposal was to split the rename and do it per
> branch to avoid this kind of situation, but it was requested to be done
> all in a single patch. Since I had other ~15 patches dependent on that
> one to be merged in drm-intel, it was agreed to do the rename via
> drm-intel. See
> https://lore.kernel.org/lkml/e3813696-7b91-510c-987f-85ed2fd502d6@suse.de/
>
Got it. Thanks for the explanation.
> I guess the conflicts won't be that terrible and can be fixed as they
> show up.
>
Agreed.
>> Noticed your series in dri-devel but missed that already landed in drm-intel.
>>
>> The resolution should just be [0] right? If you confirm that then I can post
>> a proper patch to dri-devel.
>>
>>>>>> drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
>>>> void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
>>>> ~~~^
>>>
>>> this shouldn't really be done.
>>>
>>
>> Yes, I know but asked what would be the proper way and didn't get an answer.
>> We have many drivers doing the same and I couldn't find one that was doing
>> it correctly to use as a reference:
>>
>> $ git grep "TODO: Use mapping abstraction properly" | wc -l
>> 15
>>
>> If you point me the proper way, I'll be happy to post a patch to change it.
>
> It depends what you want to do with the address. There are APIs to copy
> from/to. I also added a few to read/write to an offset. It seems the
> problem here is that you need to pass that to a helper,
> drm_fb_xrgb8888_to_mono_reversed(). I think the proper solution would be
> to change the helper to accept an iosys_map* as argument rather than a
> void*.
>
That makes a lot of sense. Once the dust settles and your series land in
drm-misc-next, I can take a look at this and removing the TODO comment.
> Lucas De Marchi
>>>
>>> Lucas De Marchi
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
2022-02-17 9:25 ` Lucas De Marchi
2022-02-17 9:39 ` Javier Martinez Canillas
@ 2022-02-17 9:41 ` Thomas Zimmermann
2022-02-17 9:51 ` Javier Martinez Canillas
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Zimmermann @ 2022-02-17 9:41 UTC (permalink / raw)
To: Lucas De Marchi, Javier Martinez Canillas
Cc: kbuild-all, kernel test robot, intel-gfx, llvm, Douglas Anderson,
dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 3374 bytes --]
Hi
Am 17.02.22 um 10:25 schrieb Lucas De Marchi:
[...]
>> $ git grep "TODO: Use mapping abstraction properly" | wc -l
>> 15
>>
>> If you point me the proper way, I'll be happy to post a patch to
>> change it.
>
> It depends what you want to do with the address. There are APIs to copy
> from/to. I also added a few to read/write to an offset. It seems the
> problem here is that you need to pass that to a helper,
> drm_fb_xrgb8888_to_mono_reversed(). I think the proper solution would be
> to change the helper to accept an iosys_map* as argument rather than a
> void*.
There are several of these TODOs in the DRM code, because our
format-conversion helpers are still from the time before
dma_buf_map/iosys_map. The easiest workaround is to take the raw pointer
and give it to them. One day, DRM's public blit and conversion
interfaces will take an iosys_map and handle the different memory types
internally.
Javierm, that's when the internal _line() helpers will become useful.
They can use system memory directly, and for I/O memory the
blit/conversion helpers allocate an internal temporary per-line buffer.
The code you made for the new driver has this designed outlined already.
Best regards
Thomas
>
> Lucas De Marchi
>
>>
>>> Lucas De Marchi
>>>
>>
>> [0]
>> From f8268e5b15c321b56862904665f5e312bf50d397 Mon Sep 17 00:00:00 2001
>> From: Javier Martinez Canillas <javierm@redhat.com>
>> Date: Thu, 17 Feb 2022 09:52:37 +0100
>> Subject: [PATCH] drm/solomon: Rename dma-buf-map to iosys-map
>>
>> Commit 7938f4218168 ("dma-buf-map: Rename to iosys-map") renamed the
>> struct
>> dma_buf_map to struct iosys_map, but this change wasn't present in
>> drm-misc
>> when the ssd130x driver was merged, and it created a merge conflict.
>>
>> Fix this by renaming the data structure type in the ssd130x driver.
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>> ---
>> drivers/gpu/drm/solomon/ssd130x.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/solomon/ssd130x.c
>> b/drivers/gpu/drm/solomon/ssd130x.c
>> index 19697c8c5a2c..92c1902f53e4 100644
>> --- a/drivers/gpu/drm/solomon/ssd130x.c
>> +++ b/drivers/gpu/drm/solomon/ssd130x.c
>> @@ -444,7 +444,7 @@ static void ssd130x_clear_screen(struct
>> ssd130x_device *ssd130x)
>> kfree(buf);
>> }
>>
>> -static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const
>> struct dma_buf_map *map,
>> +static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const
>> struct iosys_map *map,
>
> I added this as a fixup to dim, so it's applied on the merge commit. I
> think it would be preferred to have this in the merge resolution when
> drm-intel propagates all the way back to drm-misc
>
>
>> struct drm_rect *rect)
>> {
>> struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
>> --
>> 2.34.1
>>
>> Best regards,
>> --
>> Javier Martinez Canillas
>> Linux Engineering
>> Red Hat
>>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'
2022-02-17 9:41 ` Thomas Zimmermann
@ 2022-02-17 9:51 ` Javier Martinez Canillas
0 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2022-02-17 9:51 UTC (permalink / raw)
To: Thomas Zimmermann, Lucas De Marchi
Cc: kbuild-all, kernel test robot, intel-gfx, llvm, Douglas Anderson,
dri-devel
On 2/17/22 10:41, Thomas Zimmermann wrote:
> Hi
>
> Am 17.02.22 um 10:25 schrieb Lucas De Marchi:
> [...]
>>> $ git grep "TODO: Use mapping abstraction properly" | wc -l
>>> 15
>>>
>>> If you point me the proper way, I'll be happy to post a patch to
>>> change it.
>>
>> It depends what you want to do with the address. There are APIs to copy
>> from/to. I also added a few to read/write to an offset. It seems the
>> problem here is that you need to pass that to a helper,
>> drm_fb_xrgb8888_to_mono_reversed(). I think the proper solution would be
>> to change the helper to accept an iosys_map* as argument rather than a
>> void*.
>
> There are several of these TODOs in the DRM code, because our
> format-conversion helpers are still from the time before
> dma_buf_map/iosys_map. The easiest workaround is to take the raw pointer
> and give it to them. One day, DRM's public blit and conversion
> interfaces will take an iosys_map and handle the different memory types
> internally.
>
Yes, as Lucas mentioned there are copy from/to helpers but didn't want to
use it because would be another unnecessary copy just to avoid to take the
map->vaddr raw pointer and pass directly to the format-conversion helper.
> Javierm, that's when the internal _line() helpers will become useful.
> They can use system memory directly, and for I/O memory the
> blit/conversion helpers allocate an internal temporary per-line buffer.
> The code you made for the new driver has this designed outlined already.
>
Indeed. I understand now what you meant when proposing to add those helpers.
> Best regards
> Thomas
>
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-02-17 9:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 6:25 [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map' kernel test robot
2022-02-17 6:36 ` [Intel-gfx] " Lucas De Marchi
2022-02-17 9:00 ` Javier Martinez Canillas
2022-02-17 9:25 ` Lucas De Marchi
2022-02-17 9:39 ` Javier Martinez Canillas
2022-02-17 9:41 ` Thomas Zimmermann
2022-02-17 9:51 ` Javier Martinez Canillas
2022-02-17 9:09 ` Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox