diff options
-rw-r--r-- | drivers/gpu/drm/sti/sti_cursor.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c index a19693adace2..8cac6403475d 100644 --- a/drivers/gpu/drm/sti/sti_cursor.c +++ b/drivers/gpu/drm/sti/sti_cursor.c | |||
@@ -127,7 +127,6 @@ static void sti_cursor_atomic_update(struct drm_plane *drm_plane, | |||
127 | /* src_x are in 16.16 format */ | 127 | /* src_x are in 16.16 format */ |
128 | int src_w = state->src_w >> 16; | 128 | int src_w = state->src_w >> 16; |
129 | int src_h = state->src_h >> 16; | 129 | int src_h = state->src_h >> 16; |
130 | bool first_prepare = plane->status == STI_PLANE_DISABLED ? true : false; | ||
131 | struct drm_gem_cma_object *cma_obj; | 130 | struct drm_gem_cma_object *cma_obj; |
132 | u32 y, x; | 131 | u32 y, x; |
133 | u32 val; | 132 | u32 val; |
@@ -193,12 +192,6 @@ static void sti_cursor_atomic_update(struct drm_plane *drm_plane, | |||
193 | val = y << 16 | x; | 192 | val = y << 16 | x; |
194 | writel(val, cursor->regs + CUR_AWE); | 193 | writel(val, cursor->regs + CUR_AWE); |
195 | 194 | ||
196 | if (first_prepare) { | ||
197 | /* Set and fetch CLUT */ | ||
198 | writel(cursor->clut_paddr, cursor->regs + CUR_CML); | ||
199 | writel(CUR_CTL_CLUT_UPDATE, cursor->regs + CUR_CTL); | ||
200 | } | ||
201 | |||
202 | /* Set memory location, size, and position */ | 195 | /* Set memory location, size, and position */ |
203 | writel(cursor->pixmap.paddr, cursor->regs + CUR_PML); | 196 | writel(cursor->pixmap.paddr, cursor->regs + CUR_PML); |
204 | writel(cursor->width, cursor->regs + CUR_PMP); | 197 | writel(cursor->width, cursor->regs + CUR_PMP); |
@@ -208,6 +201,10 @@ static void sti_cursor_atomic_update(struct drm_plane *drm_plane, | |||
208 | x = sti_vtg_get_pixel_number(*mode, dst_x); | 201 | x = sti_vtg_get_pixel_number(*mode, dst_x); |
209 | writel((y << 16) | x, cursor->regs + CUR_VPO); | 202 | writel((y << 16) | x, cursor->regs + CUR_VPO); |
210 | 203 | ||
204 | /* Set and fetch CLUT */ | ||
205 | writel(cursor->clut_paddr, cursor->regs + CUR_CML); | ||
206 | writel(CUR_CTL_CLUT_UPDATE, cursor->regs + CUR_CTL); | ||
207 | |||
211 | plane->status = STI_PLANE_UPDATED; | 208 | plane->status = STI_PLANE_UPDATED; |
212 | } | 209 | } |
213 | 210 | ||