summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-03-30 09:36:34 +0200
committerInki Dae <inki.dae@samsung.com>2023-04-17 16:47:55 +0900
commit99286486d67450f2189f7373c0d76c49ce6825f7 (patch)
treebbc04b383d1c6dd299081feff8c3a4c787058f6c /drivers
parent3bf3b53446d14003193a8804d0d1f3e1761b2be2 (diff)
downloadlinux-stable-99286486d67450f2189f7373c0d76c49ce6825f7.tar.gz
linux-stable-99286486d67450f2189f7373c0d76c49ce6825f7.tar.bz2
linux-stable-99286486d67450f2189f7373c0d76c49ce6825f7.zip
drm/exynos: Initialize fbdev DRM client
Initialize the fbdev client in the fbdev code with empty helper functions. Also clean up the client. The helpers will later implement various functionality of the DRM client. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fbdev.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 81f909cb5c9b..d1de49530c48 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -135,6 +135,30 @@ static const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {
.fb_probe = exynos_drm_fbdev_create,
};
+/*
+ * struct drm_client
+ */
+
+static void exynos_drm_fbdev_client_unregister(struct drm_client_dev *client)
+{ }
+
+static int exynos_drm_fbdev_client_restore(struct drm_client_dev *client)
+{
+ return 0;
+}
+
+static int exynos_drm_fbdev_client_hotplug(struct drm_client_dev *client)
+{
+ return 0;
+}
+
+static const struct drm_client_funcs exynos_drm_fbdev_client_funcs = {
+ .owner = THIS_MODULE,
+ .unregister = exynos_drm_fbdev_client_unregister,
+ .restore = exynos_drm_fbdev_client_restore,
+ .hotplug = exynos_drm_fbdev_client_hotplug,
+};
+
int exynos_drm_fbdev_init(struct drm_device *dev)
{
struct drm_fb_helper *helper;
@@ -149,11 +173,15 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, helper, PREFERRED_BPP, &exynos_drm_fb_helper_funcs);
+ ret = drm_client_init(dev, &helper->client, "exynos-fbdev", &exynos_drm_fbdev_client_funcs);
+ if (ret)
+ goto err_drm_fb_helper_unprepare;
+
ret = drm_fb_helper_init(dev, helper);
if (ret < 0) {
DRM_DEV_ERROR(dev->dev,
"failed to initialize drm fb helper.\n");
- goto err_init;
+ goto err_drm_client_release;
}
ret = drm_fb_helper_initial_config(helper);
@@ -167,7 +195,9 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
err_setup:
drm_fb_helper_fini(helper);
-err_init:
+err_drm_client_release:
+ drm_client_release(&helper->client);
+err_drm_fb_helper_unprepare:
drm_fb_helper_unprepare(helper);
kfree(helper);
@@ -199,6 +229,7 @@ void exynos_drm_fbdev_fini(struct drm_device *dev)
return;
exynos_drm_fbdev_destroy(dev, fb_helper);
+ drm_client_release(&fb_helper->client);
drm_fb_helper_unprepare(fb_helper);
kfree(fb_helper);
}