From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Martiros Shakhzadyan <vrzh@vrzh.net>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: [PATCH 11/23] media: atomisp: drop #ifdef WITH_PC_MONITORING
Date: Tue, 16 Nov 2021 11:28:52 +0000 [thread overview]
Message-ID: <e50ea6f43767258f4ecedf7100f97331a1eb0069.1637061474.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1637061474.git.mchehab+huawei@kernel.org>
This is not needed for the driver to work. So, just drop it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
To mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH 00/23] at: https://lore.kernel.org/all/cover.1637061474.git.mchehab+huawei@kernel.org/
drivers/staging/media/atomisp/pci/sh_css.c | 118 ---------------------
1 file changed, 118 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 6d3c4a0558e1..c3f08c69f36d 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -74,15 +74,6 @@
#define SH_CSS_VIDEO_BUFFER_ALIGNMENT 0
-#if WITH_PC_MONITORING
-#define MULTIPLE_SAMPLES 1
-#define NOF_SAMPLES 60
-#include "linux/kthread.h"
-#include "linux/sched.h"
-#include "linux/delay.h"
-#include "sh_css_metrics.h"
-static int thread_alive;
-#endif /* WITH_PC_MONITORING */
#include "ia_css_spctrl.h"
#include "ia_css_version_data.h"
@@ -1261,89 +1252,6 @@ static inline int stream_unregister_with_csi_rx(
}
#endif
-#if WITH_PC_MONITORING
-static struct task_struct *my_kthread; /* Handle for the monitoring thread */
-static int sh_binary_running; /* Enable sampling in the thread */
-
-static void print_pc_histo(char *core_name, struct sh_css_pc_histogram *hist)
-{
- unsigned int i;
- unsigned int cnt_run = 0;
- unsigned int cnt_stall = 0;
-
- if (!hist)
- return;
-
- sh_css_print("%s histogram length = %d\n", core_name, hist->length);
- sh_css_print("%s PC\turn\tstall\n", core_name);
-
- for (i = 0; i < hist->length; i++) {
- if ((hist->run[i] == 0) && (hist->run[i] == hist->stall[i]))
- continue;
- sh_css_print("%s %d\t%d\t%d\n",
- core_name, i, hist->run[i], hist->stall[i]);
- cnt_run += hist->run[i];
- cnt_stall += hist->stall[i];
- }
-
- sh_css_print(" Statistics for %s, cnt_run = %d, cnt_stall = %d, hist->length = %d\n",
- core_name, cnt_run, cnt_stall, hist->length);
-}
-
-static void print_pc_histogram(void)
-{
- struct ia_css_binary_metrics *metrics;
-
- for (metrics = sh_css_metrics.binary_metrics;
- metrics;
- metrics = metrics->next) {
- if (metrics->mode == IA_CSS_BINARY_MODE_PREVIEW ||
- metrics->mode == IA_CSS_BINARY_MODE_VF_PP) {
- sh_css_print("pc_histogram for binary %d is SKIPPED\n",
- metrics->id);
- continue;
- }
-
- sh_css_print(" pc_histogram for binary %d\n", metrics->id);
- print_pc_histo(" ISP", &metrics->isp_histogram);
- print_pc_histo(" SP", &metrics->sp_histogram);
- sh_css_print("print_pc_histogram() done for binary->id = %d, done.\n",
- metrics->id);
- }
-
- sh_css_print("PC_MONITORING:print_pc_histogram() -- DONE\n");
-}
-
-static int pc_monitoring(void *data)
-{
- int i = 0;
-
- (void)data;
- while (true) {
- if (sh_binary_running) {
- sh_css_metrics_sample_pcs();
-#if MULTIPLE_SAMPLES
- for (i = 0; i < NOF_SAMPLES; i++)
- sh_css_metrics_sample_pcs();
-#endif
- }
- usleep_range(10, 50);
- }
- return 0;
-}
-
-static void spying_thread_create(void)
-{
- my_kthread = kthread_run(pc_monitoring, NULL, "sh_pc_monitor");
- sh_css_metrics_enable_pc_histogram(1);
-}
-
-static void input_frame_info(struct ia_css_frame_info frame_info)
-{
- sh_css_print("SH_CSS:input_frame_info() -- frame->info.res.width = %d, frame->info.res.height = %d, format = %d\n",
- frame_info.res.width, frame_info.res.height, frame_info.format);
-}
-#endif /* WITH_PC_MONITORING */
static void
start_binary(struct ia_css_pipe *pipe,
@@ -1355,15 +1263,6 @@ start_binary(struct ia_css_pipe *pipe,
if (binary)
sh_css_metrics_start_binary(&binary->metrics);
-#if WITH_PC_MONITORING
- sh_css_print("PC_MONITORING: %s() -- binary id = %d , enable_dvs_envelope = %d\n",
- __func__, binary->info->sp.id,
- binary->info->sp.enable.dvs_envelope);
- input_frame_info(binary->in_frame_info);
-
- if (binary && binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_VIDEO)
- sh_binary_running = true;
-#endif
#if !defined(ISP2401)
if (pipe->stream->reconfigure_css_rx) {
@@ -1754,14 +1653,6 @@ ia_css_init(struct device *dev, const struct ia_css_env *env,
return err;
}
-#if WITH_PC_MONITORING
- if (!thread_alive) {
- thread_alive++;
- sh_css_print("PC_MONITORING: %s() -- create thread DISABLED\n",
- __func__);
- spying_thread_create();
- }
-#endif
if (!sh_css_hrt_system_is_idle()) {
IA_CSS_LEAVE_ERR(-EBUSY);
return -EBUSY;
@@ -2427,10 +2318,6 @@ void
ia_css_uninit(void)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_uninit() enter: void\n");
-#if WITH_PC_MONITORING
- sh_css_print("PC_MONITORING: %s() -- started\n", __func__);
- print_pc_histogram();
-#endif
sh_css_params_free_default_gdc_lut();
@@ -2479,11 +2366,6 @@ int ia_css_irq_translate(
if (status == hrt_isp_css_irq_status_error)
return -EINVAL;
-#if WITH_PC_MONITORING
- sh_css_print("PC_MONITORING: %s() irq = %d, sh_binary_running set to 0\n",
- __func__, irq);
- sh_binary_running = 0;
-#endif
switch (irq) {
case virq_sp:
--
2.33.1
next prev parent reply other threads:[~2021-11-16 11:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 11:28 [PATCH 00/23] Make the code closer to candrpv_0415 firmware Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 01/23] media: atomisp: get rid of phys event abstractions Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 02/23] media: atomisp: get rid of if CONFIG_ON_FRAME_ENQUEUE Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 03/23] media: atomisp: shift some structs from input_system_local Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 04/23] media: atomisp: ia_css_stream.h: remove ifdefs from the header Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 05/23] media: atomisp: fix comments coding style at sh_css.c Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 06/23] media: atomisp: Avoid some {} just to define new vars Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 07/23] media: atomisp: drop two vars that are currently ignored Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 08/23] media: atomisp: drop an useless #ifdef ISP2401 Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 09/23] media: atomisp: remove #ifdef HAS_OUTPUT_SYSTEM Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 10/23] media: atomisp: drop #ifdef SH_CSS_ENABLE_PER_FRAME_PARAMS Mauro Carvalho Chehab
2021-11-16 11:28 ` Mauro Carvalho Chehab [this message]
2021-11-16 11:28 ` [PATCH 12/23] media: atomisp: remove #ifdef SH_CSS_ENABLE_METADATA Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 13/23] media: atomisp: solve #ifdef HAS_NO_PACKED_RAW_PIXELS Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 14/23] media: atomisp: drop crop code at stream create function Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 15/23] media: atomisp: get rid of ia_css_stream_load() Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 16/23] media: atomisp: unify ia_css_stream stop logic Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 17/23] media: atomisp: drop ia_css_pipe_update_qos_ext_mapped_arg Mauro Carvalho Chehab
2021-11-16 11:28 ` [PATCH 18/23] media: atomisp: drop a dead code Mauro Carvalho Chehab
2021-11-16 11:29 ` [PATCH 19/23] media: atomisp: get rid of some weird warn-suppress logic Mauro Carvalho Chehab
2021-11-16 11:29 ` [PATCH 20/23] media: atomisp: drop check_pipe_resolutions() logic Mauro Carvalho Chehab
2021-11-16 11:29 ` [PATCH 21/23] media: atomisp: warn if mipi de-allocation failed Mauro Carvalho Chehab
2021-11-16 11:29 ` [PATCH 22/23] media: atomisp: make sh_css similar to Intel Aero driver Mauro Carvalho Chehab
2021-11-16 11:29 ` [PATCH 23/23] media: atomisp: get rid of #ifdef ISP_VEC_NELEMS Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e50ea6f43767258f4ecedf7100f97331a1eb0069.1637061474.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linuxarm@huawei.com \
--cc=mauro.chehab@huawei.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=vrzh@vrzh.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®