[Freedreno] [PATCH v2 8/8] drm/msm: Implement fbdev emulation as in-kernel client
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Tue Apr 4 21:46:55 UTC 2023
On 03/04/2023 15:45, Thomas Zimmermann wrote:
> 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 at suse.de>
> ---
> drivers/gpu/drm/msm/msm_debugfs.c | 1 +
> drivers/gpu/drm/msm/msm_drv.c | 15 +---
> drivers/gpu/drm/msm/msm_drv.h | 10 ++-
> drivers/gpu/drm/msm/msm_fbdev.c | 115 ++++++++++++++++++------------
> 4 files changed, 81 insertions(+), 60 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org> # RB5
--
With best wishes
Dmitry
More information about the Freedreno
mailing list