mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 17:41:09 +00:00
drm/mediatek: Check if fb is null
[ Upstream commitb1d685b646
] It's possible that state->base.fb is null. Add a check before access its format. Fixes:b6b1bb980e
("drm/mediatek: Turn off Alpha bit when plane format has no alpha") Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d87df78aab
commit
bed8bed041
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
|
|||
}
|
||||
|
||||
con = ovl_fmt_convert(ovl, fmt);
|
||||
if (state->base.fb->format->has_alpha)
|
||||
if (state->base.fb && state->base.fb->format->has_alpha)
|
||||
con |= OVL_CON_AEN | OVL_CON_ALPHA;
|
||||
|
||||
if (pending->rotation & DRM_MODE_REFLECT_Y) {
|
||||
|
|
Loading…
Reference in a new issue