drm/omapdrm: Remove fbdev from struct omap_drm_private

The DRM device stores a pointer to the fbdev helper. Remove struct
omap_drm_private.fbdev, which contains the same value. No functional
changes.

v2:
	* don't clear dev->fb_helper unnecessarily (Tomi)
	* include omap_fbdev.h in omap_fbdev.c (kernel test robot)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230403104035.15288-5-tzimmermann@suse.de
This commit is contained in:
Thomas Zimmermann 2023-04-03 12:40:34 +02:00 committed by Tomi Valkeinen
parent 194c9e2095
commit 8e3aac3bba
4 changed files with 6 additions and 12 deletions

View File

@ -47,15 +47,15 @@ static int fb_show(struct seq_file *m, void *arg)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct drm_device *dev = node->minor->dev;
struct omap_drm_private *priv = dev->dev_private;
struct drm_fb_helper *helper = dev->fb_helper;
struct drm_framebuffer *fb;
seq_printf(m, "fbcon ");
omap_framebuffer_describe(priv->fbdev->fb, m);
omap_framebuffer_describe(helper->fb, m);
mutex_lock(&dev->mode_config.fb_lock);
list_for_each_entry(fb, &dev->mode_config.fb_list, head) {
if (fb == priv->fbdev->fb)
if (fb == helper->fb)
continue;
seq_printf(m, "user ");

View File

@ -25,6 +25,7 @@
#include "omap_dmm_tiler.h"
#include "omap_drv.h"
#include "omap_fbdev.h"
#define DRIVER_NAME MODULE_NAME
#define DRIVER_DESC "OMAP DRM"

View File

@ -21,7 +21,6 @@
#include "omap_crtc.h"
#include "omap_encoder.h"
#include "omap_fb.h"
#include "omap_fbdev.h"
#include "omap_gem.h"
#include "omap_irq.h"
#include "omap_plane.h"
@ -77,8 +76,6 @@ struct omap_drm_private {
struct drm_private_obj glob_obj;
struct drm_fb_helper *fbdev;
struct workqueue_struct *wq;
/* lock for obj_list below */

View File

@ -13,6 +13,7 @@
#include <drm/drm_gem_framebuffer_helper.h>
#include "omap_drv.h"
#include "omap_fbdev.h"
MODULE_PARM_DESC(ywrap, "Enable ywrap scrolling (omap44xx and later, default 'y')");
static bool ywrap_enabled = true;
@ -250,8 +251,6 @@ void omap_fbdev_init(struct drm_device *dev)
if (ret)
goto fini;
priv->fbdev = helper;
return;
fini:
@ -265,8 +264,7 @@ fail:
void omap_fbdev_fini(struct drm_device *dev)
{
struct omap_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;
struct drm_gem_object *bo;
struct omap_fbdev *fbdev;
@ -296,6 +294,4 @@ void omap_fbdev_fini(struct drm_device *dev)
drm_fb_helper_unprepare(helper);
kfree(fbdev);
priv->fbdev = NULL;
}