[COMMON] g2d: fix to read the job state
authorhyesoo.yu <hyesoo.yu@samsung.com>
Mon, 25 Sep 2017 01:35:59 +0000 (10:35 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:27:47 +0000 (14:27 +0900)
The register of JOB_IDn_STATE should be masked
to read the job state.

Change-Id: I964c2a22073d64a3c9150fa06e2060192c5d149d
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_regs.h

index 523c193f20fe9ed6044b046aac9301a76fd6b1f8..f0d87d074ad9bcef3998b1825c293d4f0f9e191f 100644 (file)
@@ -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);