drm/exynos/fimc: simplify and rename fimc_dst_get_buf_seq
fimc_dst_get_buf_seq returns number of buffers so the name should be fimc_dst_get_buf_count. Function body has been simplified. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
72d465aabc
commit
b0e08823ca
|
@ -58,7 +58,6 @@
|
||||||
#define FIMC_SHFACTOR 10
|
#define FIMC_SHFACTOR 10
|
||||||
#define FIMC_BUF_STOP 1
|
#define FIMC_BUF_STOP 1
|
||||||
#define FIMC_BUF_START 2
|
#define FIMC_BUF_START 2
|
||||||
#define FIMC_REG_SZ 32
|
|
||||||
#define FIMC_WIDTH_ITU_709 1280
|
#define FIMC_WIDTH_ITU_709 1280
|
||||||
#define FIMC_REFRESH_MAX 60
|
#define FIMC_REFRESH_MAX 60
|
||||||
#define FIMC_REFRESH_MIN 12
|
#define FIMC_REFRESH_MIN 12
|
||||||
|
@ -1123,16 +1122,13 @@ static int fimc_dst_set_size(struct device *dev, int swap,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fimc_dst_get_buf_seq(struct fimc_context *ctx)
|
static int fimc_dst_get_buf_count(struct fimc_context *ctx)
|
||||||
{
|
{
|
||||||
u32 cfg, i, buf_num = 0;
|
u32 cfg, buf_num;
|
||||||
u32 mask = 0x00000001;
|
|
||||||
|
|
||||||
cfg = fimc_read(ctx, EXYNOS_CIFCNTSEQ);
|
cfg = fimc_read(ctx, EXYNOS_CIFCNTSEQ);
|
||||||
|
|
||||||
for (i = 0; i < FIMC_REG_SZ; i++)
|
buf_num = hweight32(cfg);
|
||||||
if (cfg & (mask << i))
|
|
||||||
buf_num++;
|
|
||||||
|
|
||||||
DRM_DEBUG_KMS("buf_num[%d]\n", buf_num);
|
DRM_DEBUG_KMS("buf_num[%d]\n", buf_num);
|
||||||
|
|
||||||
|
@ -1176,12 +1172,12 @@ static int fimc_dst_set_buf_seq(struct fimc_context *ctx, u32 buf_id,
|
||||||
|
|
||||||
/* interrupt enable */
|
/* interrupt enable */
|
||||||
if (buf_type == IPP_BUF_ENQUEUE &&
|
if (buf_type == IPP_BUF_ENQUEUE &&
|
||||||
fimc_dst_get_buf_seq(ctx) >= FIMC_BUF_START)
|
fimc_dst_get_buf_count(ctx) >= FIMC_BUF_START)
|
||||||
fimc_mask_irq(ctx, true);
|
fimc_mask_irq(ctx, true);
|
||||||
|
|
||||||
/* interrupt disable */
|
/* interrupt disable */
|
||||||
if (buf_type == IPP_BUF_DEQUEUE &&
|
if (buf_type == IPP_BUF_DEQUEUE &&
|
||||||
fimc_dst_get_buf_seq(ctx) <= FIMC_BUF_STOP)
|
fimc_dst_get_buf_count(ctx) <= FIMC_BUF_STOP)
|
||||||
fimc_mask_irq(ctx, false);
|
fimc_mask_irq(ctx, false);
|
||||||
|
|
||||||
err_unlock:
|
err_unlock:
|
||||||
|
|
Loading…
Reference in New Issue