drm/sti: Use drm_fbdev_generic_setup()
authorNoralf Trønnes <noralf@tronnes.org>
Sat, 8 Sep 2018 13:46:41 +0000 (15:46 +0200)
committerNoralf Trønnes <noralf@tronnes.org>
Tue, 25 Sep 2018 09:33:51 +0000 (11:33 +0200)
commit0f26e5ce3e62c66ec0717b22d82eee8e29fe7b4e
treea91e599c0bffba679923400b58735605143da1c4
parent30f7b5e7c26337520e0bbd6ef644a145c075c5a4
drm/sti: 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().

If drm_fbdev_generic_setup() fails, an error is printed by the function.

drm_fbdev_generic_setup() handles mode_config.num_connector being zero.
In that case it retries fbdev setup on the next .output_poll_changed.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-14-noralf@tronnes.org
drivers/gpu/drm/sti/sti_drv.c