media: rockchip: hdmirx: avoid PKTDEC_AVIIF_CHG_IRQ mistrigger.

HDMIRX enable PKTDEC_AVIIF_CHG_IRQ to detect whether
color_range/color_space/color_fmt change or not,
but other aviif changes also cause the interrupt to trigger.

Change-Id: I7add2a6b519ad97e74ad3ba64dd8961e46a32584
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
This commit is contained in:
Wangqiang Guo
2023-09-18 13:02:35 +00:00
committed by Tao Huang
parent f421f8a977
commit b795e7c67f

View File

@@ -2483,13 +2483,28 @@ static void mainunit_2_int_handler(struct rk_hdmirx_dev *hdmirx_dev,
hdmirx_writel(hdmirx_dev, MAINUNIT_2_INT_FORCE, 0x0);
}
/*
* In the normal preview, some scenarios will trigger the change interrupt
* by mistake, and the trigger source of the interrupt needs to be detected
* to avoid the problem.
*/
static void pkt_0_int_handler(struct rk_hdmirx_dev *hdmirx_dev,
int status, bool *handled)
{
struct v4l2_device *v4l2_dev = &hdmirx_dev->v4l2_dev;
u32 pre_fmt_fourcc = hdmirx_dev->cur_fmt_fourcc;
u32 pre_color_range = hdmirx_dev->cur_color_range;
u32 pre_color_space = hdmirx_dev->cur_color_space;
if ((status & PKTDEC_AVIIF_CHG_IRQ)) {
process_signal_change(hdmirx_dev);
hdmirx_get_color_range(hdmirx_dev);
hdmirx_get_color_space(hdmirx_dev);
hdmirx_get_pix_fmt(hdmirx_dev);
if (hdmirx_dev->cur_fmt_fourcc != pre_fmt_fourcc ||
hdmirx_dev->cur_color_range != pre_color_range ||
hdmirx_dev->cur_color_space != pre_color_space) {
process_signal_change(hdmirx_dev);
}
v4l2_dbg(2, debug, v4l2_dev, "%s: ptk0_st:%#x\n",
__func__, status);
*handled = true;