vdin: add afbce reg access protection [1/1]

PD#SWPL-7983

Problem:
txlx will crash when access afbce reg without afbce hw

Solution:
add afbce reg access protection

Verify:
r311

Change-Id: Iaabf8da9cb2a58e9c26626b9ac718bdf9c6a2ac3
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
This commit is contained in:
Evoke Zhang
2019-04-30 06:53:06 -04:00
committed by Tao Zeng
parent 9eace31508
commit a8c6962db8

View File

@@ -82,6 +82,9 @@ void vdin_write_mif_or_afbce_init(struct vdin_dev_s *devp)
{
enum vdin_output_mif_e sel;
if ((devp->afbce_flag & VDIN_AFBCE_EN) == 0)
return;
if (devp->afbce_mode == 0)
sel = VDIN_OUTPUT_TO_MIF;
else
@@ -115,7 +118,7 @@ void vdin_write_mif_or_afbce(struct vdin_dev_s *devp,
enum vdin_output_mif_e sel)
{
if (devp->index != 0)
if ((devp->afbce_flag & VDIN_AFBCE_EN) == 0)
return;
if (sel == VDIN_OUTPUT_TO_MIF) {