mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
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: Bibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-7-git-send-email-bibby.hsieh@mediatek.com
This commit is contained in:
parent
f176cbf6f9
commit
9c350d834f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user