mbox series

[0/6] drm/msm: Convert fbdev to DRM client

Message ID 20230330074150.7637-1-tzimmermann@suse.de
Headers show
Series drm/msm: Convert fbdev to DRM client | expand

Message

Thomas Zimmermann March 30, 2023, 7:41 a.m. UTC
Convert msm' fbdev code to struct drm_client. Replaces the current
ad-hoc integration. The conversion includes a number of cleanups. As
with most other drivers' fbdev emulation, fbdev in msm is now just
another DRM client that runs after the DRM device has been registered.

Once all drivers' fbdev emulation has been converted to struct drm_client,
we can attempt to add additional in-kernel clients. A DRM-based dmesg
log or a bootsplash are commonly mentioned. DRM can then switch easily
among the existing clients if/when required.

I did the conversion from similar experience with other drivers. But I
don't have the hardware to test this. Any testing is welcome.

Thomas Zimmermann (6):
  drm/msm: Clear aperture ownership outside of fbdev code
  drm/msm: Remove fb from struct msm_fbdev
  drm/msm: Remove struct msm_fbdev
  drm/msm: Remove fbdev from struct msm_drm_private
  drm/msm: Initialize fbdev DRM client
  drm/msm: Implement fbdev emulation as in-kernel client

 drivers/gpu/drm/msm/msm_debugfs.c |   6 +-
 drivers/gpu/drm/msm/msm_drv.c     |  21 ++--
 drivers/gpu/drm/msm/msm_drv.h     |  12 ++-
 drivers/gpu/drm/msm/msm_fbdev.c   | 168 ++++++++++++++++++------------
 4 files changed, 118 insertions(+), 89 deletions(-)

Comments

Dmitry Baryshkov March 30, 2023, 9:46 a.m. UTC | #1
On Thu, 30 Mar 2023 at 10:41, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Convert msm' fbdev code to struct drm_client. Replaces the current
> ad-hoc integration. The conversion includes a number of cleanups. As
> with most other drivers' fbdev emulation, fbdev in msm is now just
> another DRM client that runs after the DRM device has been registered.
>
> Once all drivers' fbdev emulation has been converted to struct drm_client,
> we can attempt to add additional in-kernel clients. A DRM-based dmesg
> log or a bootsplash are commonly mentioned. DRM can then switch easily
> among the existing clients if/when required.
>
> I did the conversion from similar experience with other drivers. But I
> don't have the hardware to test this. Any testing is welcome.

Thank you for your patches! It was on my to do list for quite a while,
but nobody had time to work on it.

>
> Thomas Zimmermann (6):
>   drm/msm: Clear aperture ownership outside of fbdev code
>   drm/msm: Remove fb from struct msm_fbdev
>   drm/msm: Remove struct msm_fbdev
>   drm/msm: Remove fbdev from struct msm_drm_private
>   drm/msm: Initialize fbdev DRM client
>   drm/msm: Implement fbdev emulation as in-kernel client
>
>  drivers/gpu/drm/msm/msm_debugfs.c |   6 +-
>  drivers/gpu/drm/msm/msm_drv.c     |  21 ++--
>  drivers/gpu/drm/msm/msm_drv.h     |  12 ++-
>  drivers/gpu/drm/msm/msm_fbdev.c   | 168 ++++++++++++++++++------------
>  4 files changed, 118 insertions(+), 89 deletions(-)
>
> --
> 2.40.0
>
Dmitry Baryshkov March 30, 2023, 10:01 a.m. UTC | #2
On Thu, 30 Mar 2023 at 10:41, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> The DRM device stores a pointer to the fbdev helper. Remove struct
> msm_drm_private.fbdev, which contains the same value. No functional
> changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/msm/msm_debugfs.c | 5 ++---
>  drivers/gpu/drm/msm/msm_drv.c     | 4 ++--
>  drivers/gpu/drm/msm/msm_drv.h     | 2 --
>  drivers/gpu/drm/msm/msm_fbdev.c   | 8 ++------
>  4 files changed, 6 insertions(+), 13 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>