If segmentation_enable flag is zero, no matter what
segmentation_update_flag is, we cannot set it to HW.
Before this patch, incorrect segmentation_update_flag
might be set to HW which caused hangout corruption.
BUG=chrome-os-partner:35531
TEST=make a video chat by hangout with other device.
Signed-off-by: ZhiChao Yu <zhichao.yu@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/242732
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Commit-Queue: Tomasz Figa <tfiga@chromium.org>
Change-Id: I86c00c27d3c97854db8c4164289fa434b29819ff
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
/* set segment map address */
reg = 0;
reg = VDPU_REG_FWD_PIC1_SEGMENT_BASE(ctx->hw.vp8d.segment_map.dma);
- if (hdr->sgmnt_hdr.flags & V4L2_VP8_SEGMNT_HDR_FLAG_ENABLED)
+ if (hdr->sgmnt_hdr.flags & V4L2_VP8_SEGMNT_HDR_FLAG_ENABLED) {
reg |= VDPU_REG_FWD_PIC1_SEGMENT_E;
- if (hdr->sgmnt_hdr.flags & V4L2_VP8_SEGMNT_HDR_FLAG_UPDATE_MAP)
- reg |= VDPU_REG_FWD_PIC1_SEGMENT_UPD_E;
+ if (hdr->sgmnt_hdr.flags & V4L2_VP8_SEGMNT_HDR_FLAG_UPDATE_MAP)
+ reg |= VDPU_REG_FWD_PIC1_SEGMENT_UPD_E;
+ }
vdpu_write_relaxed(vpu, reg, VDPU_REG_FWD_PIC(0));
/* set output frame buffer address */