From: Ayoung Sim Date: Mon, 14 Jan 2019 10:47:04 +0000 (+0900) Subject: [COMMON] media: mfc: call the TS-MUX dump if there's OTF node X-Git-Tag: MMI-QSAS30.62-33-3~894 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7825a2a70217f1ce3cfc44769a2c5bfc090a88b7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [COMMON] media: mfc: call the TS-MUX dump if there's OTF node Change-Id: I4fb8075a6cfe29cb5dae3c6c0ffc2a657f155278 Signed-off-by: Ayoung Sim --- diff --git a/drivers/media/platform/exynos/mfc/mfc_data_struct.h b/drivers/media/platform/exynos/mfc/mfc_data_struct.h index 10abb6589b73..525f936f7798 100644 --- a/drivers/media/platform/exynos/mfc/mfc_data_struct.h +++ b/drivers/media/platform/exynos/mfc/mfc_data_struct.h @@ -760,6 +760,7 @@ struct mfc_dev { struct mfc_debug *logging_data; int num_inst; + int num_otf_inst; struct mutex mfc_mutex; diff --git a/drivers/media/platform/exynos/mfc/mfc_otf.c b/drivers/media/platform/exynos/mfc/mfc_otf.c index 5b6f9137af02..6ccbaaf402dd 100644 --- a/drivers/media/platform/exynos/mfc/mfc_otf.c +++ b/drivers/media/platform/exynos/mfc/mfc_otf.c @@ -13,9 +13,6 @@ #ifdef CONFIG_VIDEO_EXYNOS_REPEATER #include #endif -#ifdef CONFIG_VIDEO_EXYNOS_TSMUX -#include -#endif #include #include "mfc_otf.h" @@ -285,6 +282,7 @@ int mfc_otf_create(struct mfc_ctx *ctx) } } + dev->num_otf_inst++; mfc_debug(2, "[OTF] otf_create is completed\n"); mfc_debug_leave(); @@ -294,6 +292,8 @@ int mfc_otf_create(struct mfc_ctx *ctx) void mfc_otf_destroy(struct mfc_ctx *ctx) { + struct mfc_dev *dev = ctx->dev; + mfc_debug_enter(); if (!ctx) { @@ -303,6 +303,8 @@ void mfc_otf_destroy(struct mfc_ctx *ctx) mfc_otf_release_stream_buf(ctx); __mfc_otf_destroy_handle(ctx); + + dev->num_otf_inst--; mfc_debug(2, "[OTF] otf_destroy is completed\n"); mfc_debug_leave(); diff --git a/drivers/media/platform/exynos/mfc/mfc_otf.h b/drivers/media/platform/exynos/mfc/mfc_otf.h index 854cd6115a70..e9769ea13df3 100644 --- a/drivers/media/platform/exynos/mfc/mfc_otf.h +++ b/drivers/media/platform/exynos/mfc/mfc_otf.h @@ -13,6 +13,10 @@ #ifndef __MFC_OTF_H #define __MFC_OTF_H __FILE__ +#ifdef CONFIG_VIDEO_EXYNOS_TSMUX +#include +#endif + #include "mfc_common.h" extern struct mfc_dev *g_mfc_dev; diff --git a/drivers/media/platform/exynos/mfc/mfc_watchdog.c b/drivers/media/platform/exynos/mfc/mfc_watchdog.c index cb156a03d73c..d4ff678024d1 100644 --- a/drivers/media/platform/exynos/mfc/mfc_watchdog.c +++ b/drivers/media/platform/exynos/mfc/mfc_watchdog.c @@ -14,6 +14,7 @@ #endif #include "mfc_watchdog.h" +#include "mfc_otf.h" #include "mfc_sync.h" @@ -393,6 +394,14 @@ static void __mfc_dump_info(struct mfc_dev *dev) __mfc_save_logging_sfr(dev); __mfc_dump_buffer_info(dev); __mfc_dump_regs(dev); + + if (dev->num_otf_inst) { + pr_err("-----------dumping TS-MUX info-----------\n"); +#ifdef CONFIG_VIDEO_EXYNOS_TSMUX + tsmux_sfr_dump(); +#endif + } + /* If there was fault addr, sysmmu info is already printed out */ if (!dev->logging_data->fault_addr) exynos_sysmmu_show_status(dev->device);