提交 9c350d83 编写于 作者: D Daniel Kurtz 提交者: 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: NBibby Hsieh <bibby.hsieh@mediatek.com>
Signed-off-by: NSean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-7-git-send-email-bibby.hsieh@mediatek.com
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册