提交 a996f501 编写于 作者: T Thomas Zimmermann 提交者: Zheng Zengkai

drm/ast: Fix invalid usage of AST_MAX_HWC_WIDTH in cursor atomic_check

stable inclusion
from stable-5.10.36
commit 2c518667f953b775733689c8eb7dbb84fb0a78fa
bugzilla: 51867
CVE: NA

--------------------------------

[ Upstream commit ee4a92d6 ]

Use AST_MAX_HWC_HEIGHT for setting offset_y in the cursor plane's
atomic_check. The code used AST_MAX_HWC_WIDTH instead. This worked
because both constants has the same value.
Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de>
Acked-by: NGerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-3-tzimmermann@suse.deSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 ce2baf1b
...@@ -688,7 +688,7 @@ ast_cursor_plane_helper_atomic_update(struct drm_plane *plane, ...@@ -688,7 +688,7 @@ ast_cursor_plane_helper_atomic_update(struct drm_plane *plane,
unsigned int offset_x, offset_y; unsigned int offset_x, offset_y;
offset_x = AST_MAX_HWC_WIDTH - fb->width; offset_x = AST_MAX_HWC_WIDTH - fb->width;
offset_y = AST_MAX_HWC_WIDTH - fb->height; offset_y = AST_MAX_HWC_HEIGHT - fb->height;
if (state->fb != old_state->fb) { if (state->fb != old_state->fb) {
/* A new cursor image was installed. */ /* A new cursor image was installed. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册