mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: rockchip: hdmirx: fix crash when get fmt
Call trace: dump_backtrace+0xf4/0x118 show_stack+0x18/0x24 dump_stack_lvl+0x60/0x7c dump_stack+0x18/0x38 __schedule_bug+0x6c/0x8c __schedule+0x668/0x9f0 schedule+0x7c/0xe8 schedule_hrtimeout_range_clock+0xa4/0x118 schedule_hrtimeout_range+0x14/0x24 usleep_range_state+0x60/0x9c hdmirx_get_pix_fmt+0xa0/0x210 [rockchip_hdmirx] hdmirx_hdmi_irq_handler+0x770/0xb4c [rockchip_hdmirx] __handle_irq_event_percpu+0xbc/0x26c handle_irq_event+0x48/0xb8 handle_fasteoi_irq+0x124/0x284 generic_handle_domain_irq+0x44/0x60 gic_handle_irq+0x4c/0x114 call_on_irq_stack+0x3c/0x74 el1_interrupt+0x74/0xd8 el1h_64_irq_handler+0x18/0x24 el1h_64_irq+0x68/0x6c Signed-off-by: Chen Shunqing <csq@rock-chips.com> Change-Id: Id789732bd80b57b128002d6c4a0546eab10f747e
This commit is contained in:
@@ -715,10 +715,10 @@ static void hdmirx_get_colordepth(struct rk_hdmirx_dev *hdmirx_dev)
|
||||
__func__, hdmirx_dev->color_depth, color_depth_reg);
|
||||
}
|
||||
|
||||
static void hdmirx_get_pix_fmt(struct rk_hdmirx_dev *hdmirx_dev)
|
||||
static void hdmirx_get_pix_fmt(struct rk_hdmirx_dev *hdmirx_dev, bool retry)
|
||||
{
|
||||
u32 val;
|
||||
int timeout = 10;
|
||||
int timeout = retry ? 10 : 0;
|
||||
struct v4l2_device *v4l2_dev = &hdmirx_dev->v4l2_dev;
|
||||
|
||||
try_loop:
|
||||
@@ -1009,7 +1009,7 @@ static int hdmirx_get_detected_timings(struct rk_hdmirx_dev *hdmirx_dev,
|
||||
|
||||
val = hdmirx_readl(hdmirx_dev, DMA_STATUS11);
|
||||
field_type = (val & HDMIRX_TYPE_MASK) >> 7;
|
||||
hdmirx_get_pix_fmt(hdmirx_dev);
|
||||
hdmirx_get_pix_fmt(hdmirx_dev, true);
|
||||
hdmirx_get_color_range(hdmirx_dev);
|
||||
hdmirx_get_color_space(hdmirx_dev);
|
||||
bt->interlaced = field_type & BIT(0) ?
|
||||
@@ -2830,7 +2830,7 @@ static void pkt_0_int_handler(struct rk_hdmirx_dev *hdmirx_dev,
|
||||
if ((status & PKTDEC_AVIIF_CHG_IRQ)) {
|
||||
hdmirx_get_color_range(hdmirx_dev);
|
||||
hdmirx_get_color_space(hdmirx_dev);
|
||||
hdmirx_get_pix_fmt(hdmirx_dev);
|
||||
hdmirx_get_pix_fmt(hdmirx_dev, false);
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user