Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/exynos: kill exynos_drm_crtc::pipe

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>

authored by

Andrzej Hajda and committed by
Inki Dae
d644951c 0586feba

+8 -28
+1 -2
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
··· 614 614 out_type = (ctx->out_type & IFTYPE_HDMI) ? EXYNOS_DISPLAY_TYPE_HDMI 615 615 : EXYNOS_DISPLAY_TYPE_LCD; 616 616 ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, 617 - ctx->pipe, out_type, 618 - &decon_crtc_ops, ctx); 617 + out_type, &decon_crtc_ops, ctx); 619 618 if (IS_ERR(ctx->crtc)) { 620 619 ret = PTR_ERR(ctx->crtc); 621 620 goto err;
+1 -2
drivers/gpu/drm/exynos/exynos7_drm_decon.c
··· 656 656 657 657 exynos_plane = &ctx->planes[DEFAULT_WIN]; 658 658 ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, 659 - ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD, 660 - &decon_crtc_ops, ctx); 659 + EXYNOS_DISPLAY_TYPE_LCD, &decon_crtc_ops, ctx); 661 660 if (IS_ERR(ctx->crtc)) { 662 661 decon_ctx_remove(ctx); 663 662 return PTR_ERR(ctx->crtc);
+3 -9
drivers/gpu/drm/exynos/exynos_drm_crtc.c
··· 166 166 167 167 struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, 168 168 struct drm_plane *plane, 169 - int pipe, 170 169 enum exynos_drm_output_type type, 171 170 const struct exynos_drm_crtc_ops *ops, 172 171 void *ctx) ··· 178 179 if (!exynos_crtc) 179 180 return ERR_PTR(-ENOMEM); 180 181 181 - exynos_crtc->pipe = pipe; 182 182 exynos_crtc->type = type; 183 183 exynos_crtc->ops = ops; 184 184 exynos_crtc->ctx = ctx; ··· 204 206 { 205 207 struct drm_crtc *crtc; 206 208 207 - list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head) { 208 - struct exynos_drm_crtc *exynos_crtc; 209 - 210 - exynos_crtc = to_exynos_crtc(crtc); 211 - if (exynos_crtc->type == out_type) 212 - return exynos_crtc->pipe; 213 - } 209 + drm_for_each_crtc(crtc, drm_dev) 210 + if (to_exynos_crtc(crtc)->type == out_type) 211 + return drm_crtc_index(crtc); 214 212 215 213 return -EPERM; 216 214 }
-1
drivers/gpu/drm/exynos/exynos_drm_crtc.h
··· 19 19 20 20 struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, 21 21 struct drm_plane *plane, 22 - int pipe, 23 22 enum exynos_drm_output_type type, 24 23 const struct exynos_drm_crtc_ops *ops, 25 24 void *context);
-8
drivers/gpu/drm/exynos/exynos_drm_drv.h
··· 154 154 * 155 155 * @base: crtc object. 156 156 * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI. 157 - * @pipe: a crtc index created at load() with a new crtc object creation 158 - * and the crtc object would be set to private->crtc array 159 - * to get a crtc object corresponding to this pipe from private->crtc 160 - * array when irq interrupt occurred. the reason of using this pipe is that 161 - * drm framework doesn't support multiple irq yet. 162 - * we can refer to the crtc to current hardware interrupt occurred through 163 - * this pipe value. 164 157 * @ops: pointer to callbacks for exynos drm specific functionality 165 158 * @ctx: A pointer to the crtc's implementation specific context 166 159 * @pipe_clk: A pointer to the crtc's pipeline clock. ··· 161 168 struct exynos_drm_crtc { 162 169 struct drm_crtc base; 163 170 enum exynos_drm_output_type type; 164 - unsigned int pipe; 165 171 const struct exynos_drm_crtc_ops *ops; 166 172 void *ctx; 167 173 struct exynos_drm_clk *pipe_clk;
+1 -2
drivers/gpu/drm/exynos/exynos_drm_fimd.c
··· 1003 1003 1004 1004 exynos_plane = &ctx->planes[DEFAULT_WIN]; 1005 1005 ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, 1006 - ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD, 1007 - &fimd_crtc_ops, ctx); 1006 + EXYNOS_DISPLAY_TYPE_LCD, &fimd_crtc_ops, ctx); 1008 1007 if (IS_ERR(ctx->crtc)) 1009 1008 return PTR_ERR(ctx->crtc); 1010 1009
+1 -2
drivers/gpu/drm/exynos/exynos_drm_vidi.c
··· 416 416 417 417 exynos_plane = &ctx->planes[DEFAULT_WIN]; 418 418 ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, 419 - ctx->pipe, EXYNOS_DISPLAY_TYPE_VIDI, 420 - &vidi_crtc_ops, ctx); 419 + EXYNOS_DISPLAY_TYPE_VIDI, &vidi_crtc_ops, ctx); 421 420 if (IS_ERR(ctx->crtc)) { 422 421 DRM_ERROR("failed to create crtc.\n"); 423 422 return PTR_ERR(ctx->crtc);
+1 -2
drivers/gpu/drm/exynos/exynos_mixer.c
··· 1165 1165 1166 1166 exynos_plane = &ctx->planes[DEFAULT_WIN]; 1167 1167 ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, 1168 - ctx->pipe, EXYNOS_DISPLAY_TYPE_HDMI, 1169 - &mixer_crtc_ops, ctx); 1168 + EXYNOS_DISPLAY_TYPE_HDMI, &mixer_crtc_ops, ctx); 1170 1169 if (IS_ERR(ctx->crtc)) { 1171 1170 mixer_ctx_remove(ctx); 1172 1171 ret = PTR_ERR(ctx->crtc);