Skip to contentSkip to conversation

drm/qxl: Fix build errors

PATCH In review Sean Paul 4 participants 7 messages Aug 17, 2020 – Aug 19, 2020

Subsystems (4)
lore
Share & tools
lore

Sean Paul

author
#0 lore raw

PATCH 1/1 drm/qxl: Fix build errors

From: Sean Paul <[email protected]>

Introduced in the patch below, the END macro was missing 'dev' and BEGIN macro needs drm_drv_uses_atomic_modeset() from drm_drv.h

Fixes bbaac1354cc9 ("drm/qxl: Replace deprecated function in qxl_display")
Cc Sidong Yang <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Dave Airlie <[email protected]>
---
 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..5b4fd6952b53 100644
@@ -28,6 +28,7 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_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 · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

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

Hi Sean.

Quoted 6 lines · Sean Paul

From: Sean Paul <[email protected]>

Introduced in the patch below, the END macro was missing 'dev' and BEGIN macro needs drm_drv_uses_atomic_modeset() from drm_drv.h

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

We should not use Fixes for local fixes like this, as we do not want the robots to pick this commit.
With the Fixes: dropped (maybe just reference the commit in the changelog):

Quoted 46 lines
Cc Sidong Yang <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Dave Airlie <[email protected]>
---
 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..5b4fd6952b53 100644
@@ -28,6 +28,7 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_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 · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

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

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

author
#2 lore raw
Quoted 9 lines · Sam Ravnborg

Hi Sean.

Quoted 5 lines · Sean Paul

From: Sean Paul <[email protected]>

Introduced in the patch below, the END macro was missing 'dev' and BEGIN macro needs drm_drv_uses_atomic_modeset() from drm_drv.h

Quoted 7 lines
Quoted 1 line
Fixes bbaac1354cc9 ("drm/qxl: Replace deprecated function in qxl_display")

We should not use Fixes for local fixes like this, as we do not want the robots to pick this commit.
With the Fixes: dropped (maybe just reference the commit in the changelog):

Ok, I'll fix up the Fixes: tag and apply to -misc-next.

Thanks for the quick response!

Sean

Quoted 43 lines
Quoted 43 lines
Cc Sidong Yang <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Dave Airlie <[email protected]>
---
 drivers/gpu/drm/qxl/qxl_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +3 -3
index fa79688013b7..5b4fd6952b53 100644
@@ -28,6 +28,7 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_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;
 }
--

Sean Paul, Software Engineer, Google / Chromium OS

Quoted 4 lines
Quoted 4 lines

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

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

author
#3 lore raw
Quoted 12 lines · Sean Paul
Quoted 10 lines · Sam Ravnborg

Hi Sean.

Quoted 6 lines · Sean Paul

From: Sean Paul <[email protected]>

Introduced in the patch below, the END macro was missing 'dev' and BEGIN macro needs drm_drv_uses_atomic_modeset() from drm_drv.h

Fixes bbaac1354cc9 ("drm/qxl: Replace deprecated function in qxl_display")
Quoted 9 lines
Quoted 6 lines

We should not use Fixes for local fixes like this, as we do not want the robots to pick this commit.
With the Fixes: dropped (maybe just reference the commit in the changelog):

Ok, I'll fix up the Fixes: tag and apply to -misc-next.

I guess things are never quite so easy :-). It looks like Daniel's patch is in drm-misc-fixes and Sidong's patch is in drm-misc-next. On their own they're fine, but once they are merged in drm-tip the build error shows up.

So I think this needs to be resolved in drm-tip. I see
https://drm.pages.freedesktop.org/maintainer-tools/drm-tip.html#fixing-silent-conflicts,
but that seems like a maintainer thing, so I'll wait for -misc maintainers to chime in.

Sean

Quoted 47 lines

Thanks for the quick response!

Sean

Quoted 43 lines
Quoted 43 lines
Cc Sidong Yang <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Dave Airlie <[email protected]>
---
 drivers/gpu/drm/qxl/qxl_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +3 -3
index fa79688013b7..5b4fd6952b53 100644
@@ -28,6 +28,7 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_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;
 }
--

Sean Paul, Software Engineer, Google / Chromium OS

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

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

maintainer
#4 lore raw

Hi,

Quoted 4 lines

I guess things are never quite so easy :-). It looks like Daniel's patch is in drm-misc-fixes and Sidong's patch is in drm-misc-next. On their own they're fine, but once they are merged in drm-tip the build error shows up.

Ah, ok. I've already wondered how that got past my build testing. This explains it.

thanks for looking into it,
Gerd

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

maintainer
#5 lore raw
Quoted 8 lines · Gerd Hoffmann

Hi,

Quoted 4 lines

I guess things are never quite so easy :-). It looks like Daniel's patch is in drm-misc-fixes and Sidong's patch is in drm-misc-next. On their own they're fine, but once they are merged in drm-tip the build error shows up.

Quoted 4 lines

Ah, ok. I've already wondered how that got past my build testing. This explains it.

thanks for looking into it,

I've fixed this in drm-tip with a fixup.

In future when we find these silent conflicts, can someone please
https://drm.pages.freedesktop.org/maintainer-tools/drm-tip.html

follow those instructions to fix it up.

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

author
#6 lore raw
In reply to Sean Paul
Quoted 11 lines · Sean Paul

From: Sean Paul <[email protected]>

Introduced in the patch below, the END macro was missing 'dev' and BEGIN macro needs drm_drv_uses_atomic_modeset() from drm_drv.h

Fixes bbaac1354cc9 ("drm/qxl: Replace deprecated function in qxl_display")
Cc Sidong Yang <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Dave Airlie <[email protected]>

Apologies, this should be:

Fixes 77ef38574beb ("drm/modeset-lock: Take the modeset BKL for

legacy drivers")
Cc: Alex Deucher <[email protected]>
Cc: Michal Orzel <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v5.8+
Cc: Daniel Vetter <[email protected]>
Cc: Alex Deucher <[email protected]>

Quoted 36 lines
---
 drivers/gpu/drm/qxl/qxl_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +3 -3
index fa79688013b7..5b4fd6952b53 100644
@@ -28,6 +28,7 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_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;
 }
--
Quoted 2 lines

Sean Paul, Software Engineer, Google / Chromium OS

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