From a6ae84c5822e3b9386432c3b2d0d409ca9278e01 Mon Sep 17 00:00:00 2001 From: Ayoung Sim Date: Mon, 2 Apr 2018 13:52:43 +0900 Subject: [PATCH] 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 --- drivers/media/platform/exynos/mfc/s5p_mfc.c | 2 +- .../platform/exynos/mfc/s5p_mfc_data_struct.h | 1 + .../media/platform/exynos/mfc/s5p_mfc_watchdog.c | 16 +++++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) 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, }; -- 2.20.1