drm/exynos: add is_local member in exynos_drm_subdrv struct
authorJoonyoung Shim <jy0922.shim@samsung.com>
Fri, 16 Mar 2012 09:47:10 +0000 (18:47 +0900)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Mar 2012 09:40:25 +0000 (09:40 +0000)
The is_local member indicates unused subdrv such connector and encoder
so doesn't make resources for them.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/exynos/exynos_drm_core.c
drivers/gpu/drm/exynos/exynos_drm_drv.h

index 4e29c7174ac5d02c8333b8176b74ef77846164c4..411832e8e17aa9fcd9eed13fc614be878f781403 100644 (file)
@@ -59,6 +59,9 @@ static int exynos_drm_subdrv_probe(struct drm_device *dev,
                        return ret;
        }
 
+       if (subdrv->is_local)
+               return 0;
+
        /* create and initialize a encoder for this sub driver. */
        encoder = exynos_drm_encoder_create(dev, &subdrv->manager,
                        (1 << MAX_CRTC) - 1);
index a41245402ce45ec267bb9c67ac8377875c8e0bf4..b26c2f4425d1e6bf2a4cf911e3f54382900714e8 100644 (file)
@@ -225,6 +225,7 @@ struct exynos_drm_private {
  * @list: sub driver has its own list object to register to exynos drm driver.
  * @drm_dev: pointer to drm_device and this pointer would be set
  *     when sub driver calls exynos_drm_subdrv_register().
+ * @is_local: appear encoder and connector disrelated device.
  * @probe: this callback would be called by exynos drm driver after
  *     subdrv is registered to it.
  * @remove: this callback is used to release resources created
@@ -239,6 +240,7 @@ struct exynos_drm_private {
 struct exynos_drm_subdrv {
        struct list_head list;
        struct drm_device *drm_dev;
+       bool is_local;
 
        int (*probe)(struct drm_device *drm_dev, struct device *dev);
        void (*remove)(struct drm_device *dev);