Commit d0f54f51 authored by Noralf Trønnes's avatar Noralf Trønnes

drm/nouveau: Use drm_fb_helper_output_poll_changed()

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: default avatarNoralf Trønnes <noralf@tronnes.org>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-8-noralf@tronnes.org
parent 4ccbc6e5
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <drm/drm_atomic.h> #include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc_helper.h> #include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_helper.h>
#include <nvif/class.h> #include <nvif/class.h>
...@@ -292,7 +293,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev, ...@@ -292,7 +293,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
static const struct drm_mode_config_funcs nouveau_mode_config_funcs = { static const struct drm_mode_config_funcs nouveau_mode_config_funcs = {
.fb_create = nouveau_user_framebuffer_create, .fb_create = nouveau_user_framebuffer_create,
.output_poll_changed = nouveau_fbcon_output_poll_changed, .output_poll_changed = drm_fb_helper_output_poll_changed,
}; };
......
...@@ -413,14 +413,6 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, ...@@ -413,14 +413,6 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
return ret; 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 static int
nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon) nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
{ {
......
...@@ -68,8 +68,6 @@ void nouveau_fbcon_set_suspend(struct drm_device *dev, int state); ...@@ -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_save_disable(struct drm_device *dev);
void nouveau_fbcon_accel_restore(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; extern int nouveau_nofbaccel;
#endif /* __NV50_FBCON_H__ */ #endif /* __NV50_FBCON_H__ */
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <drm/drmP.h> #include <drm/drmP.h>
#include <drm/drm_crtc_helper.h> #include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_helper.h>
#include "nouveau_drv.h" #include "nouveau_drv.h"
#include "nouveau_acpi.h" #include "nouveau_acpi.h"
...@@ -61,7 +62,7 @@ static void ...@@ -61,7 +62,7 @@ static void
nouveau_switcheroo_reprobe(struct pci_dev *pdev) nouveau_switcheroo_reprobe(struct pci_dev *pdev)
{ {
struct drm_device *dev = pci_get_drvdata(pdev); struct drm_device *dev = pci_get_drvdata(pdev);
nouveau_fbcon_output_poll_changed(dev); drm_fb_helper_output_poll_changed(dev);
} }
static bool static bool
......
...@@ -4311,7 +4311,7 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev) ...@@ -4311,7 +4311,7 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev)
static const struct drm_mode_config_funcs static const struct drm_mode_config_funcs
nv50_disp_func = { nv50_disp_func = {
.fb_create = nouveau_user_framebuffer_create, .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_check = nv50_disp_atomic_check,
.atomic_commit = nv50_disp_atomic_commit, .atomic_commit = nv50_disp_atomic_commit,
.atomic_state_alloc = nv50_disp_atomic_state_alloc, .atomic_state_alloc = nv50_disp_atomic_state_alloc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment