Skip to content

Commit 9928648

Browse files
Thomas Zimmermanndaeinki
authored andcommitted
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 <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent 3bf3b53 commit 9928648

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

drivers/gpu/drm/exynos/exynos_drm_fbdev.c

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,30 @@ static const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {
135135
.fb_probe = exynos_drm_fbdev_create,
136136
};
137137

138+
/*
139+
* struct drm_client
140+
*/
141+
142+
static void exynos_drm_fbdev_client_unregister(struct drm_client_dev *client)
143+
{ }
144+
145+
static int exynos_drm_fbdev_client_restore(struct drm_client_dev *client)
146+
{
147+
return 0;
148+
}
149+
150+
static int exynos_drm_fbdev_client_hotplug(struct drm_client_dev *client)
151+
{
152+
return 0;
153+
}
154+
155+
static const struct drm_client_funcs exynos_drm_fbdev_client_funcs = {
156+
.owner = THIS_MODULE,
157+
.unregister = exynos_drm_fbdev_client_unregister,
158+
.restore = exynos_drm_fbdev_client_restore,
159+
.hotplug = exynos_drm_fbdev_client_hotplug,
160+
};
161+
138162
int exynos_drm_fbdev_init(struct drm_device *dev)
139163
{
140164
struct drm_fb_helper *helper;
@@ -149,11 +173,15 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
149173

150174
drm_fb_helper_prepare(dev, helper, PREFERRED_BPP, &exynos_drm_fb_helper_funcs);
151175

176+
ret = drm_client_init(dev, &helper->client, "exynos-fbdev", &exynos_drm_fbdev_client_funcs);
177+
if (ret)
178+
goto err_drm_fb_helper_unprepare;
179+
152180
ret = drm_fb_helper_init(dev, helper);
153181
if (ret < 0) {
154182
DRM_DEV_ERROR(dev->dev,
155183
"failed to initialize drm fb helper.\n");
156-
goto err_init;
184+
goto err_drm_client_release;
157185
}
158186

159187
ret = drm_fb_helper_initial_config(helper);
@@ -167,7 +195,9 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
167195

168196
err_setup:
169197
drm_fb_helper_fini(helper);
170-
err_init:
198+
err_drm_client_release:
199+
drm_client_release(&helper->client);
200+
err_drm_fb_helper_unprepare:
171201
drm_fb_helper_unprepare(helper);
172202
kfree(helper);
173203

@@ -199,6 +229,7 @@ void exynos_drm_fbdev_fini(struct drm_device *dev)
199229
return;
200230

201231
exynos_drm_fbdev_destroy(dev, fb_helper);
232+
drm_client_release(&fb_helper->client);
202233
drm_fb_helper_unprepare(fb_helper);
203234
kfree(fb_helper);
204235
}

0 commit comments

Comments
 (0)