diff options
Diffstat (limited to 'drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c')
-rw-r--r-- | drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index be9fa8220499..d0299aed517e 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | |||
@@ -633,7 +633,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p, | |||
633 | if (!state->bpp[i]) | 633 | if (!state->bpp[i]) |
634 | return -EINVAL; | 634 | return -EINVAL; |
635 | 635 | ||
636 | switch (state->base.rotation & 0xf) { | 636 | switch (state->base.rotation & DRM_ROTATE_MASK) { |
637 | case BIT(DRM_ROTATE_90): | 637 | case BIT(DRM_ROTATE_90): |
638 | offset = ((y_offset + state->src_y + patched_src_w - 1) / | 638 | offset = ((y_offset + state->src_y + patched_src_w - 1) / |
639 | ydiv) * fb->pitches[i]; | 639 | ydiv) * fb->pitches[i]; |
@@ -712,11 +712,13 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p, | |||
712 | } | 712 | } |
713 | 713 | ||
714 | static int atmel_hlcdc_plane_prepare_fb(struct drm_plane *p, | 714 | static int atmel_hlcdc_plane_prepare_fb(struct drm_plane *p, |
715 | struct drm_framebuffer *fb, | ||
716 | const struct drm_plane_state *new_state) | 715 | const struct drm_plane_state *new_state) |
717 | { | 716 | { |
718 | struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); | 717 | struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); |
719 | 718 | ||
719 | if (!new_state->fb) | ||
720 | return 0; | ||
721 | |||
720 | return atmel_hlcdc_layer_update_start(&plane->layer); | 722 | return atmel_hlcdc_layer_update_start(&plane->layer); |
721 | } | 723 | } |
722 | 724 | ||