Skip to contentSkip to conversation

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

PATCH Stephen Rothwell 2 participants 3 messages Aug 26, 2020 – Sep 2, 2020

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

Hi all,

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

drivers/gpu/drm/qxl/qxl_display.c: In function 'qxl_display_read_client_monitors_config':
include/drm/drm_modeset_lock.h:167:7: error: implicit declaration of function 'drm_drv_uses_atomic_modeset' [-Werror=implicit-function-declaration]

  167 |  if (!drm_drv_uses_atomic_modeset(dev))    \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:187:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN'
  187 |  DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/gpu/drm/qxl/qxl_display.c:189:35: error: macro "DRM_MODESET_LOCK_ALL_END" requires 3 arguments, but only 2 given
189 | DRM_MODESET_LOCK_ALL_END(ctx, ret);
| ^
In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:194: note: macro "DRM_MODESET_LOCK_ALL_END" defined here

  194 | #define DRM_MODESET_LOCK_ALL_END(dev, ctx, ret)    \
      | 
drivers/gpu/drm/qxl/qxl_display.c:189:2: error: 'DRM_MODESET_LOCK_ALL_END' undeclared (first use in this function)
  189 |  DRM_MODESET_LOCK_ALL_END(ctx, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:189:2: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/qxl/qxl_display.c:187:2: error: label 'modeset_lock_fail' used but not defined
  187 |  DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:170:1: warning: label 'modeset_lock_retry' defined but not used [-Wunused-label]

  170 | modeset_lock_retry:       \
      | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:187:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN'
  187 |  DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/gpu/drm/qxl/qxl_display.c: In function 'qxl_framebuffer_surface_dirty':
drivers/gpu/drm/qxl/qxl_display.c:434:35: error: macro "DRM_MODESET_LOCK_ALL_END" requires 3 arguments, but only 2 given
434 | DRM_MODESET_LOCK_ALL_END(ctx, ret);
| ^
In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:194: note: macro "DRM_MODESET_LOCK_ALL_END" defined here

  194 | #define DRM_MODESET_LOCK_ALL_END(dev, ctx, ret)    \
      | 
drivers/gpu/drm/qxl/qxl_display.c:434:2: error: 'DRM_MODESET_LOCK_ALL_END' undeclared (first use in this function)
  434 |  DRM_MODESET_LOCK_ALL_END(ctx, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:411:2: error: label 'modeset_lock_fail' used but not defined
  411 |  DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:170:1: warning: label 'modeset_lock_retry' defined but not used [-Wunused-label]

  170 | modeset_lock_retry:       \
      | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:411:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN'
  411 |  DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

bbaac1354cc9 ("drm/qxl: Replace deprecated function in qxl_display")

interacting with commit

77ef38574beb ("drm/modeset-lock: Take the modeset BKL for legacy drivers")

from the drm-misc-fixes tree.

drivers/gpu/drm/qxl/qxl_display.c manages to include drm/drm_modeset_lock.h by some indirect route, but fails to have drm/drm_drv.h similarly included. In fact, drm/drm_modeset_lock.h should have included drm/drm_drv.h since it uses things declared there, and drivers/gpu/drm/qxl/qxl_display.c should include drm/drm_modeset_lock.h similarly.

I have added the following hack patch for today.

From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Aug 2020 10:40:18 +1000
Subject: [PATCH] fix interaction with drm-misc-fix commit

---
 drivers/gpu/drm/qxl/qxl_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +3 -2
index fa79688013b7..6063f3a15329 100644
@@ -26,6 +26,7 @@
 #include <linux/crc32.h>
 #include <linux/delay.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
@@ -186,7 +187,7 @@ void qxl_display_read_client_monitors_config(struct qxl_device *qdev)
 
 	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
 	qxl_update_offset_props(qdev);
-	DRM_MODESET_LOCK_ALL_END(ctx, ret);
+	DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 	if (!drm_helper_hpd_irq_event(dev)) {
 		/* notify that the monitor configuration changed, to
 		   adjust at the arbitrary resolution */
@@ -431,7 +432,7 @@ static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
 			  clips, num_clips, inc, 0);
 
 out_lock_end:
-	DRM_MODESET_LOCK_ALL_END(ctx, ret);
+	DRM_MODESET_LOCK_ALL_END(fb->dev, ctx, ret);
 
 	return 0;
 }
Signature · 5 lines
2.28.0

-- 
Cheers,
Stephen Rothwell

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

#1 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for linux-next: build failure after merge of the drm-misc tree

== Series Details ==

== Series Details ==

Series: linux-next: build failure after merge of the drm-misc tree
URL : https://patchwork.freedesktop.org/series/81001/
State : failure

== Summary ==

Applying: linux-next: build failure after merge of the drm-misc tree Using index info to reconstruct a base tree...
M drivers/gpu/drm/qxl/qxl_display.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 122 lines · On Wed, 26 Aug 2020 10:55:47 +1000 Stephen Rothwell <[email protected]>…

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

drivers/gpu/drm/qxl/qxl_display.c: In function 'qxl_display_read_client_monitors_config':
include/drm/drm_modeset_lock.h:167:7: error: implicit declaration of function 'drm_drv_uses_atomic_modeset' [-Werror=implicit-function-declaration]

  167 |  if (!drm_drv_uses_atomic_modeset(dev))    \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:187:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN'
  187 |  DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/gpu/drm/qxl/qxl_display.c:189:35: error: macro "DRM_MODESET_LOCK_ALL_END" requires 3 arguments, but only 2 given
189 | DRM_MODESET_LOCK_ALL_END(ctx, ret);
| ^
In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:194: note: macro "DRM_MODESET_LOCK_ALL_END" defined here

  194 | #define DRM_MODESET_LOCK_ALL_END(dev, ctx, ret)    \
      | 
drivers/gpu/drm/qxl/qxl_display.c:189:2: error: 'DRM_MODESET_LOCK_ALL_END' undeclared (first use in this function)
  189 |  DRM_MODESET_LOCK_ALL_END(ctx, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:189:2: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/qxl/qxl_display.c:187:2: error: label 'modeset_lock_fail' used but not defined
  187 |  DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:170:1: warning: label 'modeset_lock_retry' defined but not used [-Wunused-label]

  170 | modeset_lock_retry:       \
      | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:187:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN'
  187 |  DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/gpu/drm/qxl/qxl_display.c: In function 'qxl_framebuffer_surface_dirty':
drivers/gpu/drm/qxl/qxl_display.c:434:35: error: macro "DRM_MODESET_LOCK_ALL_END" requires 3 arguments, but only 2 given
434 | DRM_MODESET_LOCK_ALL_END(ctx, ret);
| ^
In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:194: note: macro "DRM_MODESET_LOCK_ALL_END" defined here

  194 | #define DRM_MODESET_LOCK_ALL_END(dev, ctx, ret)    \
      | 
drivers/gpu/drm/qxl/qxl_display.c:434:2: error: 'DRM_MODESET_LOCK_ALL_END' undeclared (first use in this function)
  434 |  DRM_MODESET_LOCK_ALL_END(ctx, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:411:2: error: label 'modeset_lock_fail' used but not defined
  411 |  DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from include/drm/drm_crtc.h:36,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/qxl/qxl_display.c:29:
include/drm/drm_modeset_lock.h:170:1: warning: label 'modeset_lock_retry' defined but not used [-Wunused-label]

  170 | modeset_lock_retry:       \
      | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/qxl/qxl_display.c:411:2: note: in expansion of macro 'DRM_MODESET_LOCK_ALL_BEGIN'
  411 |  DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

bbaac1354cc9 ("drm/qxl: Replace deprecated function in qxl_display")

interacting with commit

77ef38574beb ("drm/modeset-lock: Take the modeset BKL for legacy drivers")

from the drm-misc-fixes tree.

drivers/gpu/drm/qxl/qxl_display.c manages to include drm/drm_modeset_lock.h by some indirect route, but fails to have drm/drm_drv.h similarly included. In fact, drm/drm_modeset_lock.h should have included drm/drm_drv.h since it uses things declared there, and drivers/gpu/drm/qxl/qxl_display.c should include drm/drm_modeset_lock.h similarly.

I have added the following hack patch for today.

From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Aug 2020 10:40:18 +1000
Subject: [PATCH] fix interaction with drm-misc-fix commit

---
 drivers/gpu/drm/qxl/qxl_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +3 -2
index fa79688013b7..6063f3a15329 100644
@@ -26,6 +26,7 @@
 #include <linux/crc32.h>
 #include <linux/delay.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
@@ -186,7 +187,7 @@ void qxl_display_read_client_monitors_config(struct qxl_device *qdev)
 
 	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE, ret);
 	qxl_update_offset_props(qdev);
-	DRM_MODESET_LOCK_ALL_END(ctx, ret);
+	DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 	if (!drm_helper_hpd_irq_event(dev)) {
 		/* notify that the monitor configuration changed, to
 		   adjust at the arbitrary resolution */
@@ -431,7 +432,7 @@ static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
 			  clips, num_clips, inc, 0);
 
 out_lock_end:
-	DRM_MODESET_LOCK_ALL_END(ctx, ret);
+	DRM_MODESET_LOCK_ALL_END(fb->dev, ctx, ret);
 
 	return 0;
 }
Signature · 1 line
2.28.0

This is now a build failure in the drm tree merg. I have added the above hack to the merge of the drm tree today.

Signature · 2 lines
Cheers,
Stephen Rothwell

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx