Skip to content

Commit

Permalink
imx-drm: imx-drm-core: provide common connector and encoder cleanup f…
Browse files Browse the repository at this point in the history
…unctions

Provide two helper functions to assist with cleaning up imx-drm
connectors and encoders.

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Feb 24, 2014
1 parent 9e2d410 commit 8a51a33
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/staging/imx-drm/imx-drm-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,19 @@ static void imx_drm_connector_unregister(
drm_mode_group_reinit(imxdrm->drm);
}

void imx_drm_connector_destroy(struct drm_connector *connector)
{
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
}
EXPORT_SYMBOL_GPL(imx_drm_connector_destroy);

void imx_drm_encoder_destroy(struct drm_encoder *encoder)
{
drm_encoder_cleanup(encoder);
}
EXPORT_SYMBOL_GPL(imx_drm_encoder_destroy);

static struct drm_mode_config_funcs imx_drm_mode_config_funcs = {
.fb_create = drm_fb_cma_create,
};
Expand Down
3 changes: 3 additions & 0 deletions drivers/staging/imx-drm/imx-drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
struct drm_crtc;
struct drm_connector;
struct drm_device;
struct drm_display_mode;
struct drm_encoder;
struct imx_drm_crtc;
struct drm_fbdev_cma;
Expand Down Expand Up @@ -69,5 +70,7 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,

int imx_drm_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode);
void imx_drm_connector_destroy(struct drm_connector *connector);
void imx_drm_encoder_destroy(struct drm_encoder *encoder);

#endif /* _IMX_DRM_H_ */

0 comments on commit 8a51a33

Please sign in to comment.