Commit 58dff399 authored by Philipp Zabel's avatar Philipp Zabel

drm/imx: ipuv3-plane: use fb local variable instead of state->fb

We already have a local variable assigned to state->fb, use it.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 5771a8c0
...@@ -525,8 +525,8 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, ...@@ -525,8 +525,8 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
ipu_prg_channel_configure(ipu_plane->ipu_ch, axi_id, ipu_prg_channel_configure(ipu_plane->ipu_ch, axi_id,
drm_rect_width(&state->src) >> 16, drm_rect_width(&state->src) >> 16,
drm_rect_height(&state->src) >> 16, drm_rect_height(&state->src) >> 16,
state->fb->pitches[0], fb->pitches[0],
state->fb->format->format, &eba); fb->format->format, &eba);
} }
if (old_state->fb && !drm_atomic_crtc_needs_modeset(crtc_state)) { if (old_state->fb && !drm_atomic_crtc_needs_modeset(crtc_state)) {
...@@ -553,11 +553,11 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, ...@@ -553,11 +553,11 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true); ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
break; break;
case IPU_DP_FLOW_SYNC_FG: case IPU_DP_FLOW_SYNC_FG:
ics = ipu_drm_fourcc_to_colorspace(state->fb->format->format); ics = ipu_drm_fourcc_to_colorspace(fb->format->format);
ipu_dp_setup_channel(ipu_plane->dp, ics, ipu_dp_setup_channel(ipu_plane->dp, ics,
IPUV3_COLORSPACE_UNKNOWN); IPUV3_COLORSPACE_UNKNOWN);
/* Enable local alpha on partial plane */ /* Enable local alpha on partial plane */
switch (state->fb->format->format) { switch (fb->format->format) {
case DRM_FORMAT_ARGB1555: case DRM_FORMAT_ARGB1555:
case DRM_FORMAT_ABGR1555: case DRM_FORMAT_ABGR1555:
case DRM_FORMAT_RGBA5551: case DRM_FORMAT_RGBA5551:
...@@ -587,10 +587,10 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, ...@@ -587,10 +587,10 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
ipu_cpmem_set_resolution(ipu_plane->ipu_ch, ipu_cpmem_set_resolution(ipu_plane->ipu_ch,
drm_rect_width(&state->src) >> 16, drm_rect_width(&state->src) >> 16,
drm_rect_height(&state->src) >> 16); drm_rect_height(&state->src) >> 16);
ipu_cpmem_set_fmt(ipu_plane->ipu_ch, state->fb->format->format); ipu_cpmem_set_fmt(ipu_plane->ipu_ch, fb->format->format);
ipu_cpmem_set_high_priority(ipu_plane->ipu_ch); ipu_cpmem_set_high_priority(ipu_plane->ipu_ch);
ipu_idmac_set_double_buffer(ipu_plane->ipu_ch, 1); ipu_idmac_set_double_buffer(ipu_plane->ipu_ch, 1);
ipu_cpmem_set_stride(ipu_plane->ipu_ch, state->fb->pitches[0]); ipu_cpmem_set_stride(ipu_plane->ipu_ch, fb->pitches[0]);
ipu_cpmem_set_axi_id(ipu_plane->ipu_ch, axi_id); ipu_cpmem_set_axi_id(ipu_plane->ipu_ch, axi_id);
switch (fb->format->format) { switch (fb->format->format) {
case DRM_FORMAT_YUV420: case DRM_FORMAT_YUV420:
...@@ -644,8 +644,7 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, ...@@ -644,8 +644,7 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
ipu_cpmem_set_format_passthrough(ipu_plane->alpha_ch, 8); ipu_cpmem_set_format_passthrough(ipu_plane->alpha_ch, 8);
ipu_cpmem_set_high_priority(ipu_plane->alpha_ch); ipu_cpmem_set_high_priority(ipu_plane->alpha_ch);
ipu_idmac_set_double_buffer(ipu_plane->alpha_ch, 1); ipu_idmac_set_double_buffer(ipu_plane->alpha_ch, 1);
ipu_cpmem_set_stride(ipu_plane->alpha_ch, ipu_cpmem_set_stride(ipu_plane->alpha_ch, fb->pitches[1]);
state->fb->pitches[1]);
ipu_cpmem_set_burstsize(ipu_plane->alpha_ch, 16); ipu_cpmem_set_burstsize(ipu_plane->alpha_ch, 16);
ipu_cpmem_set_buffer(ipu_plane->alpha_ch, 0, alpha_eba); ipu_cpmem_set_buffer(ipu_plane->alpha_ch, 0, alpha_eba);
ipu_cpmem_set_buffer(ipu_plane->alpha_ch, 1, alpha_eba); ipu_cpmem_set_buffer(ipu_plane->alpha_ch, 1, alpha_eba);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment