mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 18:41:23 +00:00
drm/rockchip: check yuv2yuv existence before assigning window data
Before assigning window data, we should check if the yuv2yuv vop-data
is set at all, because it looks like it can otherwise reference something
wrong, as I saw on my rk3188 today which ended up in a null pointer
dereference in vop_plane_atomic_update when accessing the yuv2yuv data.
Fixes: 1c21aa8f2b
("drm/rockchip: Fix YUV buffers color rendering")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2556882.Heuq80WCVD@phil
This commit is contained in:
parent
ac109c8247
commit
ce6912b407
@ -1675,6 +1675,8 @@ static void vop_win_init(struct vop *vop)
|
||||
|
||||
vop_win->data = win_data;
|
||||
vop_win->vop = vop;
|
||||
|
||||
if (vop_data->win_yuv2yuv)
|
||||
vop_win->yuv2yuv_data = &vop_data->win_yuv2yuv[i];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user