summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_vidi.c
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2017-03-15 15:41:06 +0100
committerInki Dae <inki.dae@samsung.com>2017-06-01 16:21:34 +0900
commit2949390eb1be95633afdc39923f53ea5b326242a (patch)
tree04d8a88a09e47afe12e519f122b3ae2341637467 /drivers/gpu/drm/exynos/exynos_drm_vidi.c
parent2c82607b56ad7035077dbb0d37093d8f2b21e235 (diff)
drm/exynos: kill pipe field from drivers contexts
Since possible_crtcs are set by Exynos core helper pipe fields have no raison d'etre. The only place it was used, as a hack, is fimd_clear_channels, to avoid calling drm_crtc_handle_vblank, but DRM core has already other protection mechanism (vblank->enabled), so it could be safely removed. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_vidi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 92ebeaf50cdb..cb8a72842537 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -51,7 +51,6 @@ struct vidi_context {
bool suspended;
struct timer_list timer;
struct mutex lock;
- int pipe;
};
static inline struct vidi_context *encoder_to_vidi(struct drm_encoder *e)
@@ -153,15 +152,6 @@ static void vidi_disable(struct exynos_drm_crtc *crtc)
mutex_unlock(&ctx->lock);
}
-static int vidi_ctx_initialize(struct vidi_context *ctx,
- struct drm_device *drm_dev)
-{
- ctx->drm_dev = drm_dev;
- ctx->pipe = drm_dev->mode_config.num_crtc;
-
- return 0;
-}
-
static const struct exynos_drm_crtc_ops vidi_crtc_ops = {
.enable = vidi_enable,
.disable = vidi_disable,
@@ -175,9 +165,6 @@ static void vidi_fake_vblank_timer(unsigned long arg)
{
struct vidi_context *ctx = (void *)arg;
- if (ctx->pipe < 0)
- return;
-
if (drm_crtc_handle_vblank(&ctx->crtc->base))
mod_timer(&ctx->timer,
jiffies + msecs_to_jiffies(VIDI_REFRESH_TIME) - 1);
@@ -397,7 +384,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
unsigned int i;
int pipe, ret;
- vidi_ctx_initialize(ctx, drm_dev);
+ ctx->drm_dev = drm_dev;
plane_config.pixel_formats = formats;
plane_config.num_pixel_formats = ARRAY_SIZE(formats);