summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_debugfs.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-04-03 14:45:38 +0200
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2023-04-06 20:29:40 +0300
commit940b869c2f2fb75696d7a3104b23caac9d5da841 (patch)
treef8064a2cbcf9715c590d825361d4600b8c228fa3 /drivers/gpu/drm/msm/msm_debugfs.c
parent841ef552b1410f9a6aa5f399ce794c3b0d6b6559 (diff)
downloadlinux-stable-940b869c2f2fb75696d7a3104b23caac9d5da841.tar.gz
linux-stable-940b869c2f2fb75696d7a3104b23caac9d5da841.tar.bz2
linux-stable-940b869c2f2fb75696d7a3104b23caac9d5da841.zip
drm/msm: Implement fbdev emulation as in-kernel client
Move code from ad-hoc fbdev callbacks into DRM client functions and remove the old callbacks. The functions instruct the client to poll for changed output or restore the display. The DRM core calls both, the old callbacks and the new client helpers, from the same places. The new functions perform the same operation as before, so there's no change in functionality. Replace all code that initializes or releases fbdev emulation throughout the driver. Instead initialize the fbdev client by a single call to msm_fbdev_setup() after msm has registered its DRM device. As in most drivers, msm's fbdev emulation now acts like a regular DRM client. The fbdev client setup consists of the initial preparation and the hot-plugging of the display. The latter creates the fbdev device and sets up the fbdev framebuffer. The setup performs display hot-plugging once. If no display can be detected, DRM probe helpers re-run the detection on each hotplug event. A call to drm_dev_unregister() releases the client automatically. No further action is required within msm. If the fbdev framebuffer has been fully set up, struct fb_ops.fb_destroy implements the release. For partially initialized emulation, the fbdev client reverts the initial setup. v2: * handle fbdev module parameter correctly (kernel test robot) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # RB5 Patchwork: https://patchwork.freedesktop.org/patch/530560/ Link: https://lore.kernel.org/r/20230403124538.8497-9-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_debugfs.c')
-rw-r--r--drivers/gpu/drm/msm/msm_debugfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c
index 7de9e39f051e..9c0e633a3a61 100644
--- a/drivers/gpu/drm/msm/msm_debugfs.c
+++ b/drivers/gpu/drm/msm/msm_debugfs.c
@@ -10,6 +10,7 @@
#include <linux/fault-inject.h>
#include <drm/drm_debugfs.h>
+#include <drm/drm_fb_helper.h>
#include <drm/drm_file.h>
#include <drm/drm_framebuffer.h>