]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/nouveau: Use drm_fb_helper_output_poll_changed()
authorNoralf Trønnes <noralf@tronnes.org>
Tue, 5 Dec 2017 18:25:00 +0000 (19:25 +0100)
committerNoralf Trønnes <noralf@tronnes.org>
Fri, 8 Dec 2017 12:07:01 +0000 (13:07 +0100)
This driver can use drm_fb_helper_output_poll_changed() instead of
its own nouveau_fbcon_output_poll_changed().

Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-8-noralf@tronnes.org
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_fbcon.h
drivers/gpu/drm/nouveau/nouveau_vga.c
drivers/gpu/drm/nouveau/nv50_display.c

index 2e7785f49e6d54c1c0941c69de2ff0a869cfd3f0..009713404cc4f8a67f9fce431462770bc21b6866 100644 (file)
@@ -29,6 +29,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
 
 #include <nvif/class.h>
 
@@ -292,7 +293,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
 
 static const struct drm_mode_config_funcs nouveau_mode_config_funcs = {
        .fb_create = nouveau_user_framebuffer_create,
-       .output_poll_changed = nouveau_fbcon_output_poll_changed,
+       .output_poll_changed = drm_fb_helper_output_poll_changed,
 };
 
 
index c533d8e04afc0f1fc4708d85e069323291c428c3..45a4572cd2fb8bc270bcb260052dc2522313ef68 100644 (file)
@@ -413,14 +413,6 @@ out:
        return ret;
 }
 
-void
-nouveau_fbcon_output_poll_changed(struct drm_device *dev)
-{
-       struct nouveau_drm *drm = nouveau_drm(dev);
-       if (drm->fbcon)
-               drm_fb_helper_hotplug_event(&drm->fbcon->helper);
-}
-
 static int
 nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
 {
index e2bca729721ed5ae1d908f18575eeaab8002567b..a6f192ea3fa6758934f2a54054f10708d2c73f14 100644 (file)
@@ -68,8 +68,6 @@ void nouveau_fbcon_set_suspend(struct drm_device *dev, int state);
 void nouveau_fbcon_accel_save_disable(struct drm_device *dev);
 void nouveau_fbcon_accel_restore(struct drm_device *dev);
 
-void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
-
 extern int nouveau_nofbaccel;
 
 #endif /* __NV50_FBCON_H__ */
index 52e52a360fb120300a3decc4b2ebe5f33f16f6fc..3da5a4305aa4847a32c0abf398a50e7a0dc90b7e 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
 
 #include "nouveau_drv.h"
 #include "nouveau_acpi.h"
@@ -61,7 +62,7 @@ static void
 nouveau_switcheroo_reprobe(struct pci_dev *pdev)
 {
        struct drm_device *dev = pci_get_drvdata(pdev);
-       nouveau_fbcon_output_poll_changed(dev);
+       drm_fb_helper_output_poll_changed(dev);
 }
 
 static bool
index 65336948e807877746f39c8f6c778668c1a2e149..b22c37bde13ffb97aa9d5a1ca557c93ef4294d1f 100644 (file)
@@ -4311,7 +4311,7 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev)
 static const struct drm_mode_config_funcs
 nv50_disp_func = {
        .fb_create = nouveau_user_framebuffer_create,
-       .output_poll_changed = nouveau_fbcon_output_poll_changed,
+       .output_poll_changed = drm_fb_helper_output_poll_changed,
        .atomic_check = nv50_disp_atomic_check,
        .atomic_commit = nv50_disp_atomic_commit,
        .atomic_state_alloc = nv50_disp_atomic_state_alloc,