diff options
| author | Philipp Zabel <p.zabel@pengutronix.de> | 2016-10-20 09:37:52 -0400 |
|---|---|---|
| committer | Philipp Zabel <p.zabel@pengutronix.de> | 2017-03-15 10:28:26 -0400 |
| commit | 2e9a71218ee34ee652f45cd9d7ba713e1b0155e4 (patch) | |
| tree | b341b7299ac59681ce5383f3478670c4df03d8e1 /drivers/gpu/drm/imx | |
| parent | 03ee3da8ce8d51013e7952108bdb0cd4e973a7de (diff) | |
drm/imx: ipuv3-plane: update overlay plane position also without modeset
Previously, the overlay plane position would only be updated when the
plane was first enabled or during a modeset. We can instruct the DP to
move the plane also when just updating the EBA.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx')
| -rw-r--r-- | drivers/gpu/drm/imx/ipuv3-plane.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index ef31faaf5e16..24819c9c3640 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c | |||
| @@ -366,10 +366,14 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, | |||
| 366 | struct drm_plane_state *state = plane->state; | 366 | struct drm_plane_state *state = plane->state; |
| 367 | struct drm_crtc_state *crtc_state = state->crtc->state; | 367 | struct drm_crtc_state *crtc_state = state->crtc->state; |
| 368 | struct drm_framebuffer *fb = state->fb; | 368 | struct drm_framebuffer *fb = state->fb; |
| 369 | struct drm_rect *dst = &state->dst; | ||
| 369 | unsigned long eba, ubo, vbo; | 370 | unsigned long eba, ubo, vbo; |
| 370 | enum ipu_color_space ics; | 371 | enum ipu_color_space ics; |
| 371 | int active; | 372 | int active; |
| 372 | 373 | ||
| 374 | if (ipu_plane->dp_flow == IPU_DP_FLOW_SYNC_FG) | ||
| 375 | ipu_dp_set_window_pos(ipu_plane->dp, dst->x1, dst->y1); | ||
| 376 | |||
| 373 | eba = drm_plane_state_to_eba(state); | 377 | eba = drm_plane_state_to_eba(state); |
| 374 | 378 | ||
| 375 | if (old_state->fb && !drm_atomic_crtc_needs_modeset(crtc_state)) { | 379 | if (old_state->fb && !drm_atomic_crtc_needs_modeset(crtc_state)) { |
| @@ -390,8 +394,6 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, | |||
| 390 | ics = ipu_drm_fourcc_to_colorspace(state->fb->format->format); | 394 | ics = ipu_drm_fourcc_to_colorspace(state->fb->format->format); |
| 391 | ipu_dp_setup_channel(ipu_plane->dp, ics, | 395 | ipu_dp_setup_channel(ipu_plane->dp, ics, |
| 392 | IPUV3_COLORSPACE_UNKNOWN); | 396 | IPUV3_COLORSPACE_UNKNOWN); |
| 393 | ipu_dp_set_window_pos(ipu_plane->dp, | ||
| 394 | state->dst.x1, state->dst.y1); | ||
| 395 | /* Enable local alpha on partial plane */ | 397 | /* Enable local alpha on partial plane */ |
| 396 | switch (state->fb->format->format) { | 398 | switch (state->fb->format->format) { |
| 397 | case DRM_FORMAT_ARGB1555: | 399 | case DRM_FORMAT_ARGB1555: |
| @@ -411,7 +413,7 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, | |||
| 411 | } | 413 | } |
| 412 | } | 414 | } |
| 413 | 415 | ||
| 414 | ipu_dmfc_config_wait4eot(ipu_plane->dmfc, drm_rect_width(&state->dst)); | 416 | ipu_dmfc_config_wait4eot(ipu_plane->dmfc, drm_rect_width(dst)); |
| 415 | 417 | ||
| 416 | ipu_cpmem_zero(ipu_plane->ipu_ch); | 418 | ipu_cpmem_zero(ipu_plane->ipu_ch); |
| 417 | ipu_cpmem_set_resolution(ipu_plane->ipu_ch, | 419 | ipu_cpmem_set_resolution(ipu_plane->ipu_ch, |
