Commit 9c350d83 authored by Daniel Kurtz's avatar Daniel Kurtz Committed by Sean Paul

drm/mediatek: plane: Use FB's format's cpp to compute x offset

Use the framebuffer's format to compute its cpp, and use it when
calculating the address shift value.
Signed-off-by: default avatarBibby Hsieh <bibby.hsieh@mediatek.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-7-git-send-email-bibby.hsieh@mediatek.com
parent f176cbf6
......@@ -135,7 +135,7 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,
pitch = fb->pitches[0];
format = fb->pixel_format;
addr += (plane->state->src.x1 >> 16) * 4;
addr += (plane->state->src.x1 >> 16) * drm_format_plane_cpp(format, 0);
addr += (plane->state->src.y1 >> 16) * pitch;
state->pending.enable = true;
......
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