diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-30 11:36:06 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2023-04-06 13:18:56 +0300 |
commit | 25dda38e0b07941f291a442ac470b0637b7b3e60 (patch) | |
tree | 13aceab7eeb4424d30c93b7f15b4e5b6f1844ffb /drivers/gpu | |
parent | 1ac45068af9d6994dd6679bfbd0ff6cb0fc076da (diff) | |
download | linux-25dda38e0b07941f291a442ac470b0637b7b3e60.tar.xz |
drm/tegra: 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>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/tegra/fbdev.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c index 1c22d0fb4055..6ff7106f440e 100644 --- a/drivers/gpu/drm/tegra/fbdev.c +++ b/drivers/gpu/drm/tegra/fbdev.c @@ -126,6 +126,30 @@ static const struct drm_fb_helper_funcs tegra_fb_helper_funcs = { .fb_probe = tegra_fbdev_probe, }; +/* + * struct drm_client + */ + +static void tegra_fbdev_client_unregister(struct drm_client_dev *client) +{ } + +static int tregra_fbdev_client_restore(struct drm_client_dev *client) +{ + return 0; +} + +static int tegra_fbdev_client_hotplug(struct drm_client_dev *client) +{ + return 0; +} + +static const struct drm_client_funcs tegra_fbdev_client_funcs = { + .owner = THIS_MODULE, + .unregister = tegra_fbdev_client_unregister, + .restore = tegra_fbdev_client_restore, + .hotplug = tegra_fbdev_client_hotplug, +}; + static struct drm_fb_helper *tegra_fbdev_create(struct drm_device *drm) { struct drm_fb_helper *helper; @@ -152,11 +176,15 @@ static int tegra_fbdev_init(struct drm_fb_helper *helper, struct drm_device *drm = helper->dev; int err; + err = drm_client_init(dev, &helper->client, "fbdev", &tegra_fbdev_client_funcs); + if (err) + return err; + err = drm_fb_helper_init(drm, helper); if (err < 0) { dev_err(drm->dev, "failed to initialize DRM FB helper: %d\n", err); - return err; + goto err_drm_client_release; } err = drm_fb_helper_initial_config(helper); @@ -170,6 +198,8 @@ static int tegra_fbdev_init(struct drm_fb_helper *helper, fini: drm_fb_helper_fini(helper); +err_drm_client_release: + drm_client_release(&helper->client); return err; } @@ -192,6 +222,7 @@ static void tegra_fbdev_exit(struct drm_fb_helper *helper) } drm_fb_helper_fini(helper); + drm_client_release(&helper->client); tegra_fbdev_free(helper); } |