From 245e398bd38879cbd098995b3bb54e997d6890d3 Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Mon, 25 Sep 2017 10:35:59 +0900 Subject: [PATCH] [COMMON] g2d: fix to read the job state The register of JOB_IDn_STATE should be masked to read the job state. Change-Id: I964c2a22073d64a3c9150fa06e2060192c5d149d Signed-off-by: hyesoo.yu --- drivers/gpu/exynos/g2d/g2d_regs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/exynos/g2d/g2d_regs.h b/drivers/gpu/exynos/g2d/g2d_regs.h index 523c193f20fe..f0d87d074ad9 100644 --- a/drivers/gpu/exynos/g2d/g2d_regs.h +++ b/drivers/gpu/exynos/g2d/g2d_regs.h @@ -108,7 +108,8 @@ static inline void g2d_hw_clear_job_ids(struct g2d_device *g2d_dev, u32 val) static inline u32 g2d_hw_get_job_state(struct g2d_device *g2d_dev, unsigned int job_id) { - return readl(g2d_dev->reg + G2D_JOB_IDn_STATE_REG(job_id)); + return readl(g2d_dev->reg + G2D_JOB_IDn_STATE_REG(job_id)) & + G2D_JOB_STATE_MASK; } u32 g2d_hw_errint_status(struct g2d_device *g2d_dev); -- 2.20.1