drm_object_attach_property(&crtc->base, prop, 0);
}
-int exynos_drm_crtc_create(struct exynos_drm_manager *manager, int pipe,
+int exynos_drm_crtc_create(struct exynos_drm_manager *manager,
+ struct drm_device *drm_dev, int pipe,
enum exynos_drm_output_type type)
{
struct exynos_drm_crtc *exynos_crtc;
struct drm_plane *plane;
- struct exynos_drm_private *private = manager->drm_dev->dev_private;
+ struct exynos_drm_private *private = drm_dev->dev_private;
struct drm_crtc *crtc;
int ret;
exynos_crtc->manager = manager;
exynos_crtc->pipe = pipe;
exynos_crtc->type = type;
- plane = exynos_plane_init(manager->drm_dev, 1 << pipe,
+ plane = exynos_plane_init(drm_dev, 1 << pipe,
DRM_PLANE_TYPE_PRIMARY);
if (IS_ERR(plane)) {
ret = PTR_ERR(plane);
private->crtc[pipe] = crtc;
- ret = drm_crtc_init_with_planes(manager->drm_dev, crtc, plane, NULL,
+ ret = drm_crtc_init_with_planes(drm_dev, crtc, plane, NULL,
&exynos_crtc_funcs);
if (ret < 0)
goto err_crtc;
#include "exynos_drm_drv.h"
-int exynos_drm_crtc_create(struct exynos_drm_manager *manager, int pipe,
+int exynos_drm_crtc_create(struct exynos_drm_manager *manager,
+ struct drm_device *drm_dev, int pipe,
enum exynos_drm_output_type type);
int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe);
void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int pipe);
*/
struct exynos_drm_manager {
struct list_head list;
- struct drm_device *drm_dev;
struct drm_crtc *crtc;
struct exynos_drm_manager_ops *ops;
};
struct exynos_drm_private *priv;
priv = drm_dev->dev_private;
- mgr->drm_dev = ctx->drm_dev = drm_dev;
+ ctx->drm_dev = drm_dev;
ctx->pipe = priv->pipe++;
/* attach this sub driver to iommu mapping if supported. */
struct drm_device *drm_dev = data;
fimd_mgr_initialize(&ctx->manager, drm_dev);
- exynos_drm_crtc_create(&ctx->manager, ctx->pipe,
+ exynos_drm_crtc_create(&ctx->manager, drm_dev, ctx->pipe,
EXYNOS_DISPLAY_TYPE_LCD);
if (ctx->display)
exynos_drm_create_enc_conn(drm_dev, ctx->display);
struct vidi_context *ctx = manager_to_vidi(mgr);
struct exynos_drm_private *priv = drm_dev->dev_private;
- mgr->drm_dev = ctx->drm_dev = drm_dev;
+ ctx->drm_dev = drm_dev;
ctx->pipe = priv->pipe++;
return 0;
vidi_mgr_initialize(&ctx->manager, drm_dev);
- ret = exynos_drm_crtc_create(&ctx->manager, ctx->pipe,
+ ret = exynos_drm_crtc_create(&ctx->manager, drm_dev, ctx->pipe,
EXYNOS_DISPLAY_TYPE_VIDI);
if (ret) {
DRM_ERROR("failed to create crtc.\n");
struct exynos_drm_private *priv;
priv = drm_dev->dev_private;
- mgr->drm_dev = mixer_ctx->drm_dev = drm_dev;
+ mixer_ctx->drm_dev = drm_dev;
mixer_ctx->pipe = priv->pipe++;
/* acquire resources: regs, irqs, clocks */
if (ret)
return ret;
- ret = exynos_drm_crtc_create(&ctx->manager, ctx->pipe,
+ ret = exynos_drm_crtc_create(&ctx->manager, drm_dev, ctx->pipe,
EXYNOS_DISPLAY_TYPE_HDMI);
if (ret) {
mixer_mgr_remove(&ctx->manager);