]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/exynos: remove mode property of exynos crtc
authorJoonyoung Shim <jy0922.shim@samsung.com>
Thu, 5 Feb 2015 07:11:36 +0000 (16:11 +0900)
committerInki Dae <inki.dae@samsung.com>
Mon, 9 Feb 2015 14:56:34 +0000 (23:56 +0900)
This was added by commit 3b8d1cf818c2 ("drm/exynos: add property for
crtc mode"). Currently we can control a plane used for crtc using
primary plane by universal plane feature. Stop to use non-standard
property to control primary plane.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_drv.h

index fff2e5545846c2a102402b4f98609794617cd0d8..48ccab7fdf63e51888b422d7dd8175c66bda440d 100644 (file)
@@ -232,70 +232,12 @@ static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
        kfree(exynos_crtc);
 }
 
        kfree(exynos_crtc);
 }
 
-static int exynos_drm_crtc_set_property(struct drm_crtc *crtc,
-                                       struct drm_property *property,
-                                       uint64_t val)
-{
-       struct drm_device *dev = crtc->dev;
-       struct exynos_drm_private *dev_priv = dev->dev_private;
-       struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
-
-       if (property == dev_priv->crtc_mode_property) {
-               enum exynos_crtc_mode mode = val;
-
-               if (mode == exynos_crtc->mode)
-                       return 0;
-
-               exynos_crtc->mode = mode;
-
-               switch (mode) {
-               case CRTC_MODE_NORMAL:
-                       exynos_drm_crtc_commit(crtc);
-                       break;
-               case CRTC_MODE_BLANK:
-                       exynos_plane_dpms(crtc->primary, DRM_MODE_DPMS_OFF);
-                       break;
-               default:
-                       break;
-               }
-
-               return 0;
-       }
-
-       return -EINVAL;
-}
-
 static struct drm_crtc_funcs exynos_crtc_funcs = {
        .set_config     = drm_crtc_helper_set_config,
        .page_flip      = exynos_drm_crtc_page_flip,
        .destroy        = exynos_drm_crtc_destroy,
 static struct drm_crtc_funcs exynos_crtc_funcs = {
        .set_config     = drm_crtc_helper_set_config,
        .page_flip      = exynos_drm_crtc_page_flip,
        .destroy        = exynos_drm_crtc_destroy,
-       .set_property   = exynos_drm_crtc_set_property,
-};
-
-static const struct drm_prop_enum_list mode_names[] = {
-       { CRTC_MODE_NORMAL, "normal" },
-       { CRTC_MODE_BLANK, "blank" },
 };
 
 };
 
-static void exynos_drm_crtc_attach_mode_property(struct drm_crtc *crtc)
-{
-       struct drm_device *dev = crtc->dev;
-       struct exynos_drm_private *dev_priv = dev->dev_private;
-       struct drm_property *prop;
-
-       prop = dev_priv->crtc_mode_property;
-       if (!prop) {
-               prop = drm_property_create_enum(dev, 0, "mode", mode_names,
-                                               ARRAY_SIZE(mode_names));
-               if (!prop)
-                       return;
-
-               dev_priv->crtc_mode_property = prop;
-       }
-
-       drm_object_attach_property(&crtc->base, prop, 0);
-}
-
 struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
                                               int pipe,
                                               enum exynos_drm_output_type type,
 struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
                                               int pipe,
                                               enum exynos_drm_output_type type,
@@ -338,8 +280,6 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
 
        drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs);
 
 
        drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs);
 
-       exynos_drm_crtc_attach_mode_property(crtc);
-
        return exynos_crtc;
 
 err_crtc:
        return exynos_crtc;
 
 err_crtc:
index d490b49f71c9ece60fd24cb7947c7bd81ece3a2b..1aceafce7bbfd6eeed0fab6aaf77e28b70f1d0e4 100644 (file)
@@ -197,11 +197,6 @@ struct exynos_drm_crtc_ops {
        void (*te_handler)(struct exynos_drm_crtc *crtc);
 };
 
        void (*te_handler)(struct exynos_drm_crtc *crtc);
 };
 
-enum exynos_crtc_mode {
-       CRTC_MODE_NORMAL,       /* normal mode */
-       CRTC_MODE_BLANK,        /* The private plane of crtc is blank */
-};
-
 /*
  * Exynos specific crtc structure.
  *
 /*
  * Exynos specific crtc structure.
  *
@@ -215,7 +210,6 @@ enum exynos_crtc_mode {
  *     we can refer to the crtc to current hardware interrupt occurred through
  *     this pipe value.
  * @dpms: store the crtc dpms value
  *     we can refer to the crtc to current hardware interrupt occurred through
  *     this pipe value.
  * @dpms: store the crtc dpms value
- * @mode: store the crtc mode value
  * @ops: pointer to callbacks for exynos drm specific functionality
  * @ctx: A pointer to the crtc's implementation specific context
  */
  * @ops: pointer to callbacks for exynos drm specific functionality
  * @ctx: A pointer to the crtc's implementation specific context
  */
@@ -224,7 +218,6 @@ struct exynos_drm_crtc {
        enum exynos_drm_output_type     type;
        unsigned int                    pipe;
        unsigned int                    dpms;
        enum exynos_drm_output_type     type;
        unsigned int                    pipe;
        unsigned int                    dpms;
-       enum exynos_crtc_mode           mode;
        wait_queue_head_t               pending_flip_queue;
        atomic_t                        pending_flip;
        struct exynos_drm_crtc_ops      *ops;
        wait_queue_head_t               pending_flip_queue;
        atomic_t                        pending_flip;
        struct exynos_drm_crtc_ops      *ops;
@@ -265,7 +258,6 @@ struct exynos_drm_private {
         */
        struct drm_crtc *crtc[MAX_CRTC];
        struct drm_property *plane_zpos_property;
         */
        struct drm_crtc *crtc[MAX_CRTC];
        struct drm_property *plane_zpos_property;
-       struct drm_property *crtc_mode_property;
 
        unsigned long da_start;
        unsigned long da_space_size;
 
        unsigned long da_start;
        unsigned long da_space_size;