diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-16 10:37:37 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-03-31 11:18:42 -0400 |
commit | e317a69fe891382a8be712d4aa03bf01b9af229f (patch) | |
tree | 09f5c407542aca896f45f8959be32322fb36c281 /drivers/gpu/drm/radeon/radeon_drv.c | |
parent | 3a745f6ac13216f85c3804654f4c703995c17180 (diff) |
drm/radeon: Implement client-based fbdev emulation
Implement fbdev emulation on top of struct drm_client and its helpers.
Replaces ad-hoc interfaces for restoring and closing fbdev emulation with
per-client callbacks for hotplugging, restoring and unregistering.
A single function, radeon_fbdev_setup(), starts fbdev emulation after
the DRM device has been registered. Hence, fbdev acts like a regular
DRM client.
The setup call prepares the fbdev emulation and invokes connector
hotplugging. The first successful hotplug event initializes fbdev
emulation with a framebuffer, device file, etc.
Unregistering depends on the hotplug status. Fully initialized emulation
is cleaned up through drm_fb_helper_unregister_info() and fb_destroy.
For prepared-only setups, unregistering unprepares the emulation and
releases all resources. In both cases, fbdev emulation will be cleaned
up.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_drv.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 716ab85a376b..e4374814f0ef 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -341,6 +341,8 @@ static int radeon_pci_probe(struct pci_dev *pdev, if (ret) goto err_agp; + radeon_fbdev_setup(dev->dev_private); + return 0; err_agp: @@ -595,7 +597,6 @@ static const struct drm_driver kms_driver = { .load = radeon_driver_load_kms, .open = radeon_driver_open_kms, .postclose = radeon_driver_postclose_kms, - .lastclose = radeon_driver_lastclose_kms, .unload = radeon_driver_unload_kms, .ioctls = radeon_ioctls_kms, .num_ioctls = ARRAY_SIZE(radeon_ioctls_kms), |