]> git.baikalelectronics.ru Git - kernel.git/commit
drm/pl111: Use drm_fbdev_generic_setup()
authorNoralf Trønnes <noralf@tronnes.org>
Sat, 8 Sep 2018 13:46:40 +0000 (15:46 +0200)
committerNoralf Trønnes <noralf@tronnes.org>
Tue, 25 Sep 2018 09:33:06 +0000 (11:33 +0200)
commitf0647527a44b2d8b6581d14974cdb6f94e3a5f38
tree6ac920d95d17b9fe2c9f7004d568838a6015f4b9
parent3513b0e291b3a3835c15703ee0d47711c51b9bf1
drm/pl111: Use drm_fbdev_generic_setup()

The CMA helper is already using the drm_fb_helper_generic_probe part of
the generic fbdev emulation. This patch makes full use of the generic
fbdev emulation by using its drm_client callbacks. This means that
drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are
now handled by the emulation code. Additionally fbdev unregister happens
automatically on drm_dev_unregister().

The drm_fbdev_generic_setup() call is put after drm_dev_register() in the
driver. This is done to highlight the fact that fbdev emulation is an
internal client that makes use of the driver, it is not part of the
driver as such. If fbdev setup fails, an error is printed, but the driver
succeeds probing.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-13-noralf@tronnes.org
drivers/gpu/drm/pl111/pl111_drv.c