The DRM device stores a pointer to the fbdev helper. Remove struct
msm_drm_private.fbdev, which contains the same value. No functional
changes.
v2:
* test for fb_helper->fb in debugfs code
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/530559/
Link: https://lore.kernel.org/r/20230403124538.8497-6-tzimmermann@suse.de
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct drm_device *dev = node->minor->dev;
- struct msm_drm_private *priv = dev->dev_private;
struct drm_framebuffer *fb, *fbdev_fb = NULL;
- if (priv->fbdev) {
+ if (dev->fb_helper && dev->fb_helper->fb) {
seq_printf(m, "fbcon ");
- fbdev_fb = priv->fbdev->fb;
+ fbdev_fb = dev->fb_helper->fb;
msm_framebuffer_describe(fbdev_fb, m);
}
msm_rd_debugfs_cleanup(priv);
#ifdef CONFIG_DRM_FBDEV_EMULATION
- if (fbdev && priv->fbdev)
+ if (fbdev && ddev->fb_helper)
msm_fbdev_free(ddev);
#endif
#ifdef CONFIG_DRM_FBDEV_EMULATION
if (kms && fbdev)
- priv->fbdev = msm_fbdev_init(ddev);
+ msm_fbdev_init(ddev);
#endif
ret = msm_debugfs_late_init(ddev);
bool is_a2xx;
bool has_cached_coherent;
- struct drm_fb_helper *fbdev;
-
struct msm_rd_state *rd; /* debugfs to dump all submits */
struct msm_rd_state *hangrd; /* debugfs to dump hanging submits */
struct msm_perf_state *perf;
/* initialize fbdev helper */
struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
{
- struct msm_drm_private *priv = dev->dev_private;
struct drm_fb_helper *helper;
int ret;
if (ret)
goto fini;
- priv->fbdev = helper;
-
return helper;
fini:
void msm_fbdev_free(struct drm_device *dev)
{
- struct msm_drm_private *priv = dev->dev_private;
- struct drm_fb_helper *helper = priv->fbdev;
+ struct drm_fb_helper *helper = dev->fb_helper;
struct drm_framebuffer *fb = helper->fb;
DBG();
drm_fb_helper_unprepare(helper);
kfree(helper);
- priv->fbdev = NULL;
+ dev->fb_helper = NULL;
}