drm/exynos: consistent use of cpp
A recent commit (272725c7db) has removed
the use of 'bits_per_pixel' in DRM. However the corresponding Exynos
driver code still uses the ambiguous 'bpp', even though it is now
initialized from fb->cpp[0].
Consistenly use 'cpp' in FIMD, DECON7 and DECON5433 drivers.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
This commit is contained in:
@@ -288,7 +288,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DRM_DEBUG_KMS("bpp = %u\n", fb->format->cpp[0] * 8);
|
DRM_DEBUG_KMS("cpp = %u\n", fb->format->cpp[0]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In case of exynos, setting dma-burst to 16Word causes permanent
|
* In case of exynos, setting dma-burst to 16Word causes permanent
|
||||||
@@ -331,7 +331,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
|
|||||||
struct decon_context *ctx = crtc->ctx;
|
struct decon_context *ctx = crtc->ctx;
|
||||||
struct drm_framebuffer *fb = state->base.fb;
|
struct drm_framebuffer *fb = state->base.fb;
|
||||||
unsigned int win = plane->index;
|
unsigned int win = plane->index;
|
||||||
unsigned int bpp = fb->format->cpp[0];
|
unsigned int cpp = fb->format->cpp[0];
|
||||||
unsigned int pitch = fb->pitches[0];
|
unsigned int pitch = fb->pitches[0];
|
||||||
dma_addr_t dma_addr = exynos_drm_fb_dma_addr(fb, 0);
|
dma_addr_t dma_addr = exynos_drm_fb_dma_addr(fb, 0);
|
||||||
u32 val;
|
u32 val;
|
||||||
@@ -367,11 +367,11 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
|
|||||||
writel(val, ctx->addr + DECON_VIDW0xADD1B0(win));
|
writel(val, ctx->addr + DECON_VIDW0xADD1B0(win));
|
||||||
|
|
||||||
if (!(ctx->out_type & IFTYPE_HDMI))
|
if (!(ctx->out_type & IFTYPE_HDMI))
|
||||||
val = BIT_VAL(pitch - state->crtc.w * bpp, 27, 14)
|
val = BIT_VAL(pitch - state->crtc.w * cpp, 27, 14)
|
||||||
| BIT_VAL(state->crtc.w * bpp, 13, 0);
|
| BIT_VAL(state->crtc.w * cpp, 13, 0);
|
||||||
else
|
else
|
||||||
val = BIT_VAL(pitch - state->crtc.w * bpp, 29, 15)
|
val = BIT_VAL(pitch - state->crtc.w * cpp, 29, 15)
|
||||||
| BIT_VAL(state->crtc.w * bpp, 14, 0);
|
| BIT_VAL(state->crtc.w * cpp, 14, 0);
|
||||||
writel(val, ctx->addr + DECON_VIDW0xADD2(win));
|
writel(val, ctx->addr + DECON_VIDW0xADD2(win));
|
||||||
|
|
||||||
decon_win_set_pixfmt(ctx, win, fb);
|
decon_win_set_pixfmt(ctx, win, fb);
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DRM_DEBUG_KMS("bpp = %d\n", fb->format->cpp[0] * 8);
|
DRM_DEBUG_KMS("cpp = %d\n", fb->format->cpp[0]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In case of exynos, setting dma-burst to 16Word causes permanent
|
* In case of exynos, setting dma-burst to 16Word causes permanent
|
||||||
@@ -398,7 +398,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
|
|||||||
unsigned int last_x;
|
unsigned int last_x;
|
||||||
unsigned int last_y;
|
unsigned int last_y;
|
||||||
unsigned int win = plane->index;
|
unsigned int win = plane->index;
|
||||||
unsigned int bpp = fb->format->cpp[0];
|
unsigned int cpp = fb->format->cpp[0];
|
||||||
unsigned int pitch = fb->pitches[0];
|
unsigned int pitch = fb->pitches[0];
|
||||||
|
|
||||||
if (ctx->suspended)
|
if (ctx->suspended)
|
||||||
@@ -418,7 +418,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
|
|||||||
val = (unsigned long)exynos_drm_fb_dma_addr(fb, 0);
|
val = (unsigned long)exynos_drm_fb_dma_addr(fb, 0);
|
||||||
writel(val, ctx->regs + VIDW_BUF_START(win));
|
writel(val, ctx->regs + VIDW_BUF_START(win));
|
||||||
|
|
||||||
padding = (pitch / bpp) - fb->width;
|
padding = (pitch / cpp) - fb->width;
|
||||||
|
|
||||||
/* buffer size */
|
/* buffer size */
|
||||||
writel(fb->width + padding, ctx->regs + VIDW_WHOLE_X(win));
|
writel(fb->width + padding, ctx->regs + VIDW_WHOLE_X(win));
|
||||||
|
|||||||
@@ -718,13 +718,13 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc,
|
|||||||
unsigned long val, size, offset;
|
unsigned long val, size, offset;
|
||||||
unsigned int last_x, last_y, buf_offsize, line_size;
|
unsigned int last_x, last_y, buf_offsize, line_size;
|
||||||
unsigned int win = plane->index;
|
unsigned int win = plane->index;
|
||||||
unsigned int bpp = fb->format->cpp[0];
|
unsigned int cpp = fb->format->cpp[0];
|
||||||
unsigned int pitch = fb->pitches[0];
|
unsigned int pitch = fb->pitches[0];
|
||||||
|
|
||||||
if (ctx->suspended)
|
if (ctx->suspended)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
offset = state->src.x * bpp;
|
offset = state->src.x * cpp;
|
||||||
offset += state->src.y * pitch;
|
offset += state->src.y * pitch;
|
||||||
|
|
||||||
/* buffer start address */
|
/* buffer start address */
|
||||||
@@ -743,8 +743,8 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc,
|
|||||||
state->crtc.w, state->crtc.h);
|
state->crtc.w, state->crtc.h);
|
||||||
|
|
||||||
/* buffer size */
|
/* buffer size */
|
||||||
buf_offsize = pitch - (state->crtc.w * bpp);
|
buf_offsize = pitch - (state->crtc.w * cpp);
|
||||||
line_size = state->crtc.w * bpp;
|
line_size = state->crtc.w * cpp;
|
||||||
val = VIDW_BUF_SIZE_OFFSET(buf_offsize) |
|
val = VIDW_BUF_SIZE_OFFSET(buf_offsize) |
|
||||||
VIDW_BUF_SIZE_PAGEWIDTH(line_size) |
|
VIDW_BUF_SIZE_PAGEWIDTH(line_size) |
|
||||||
VIDW_BUF_SIZE_OFFSET_E(buf_offsize) |
|
VIDW_BUF_SIZE_OFFSET_E(buf_offsize) |
|
||||||
|
|||||||
Reference in New Issue
Block a user