From: Ayoung Sim Date: Mon, 2 Apr 2018 04:52:43 +0000 (+0900) Subject: media: mfc: DRV3.2: separate dump_info and stop_hw X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ba9fc2c8b1f242572ae7851fa02f5a6ed93320a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git media: mfc: DRV3.2: separate dump_info and stop_hw When the sysmmu page fault is occured, panic will be occured by iommu driver. So, we don't need to occur panic when page fault is occured. Change-Id: I2f6842333cbd46992f5b868b319532c774220b6d Signed-off-by: Ayoung Sim --- diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc.c b/drivers/media/platform/exynos/mfc/s5p_mfc.c index 17e66ca69d8e..85233a71e1c6 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc.c @@ -906,7 +906,7 @@ int s5p_mfc_sysmmu_fault_handler(struct iommu_domain *iodmn, struct device *devi dev->logging_data->fault_addr = (unsigned int)addr; s5p_mfc_dump_buffer_info(dev, addr); - call_dop(dev, dump_and_stop_always, dev); + call_dop(dev, dump_info, dev); return 0; } diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h index ddff79fd4bb5..d3fb313f08a8 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h @@ -667,6 +667,7 @@ struct s5p_mfc_perf { extern struct s5p_mfc_dump_ops mfc_dump_ops; struct s5p_mfc_dump_ops { void (*dump_regs)(struct s5p_mfc_dev *dev); + void (*dump_info)(struct s5p_mfc_dev *dev); void (*dump_and_stop_always)(struct s5p_mfc_dev *dev); void (*dump_and_stop_debug_mode)(struct s5p_mfc_dev *dev); }; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c b/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c index 7fbdaeb98066..dee4fd615ec7 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c @@ -264,14 +264,19 @@ void s5p_mfc_dump_buffer_info(struct s5p_mfc_dev *dev, unsigned long addr) } } -static void mfc_dump_info_and_stop_hw(struct s5p_mfc_dev *dev) +static void mfc_dump_info(struct s5p_mfc_dev *dev) { - MFC_TRACE_DEV("** mfc will stop!!!\n"); mfc_display_state(dev); mfc_print_trace(dev); mfc_save_logging_sfr(dev); mfc_dump_regs(dev); exynos_sysmmu_show_status(dev->device); +} + +static void mfc_dump_info_and_stop_hw(struct s5p_mfc_dev *dev) +{ + MFC_TRACE_DEV("** mfc will stop!!!\n"); + mfc_dump_info(dev); BUG(); } @@ -281,11 +286,7 @@ static void mfc_dump_info_and_stop_hw_debug(struct s5p_mfc_dev *dev) return; MFC_TRACE_DEV("** mfc will stop!!!\n"); - mfc_display_state(dev); - mfc_print_trace(dev); - mfc_save_logging_sfr(dev); - mfc_dump_regs(dev); - exynos_sysmmu_show_status(dev->device); + mfc_dump_info(dev); BUG(); } @@ -333,6 +334,7 @@ void s5p_mfc_watchdog_worker(struct work_struct *work) struct s5p_mfc_dump_ops mfc_dump_ops = { .dump_regs = mfc_dump_regs, + .dump_info = mfc_dump_info, .dump_and_stop_always = mfc_dump_info_and_stop_hw, .dump_and_stop_debug_mode = mfc_dump_info_and_stop_hw_debug, };