Revert "drm/omap: dss: Remove unused omap_dss_device operations"
This reverts commit e086558ae9
("drm/omap: dss: Remove unused
omap_dss_device operations")
This is still needed by DSI. E.g. unloading modules without this will
cause a crash.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-2-tomi.valkeinen@ti.com
This commit is contained in:
parent
64ff189118
commit
12db515bae
@ -234,6 +234,18 @@ void omapdss_device_disconnect(struct omap_dss_device *src,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(omapdss_device_disconnect);
|
EXPORT_SYMBOL_GPL(omapdss_device_disconnect);
|
||||||
|
|
||||||
|
void omapdss_device_pre_enable(struct omap_dss_device *dssdev)
|
||||||
|
{
|
||||||
|
if (!dssdev)
|
||||||
|
return;
|
||||||
|
|
||||||
|
omapdss_device_pre_enable(dssdev->next);
|
||||||
|
|
||||||
|
if (dssdev->ops && dssdev->ops->pre_enable)
|
||||||
|
dssdev->ops->pre_enable(dssdev);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(omapdss_device_pre_enable);
|
||||||
|
|
||||||
void omapdss_device_enable(struct omap_dss_device *dssdev)
|
void omapdss_device_enable(struct omap_dss_device *dssdev)
|
||||||
{
|
{
|
||||||
if (!dssdev)
|
if (!dssdev)
|
||||||
@ -260,6 +272,20 @@ void omapdss_device_disable(struct omap_dss_device *dssdev)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(omapdss_device_disable);
|
EXPORT_SYMBOL_GPL(omapdss_device_disable);
|
||||||
|
|
||||||
|
void omapdss_device_post_disable(struct omap_dss_device *dssdev)
|
||||||
|
{
|
||||||
|
if (!dssdev)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (dssdev->ops && dssdev->ops->post_disable)
|
||||||
|
dssdev->ops->post_disable(dssdev);
|
||||||
|
|
||||||
|
omapdss_device_post_disable(dssdev->next);
|
||||||
|
|
||||||
|
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(omapdss_device_post_disable);
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Components Handling
|
* Components Handling
|
||||||
*/
|
*/
|
||||||
|
@ -346,11 +346,15 @@ struct omap_dss_device_ops {
|
|||||||
void (*disconnect)(struct omap_dss_device *dssdev,
|
void (*disconnect)(struct omap_dss_device *dssdev,
|
||||||
struct omap_dss_device *dst);
|
struct omap_dss_device *dst);
|
||||||
|
|
||||||
|
void (*pre_enable)(struct omap_dss_device *dssdev);
|
||||||
void (*enable)(struct omap_dss_device *dssdev);
|
void (*enable)(struct omap_dss_device *dssdev);
|
||||||
void (*disable)(struct omap_dss_device *dssdev);
|
void (*disable)(struct omap_dss_device *dssdev);
|
||||||
|
void (*post_disable)(struct omap_dss_device *dssdev);
|
||||||
|
|
||||||
int (*check_timings)(struct omap_dss_device *dssdev,
|
int (*check_timings)(struct omap_dss_device *dssdev,
|
||||||
struct drm_display_mode *mode);
|
struct drm_display_mode *mode);
|
||||||
|
void (*set_timings)(struct omap_dss_device *dssdev,
|
||||||
|
const struct drm_display_mode *mode);
|
||||||
|
|
||||||
int (*get_modes)(struct omap_dss_device *dssdev,
|
int (*get_modes)(struct omap_dss_device *dssdev,
|
||||||
struct drm_connector *connector);
|
struct drm_connector *connector);
|
||||||
@ -449,8 +453,10 @@ int omapdss_device_connect(struct dss_device *dss,
|
|||||||
struct omap_dss_device *dst);
|
struct omap_dss_device *dst);
|
||||||
void omapdss_device_disconnect(struct omap_dss_device *src,
|
void omapdss_device_disconnect(struct omap_dss_device *src,
|
||||||
struct omap_dss_device *dst);
|
struct omap_dss_device *dst);
|
||||||
|
void omapdss_device_pre_enable(struct omap_dss_device *dssdev);
|
||||||
void omapdss_device_enable(struct omap_dss_device *dssdev);
|
void omapdss_device_enable(struct omap_dss_device *dssdev);
|
||||||
void omapdss_device_disable(struct omap_dss_device *dssdev);
|
void omapdss_device_disable(struct omap_dss_device *dssdev);
|
||||||
|
void omapdss_device_post_disable(struct omap_dss_device *dssdev);
|
||||||
|
|
||||||
int omap_dss_get_num_overlay_managers(void);
|
int omap_dss_get_num_overlay_managers(void);
|
||||||
|
|
||||||
|
@ -113,8 +113,13 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
|
|||||||
bus_flags = connector->display_info.bus_flags;
|
bus_flags = connector->display_info.bus_flags;
|
||||||
omap_encoder_update_videomode_flags(&vm, bus_flags);
|
omap_encoder_update_videomode_flags(&vm, bus_flags);
|
||||||
|
|
||||||
/* Set timings for the dss manager. */
|
/* Set timings for all devices in the display pipeline. */
|
||||||
dss_mgr_set_timings(output, &vm);
|
dss_mgr_set_timings(output, &vm);
|
||||||
|
|
||||||
|
for (dssdev = output; dssdev; dssdev = dssdev->next) {
|
||||||
|
if (dssdev->ops && dssdev->ops->set_timings)
|
||||||
|
dssdev->ops->set_timings(dssdev, adjusted_mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap_encoder_disable(struct drm_encoder *encoder)
|
static void omap_encoder_disable(struct drm_encoder *encoder)
|
||||||
@ -127,10 +132,26 @@ static void omap_encoder_disable(struct drm_encoder *encoder)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable the chain of external devices, starting at the one at the
|
* Disable the chain of external devices, starting at the one at the
|
||||||
* internal encoder's output. This is used for DSI outputs only, as
|
* internal encoder's output.
|
||||||
* dssdev->next is NULL for all other outputs.
|
|
||||||
*/
|
*/
|
||||||
omapdss_device_disable(dssdev->next);
|
omapdss_device_disable(dssdev->next);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable the internal encoder. This will disable the DSS output. The
|
||||||
|
* DSI is treated as an exception as DSI pipelines still use the legacy
|
||||||
|
* flow where the pipeline output controls the encoder.
|
||||||
|
*/
|
||||||
|
if (dssdev->type != OMAP_DISPLAY_TYPE_DSI) {
|
||||||
|
if (dssdev->ops && dssdev->ops->disable)
|
||||||
|
dssdev->ops->disable(dssdev);
|
||||||
|
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Perform the post-disable operations on the chain of external devices
|
||||||
|
* to complete the display pipeline disable.
|
||||||
|
*/
|
||||||
|
omapdss_device_post_disable(dssdev->next);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap_encoder_enable(struct drm_encoder *encoder)
|
static void omap_encoder_enable(struct drm_encoder *encoder)
|
||||||
@ -141,10 +162,23 @@ static void omap_encoder_enable(struct drm_encoder *encoder)
|
|||||||
|
|
||||||
dev_dbg(dev->dev, "enable(%s)\n", dssdev->name);
|
dev_dbg(dev->dev, "enable(%s)\n", dssdev->name);
|
||||||
|
|
||||||
|
/* Prepare the chain of external devices for pipeline enable. */
|
||||||
|
omapdss_device_pre_enable(dssdev->next);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable the internal encoder. This will enable the DSS output. The
|
||||||
|
* DSI is treated as an exception as DSI pipelines still use the legacy
|
||||||
|
* flow where the pipeline output controls the encoder.
|
||||||
|
*/
|
||||||
|
if (dssdev->type != OMAP_DISPLAY_TYPE_DSI) {
|
||||||
|
if (dssdev->ops && dssdev->ops->enable)
|
||||||
|
dssdev->ops->enable(dssdev);
|
||||||
|
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable the chain of external devices, starting at the one at the
|
* Enable the chain of external devices, starting at the one at the
|
||||||
* internal encoder's output. This is used for DSI outputs only, as
|
* internal encoder's output.
|
||||||
* dssdev->next is NULL for all other outputs.
|
|
||||||
*/
|
*/
|
||||||
omapdss_device_enable(dssdev->next);
|
omapdss_device_enable(dssdev->next);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user