]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/exynos: kill exynos_drm_crtc::pipe
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 29 May 2017 01:05:25 +0000 (10:05 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 1 Jun 2017 07:21:34 +0000 (16:21 +0900)
Since crtc index is stored in drm_crtc pipe field became redundant.
The patch beside removing the field simplifies also
exynos_drm_crtc_get_pipe_from_type.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
drivers/gpu/drm/exynos/exynos7_drm_decon.c
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_crtc.h
drivers/gpu/drm/exynos/exynos_drm_drv.h
drivers/gpu/drm/exynos/exynos_drm_fimd.c
drivers/gpu/drm/exynos/exynos_drm_vidi.c
drivers/gpu/drm/exynos/exynos_mixer.c

index bae3eb5eb2fa9a9cac6d5006dedd6fdb2052a288..70677bbf3ca602eb378a1ffbe153022048423a92 100644 (file)
@@ -614,8 +614,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
        out_type = (ctx->out_type & IFTYPE_HDMI) ? EXYNOS_DISPLAY_TYPE_HDMI
                                                  : EXYNOS_DISPLAY_TYPE_LCD;
        ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
-                                       ctx->pipe, out_type,
-                                       &decon_crtc_ops, ctx);
+                       out_type, &decon_crtc_ops, ctx);
        if (IS_ERR(ctx->crtc)) {
                ret = PTR_ERR(ctx->crtc);
                goto err;
index 48811806fa2727c540e5f5e9d0ffb1700dc08c4f..0ccb33473903f697738677324ccb8f878f4d9caf 100644 (file)
@@ -656,8 +656,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
 
        exynos_plane = &ctx->planes[DEFAULT_WIN];
        ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
-                                          ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD,
-                                          &decon_crtc_ops, ctx);
+                       EXYNOS_DISPLAY_TYPE_LCD, &decon_crtc_ops, ctx);
        if (IS_ERR(ctx->crtc)) {
                decon_ctx_remove(ctx);
                return PTR_ERR(ctx->crtc);
index c02378b91332410e4cc1026eb693aaf76e351c45..2d0aa11f19efcf434537873bd459ed729f9e497c 100644 (file)
@@ -166,7 +166,6 @@ static const struct drm_crtc_funcs exynos_crtc_funcs = {
 
 struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
                                        struct drm_plane *plane,
-                                       int pipe,
                                        enum exynos_drm_output_type type,
                                        const struct exynos_drm_crtc_ops *ops,
                                        void *ctx)
@@ -179,7 +178,6 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
        if (!exynos_crtc)
                return ERR_PTR(-ENOMEM);
 
-       exynos_crtc->pipe = pipe;
        exynos_crtc->type = type;
        exynos_crtc->ops = ops;
        exynos_crtc->ctx = ctx;
@@ -206,13 +204,9 @@ int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev,
 {
        struct drm_crtc *crtc;
 
-       list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head) {
-               struct exynos_drm_crtc *exynos_crtc;
-
-               exynos_crtc = to_exynos_crtc(crtc);
-               if (exynos_crtc->type == out_type)
-                       return exynos_crtc->pipe;
-       }
+       drm_for_each_crtc(crtc, drm_dev)
+               if (to_exynos_crtc(crtc)->type == out_type)
+                       return drm_crtc_index(crtc);
 
        return -EPERM;
 }
index 9634fe5ad5fe5a09ce220b7113e2650915bab21e..ef58b64e3d2d4f65f2e9df202ca87d0911690367 100644 (file)
@@ -19,7 +19,6 @@
 
 struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
                                        struct drm_plane *plane,
-                                       int pipe,
                                        enum exynos_drm_output_type type,
                                        const struct exynos_drm_crtc_ops *ops,
                                        void *context);
index 24ce016914e0e307c539748515b8685cc34ed677..006cfa8b40c23689af915ce9de9d76fe12913ff4 100644 (file)
@@ -154,13 +154,6 @@ struct exynos_drm_clk {
  *
  * @base: crtc object.
  * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI.
- * @pipe: a crtc index created at load() with a new crtc object creation
- *     and the crtc object would be set to private->crtc array
- *     to get a crtc object corresponding to this pipe from private->crtc
- *     array when irq interrupt occurred. the reason of using this pipe is that
- *     drm framework doesn't support multiple irq yet.
- *     we can refer to the crtc to current hardware interrupt occurred through
- *     this pipe value.
  * @ops: pointer to callbacks for exynos drm specific functionality
  * @ctx: A pointer to the crtc's implementation specific context
  * @pipe_clk: A pointer to the crtc's pipeline clock.
@@ -168,7 +161,6 @@ struct exynos_drm_clk {
 struct exynos_drm_crtc {
        struct drm_crtc                 base;
        enum exynos_drm_output_type     type;
-       unsigned int                    pipe;
        const struct exynos_drm_crtc_ops        *ops;
        void                            *ctx;
        struct exynos_drm_clk           *pipe_clk;
index 3f04d72c448d386fc9f646e1033c8528406b107e..93bdfbb51275c04e2bacb033e946ac23fd54b50a 100644 (file)
@@ -1003,8 +1003,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
 
        exynos_plane = &ctx->planes[DEFAULT_WIN];
        ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
-                                          ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD,
-                                          &fimd_crtc_ops, ctx);
+                       EXYNOS_DISPLAY_TYPE_LCD, &fimd_crtc_ops, ctx);
        if (IS_ERR(ctx->crtc))
                return PTR_ERR(ctx->crtc);
 
index ef86dbf1cc29b07a4f9c5378098f8f4dd9fdc078..5e37bb00457374a0b29e4879b33909aa8e2ef43f 100644 (file)
@@ -416,8 +416,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
 
        exynos_plane = &ctx->planes[DEFAULT_WIN];
        ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
-                                          ctx->pipe, EXYNOS_DISPLAY_TYPE_VIDI,
-                                          &vidi_crtc_ops, ctx);
+                       EXYNOS_DISPLAY_TYPE_VIDI, &vidi_crtc_ops, ctx);
        if (IS_ERR(ctx->crtc)) {
                DRM_ERROR("failed to create crtc.\n");
                return PTR_ERR(ctx->crtc);
index 25edb635a197621871d583e26b3d31d3717a82fa..3fb8cf3f1a43a935b3d94e1ccbdda6524af7f363 100644 (file)
@@ -1165,8 +1165,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
 
        exynos_plane = &ctx->planes[DEFAULT_WIN];
        ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
-                                          ctx->pipe, EXYNOS_DISPLAY_TYPE_HDMI,
-                                          &mixer_crtc_ops, ctx);
+                       EXYNOS_DISPLAY_TYPE_HDMI, &mixer_crtc_ops, ctx);
        if (IS_ERR(ctx->crtc)) {
                mixer_ctx_remove(ctx);
                ret = PTR_ERR(ctx->crtc);