mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 09:02:21 -04:00
drm/tilcdc: Remove the useless module list support
The tilcdc driver previously supported a sub-module system where external display drivers (panels, encoders) could register themselves through tilcdc_module_init() and be automatically initialized through a module list. This infrastructure became unused after the component framework support and panel driver was removed. Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com> Link: https://patch.msgid.link/20260123-feature_tilcdc-v5-13-5a44d2aa3f6f@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
committed by
Luca Ceresoli
parent
cb18dbb74f
commit
8fcc0eb34d
@@ -7,7 +7,6 @@
|
||||
/* LCDC DRM driver, based on da8xx-fb */
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
@@ -34,8 +33,6 @@ enum tilcdc_variant {
|
||||
DA850_TILCDC,
|
||||
};
|
||||
|
||||
static LIST_HEAD(module_list);
|
||||
|
||||
static const u32 tilcdc_rev1_formats[] = { DRM_FORMAT_RGB565 };
|
||||
|
||||
static const u32 tilcdc_straight_formats[] = { DRM_FORMAT_RGB565,
|
||||
@@ -50,20 +47,6 @@ static const u32 tilcdc_legacy_formats[] = { DRM_FORMAT_RGB565,
|
||||
DRM_FORMAT_RGB888,
|
||||
DRM_FORMAT_XRGB8888 };
|
||||
|
||||
void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
|
||||
const struct tilcdc_module_ops *funcs)
|
||||
{
|
||||
mod->name = name;
|
||||
mod->funcs = funcs;
|
||||
INIT_LIST_HEAD(&mod->list);
|
||||
list_add(&mod->list, &module_list);
|
||||
}
|
||||
|
||||
void tilcdc_module_cleanup(struct tilcdc_module *mod)
|
||||
{
|
||||
list_del(&mod->list);
|
||||
}
|
||||
|
||||
static int tilcdc_atomic_check(struct drm_device *dev,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
@@ -97,12 +80,6 @@ static const struct drm_mode_config_funcs mode_config_funcs = {
|
||||
static void modeset_init(struct drm_device *dev)
|
||||
{
|
||||
struct tilcdc_drm_private *priv = dev->dev_private;
|
||||
struct tilcdc_module *mod;
|
||||
|
||||
list_for_each_entry(mod, &module_list, list) {
|
||||
DBG("loading module: %s", mod->name);
|
||||
mod->funcs->modeset_init(mod, dev);
|
||||
}
|
||||
|
||||
dev->mode_config.min_width = 0;
|
||||
dev->mode_config.min_height = 0;
|
||||
@@ -465,15 +442,9 @@ static struct drm_info_list tilcdc_debugfs_list[] = {
|
||||
|
||||
static void tilcdc_debugfs_init(struct drm_minor *minor)
|
||||
{
|
||||
struct tilcdc_module *mod;
|
||||
|
||||
drm_debugfs_create_files(tilcdc_debugfs_list,
|
||||
ARRAY_SIZE(tilcdc_debugfs_list),
|
||||
minor->debugfs_root, minor);
|
||||
|
||||
list_for_each_entry(mod, &module_list, list)
|
||||
if (mod->funcs->debugfs_init)
|
||||
mod->funcs->debugfs_init(mod, minor);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -81,33 +81,6 @@ struct tilcdc_drm_private {
|
||||
bool irq_enabled;
|
||||
};
|
||||
|
||||
/* Sub-module for display. Since we don't know at compile time what panels
|
||||
* or display adapter(s) might be present (for ex, off chip dvi/tfp410,
|
||||
* hdmi encoder, various lcd panels), the connector/encoder(s) are split into
|
||||
* separate drivers. If they are probed and found to be present, they
|
||||
* register themselves with tilcdc_register_module().
|
||||
*/
|
||||
struct tilcdc_module;
|
||||
|
||||
struct tilcdc_module_ops {
|
||||
/* create appropriate encoders/connectors: */
|
||||
int (*modeset_init)(struct tilcdc_module *mod, struct drm_device *dev);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
/* create debugfs nodes (can be NULL): */
|
||||
int (*debugfs_init)(struct tilcdc_module *mod, struct drm_minor *minor);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct tilcdc_module {
|
||||
const char *name;
|
||||
struct list_head list;
|
||||
const struct tilcdc_module_ops *funcs;
|
||||
};
|
||||
|
||||
void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
|
||||
const struct tilcdc_module_ops *funcs);
|
||||
void tilcdc_module_cleanup(struct tilcdc_module *mod);
|
||||
|
||||
#define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
|
||||
|
||||
int tilcdc_crtc_create(struct drm_device *dev);
|
||||
|
||||
Reference in New Issue
Block a user