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>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Deepak R Varma <drv@mailo.com>,
Ding Xiang <dingxiang@cmss.chinamobile.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Martiros Shakhzadyan <vrzh@vrzh.net>,
Masahiro Yamada <masahiroy@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Tsuchiya Yuto <kitakar@gmail.com>,
Yang Li <abaci-bugfix@linux.alibaba.com>,
Zheng Yongjun <zhengyongjun3@huawei.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: [PATCH 10/23] media: atomisp: drop #ifdef SH_CSS_ENABLE_PER_FRAME_PARAMS
Date: Tue, 16 Nov 2021 11:28:51 +0000 [thread overview]
Message-ID: <cf9d37dbae4b3673ce0e6573fb2cab5e1ec00cfe.1637061474.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1637061474.git.mchehab+huawei@kernel.org>
This is enabled for the firmware we're using. So, just drop
the if's.
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 | 4 ----
.../staging/media/atomisp/pci/sh_css_internal.h | 2 --
.../staging/media/atomisp/pci/sh_css_params.c | 17 -----------------
drivers/staging/media/atomisp/pci/sh_css_sp.c | 2 --
.../staging/media/atomisp/pci/system_global.h | 3 ---
5 files changed, 28 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 3a347b72e4bd..6d3c4a0558e1 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -4154,14 +4154,12 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
return_err = ia_css_bufq_enqueue_buffer(thread_id,
queue_id,
(uint32_t)h_vbuf->vptr);
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
if (!return_err &&
buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) {
IA_CSS_LOG("pfp: enqueued OF %d to q %d thread %d",
ddr_buffer.payload.frame.frame_data,
queue_id, thread_id);
}
-#endif
}
if (!return_err) {
@@ -4364,12 +4362,10 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
sh_css_sp_get_binary_copy_size();
#endif
}
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
if (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) {
IA_CSS_LOG("pfp: dequeued OF %d with config id %d thread %d",
frame->data, frame->isp_config_id, thread_id);
}
-#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
"ia_css_pipe_dequeue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
diff --git a/drivers/staging/media/atomisp/pci/sh_css_internal.h b/drivers/staging/media/atomisp/pci/sh_css_internal.h
index f26df3f44a7a..87ac3ea15dfc 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_internal.h
+++ b/drivers/staging/media/atomisp/pci/sh_css_internal.h
@@ -536,9 +536,7 @@ struct sh_css_sp_pipeline {
ia_css_ptr cont_buf; /* Address of continuous buffer */
} metadata;
#endif
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
u32 output_frame_queue_id;
-#endif
union {
struct {
u32 bytes_available;
diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c
index b3ef6b4c3225..448b07162382 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_params.c
@@ -731,13 +731,11 @@ sh_css_set_global_isp_config_on_pipe(
const struct ia_css_isp_config *config,
struct ia_css_pipe *pipe);
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
static int
sh_css_set_per_frame_isp_config_on_pipe(
struct ia_css_stream *stream,
const struct ia_css_isp_config *config,
struct ia_css_pipe *pipe);
-#endif
static int
sh_css_update_uds_and_crop_info_based_on_zoom_region(
@@ -1905,11 +1903,9 @@ ia_css_stream_set_isp_config_on_pipe(
IA_CSS_ENTER("stream=%p, config=%p, pipe=%p", stream, config, pipe);
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
if (config->output_frame)
err = sh_css_set_per_frame_isp_config_on_pipe(stream, config, pipe);
else
-#endif
err = sh_css_set_global_isp_config_on_pipe(stream->pipes[0], config, pipe);
IA_CSS_LEAVE_ERR(err);
@@ -1930,11 +1926,9 @@ ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "config=%p\n", config);
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
if (config->output_frame)
err = sh_css_set_per_frame_isp_config_on_pipe(pipe->stream, config, pipe);
else
-#endif
err = sh_css_set_global_isp_config_on_pipe(pipe, config, pipe_in);
IA_CSS_LEAVE_ERR(err);
return err;
@@ -1969,7 +1963,6 @@ sh_css_set_global_isp_config_on_pipe(
return err;
}
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
static int
sh_css_set_per_frame_isp_config_on_pipe(
struct ia_css_stream *stream,
@@ -2039,7 +2032,6 @@ sh_css_set_per_frame_isp_config_on_pipe(
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
-#endif
static int
sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
@@ -3253,15 +3245,10 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
isp_pipe_version = ia_css_pipe_get_isp_pipe_version(pipe);
ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
ia_css_query_internal_queue_id(params->output_frame
? IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET
: IA_CSS_BUFFER_TYPE_PARAMETER_SET,
thread_id, &queue_id);
-#else
- ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_PARAMETER_SET, thread_id,
- &queue_id);
-#endif
if (!sh_css_sp_is_running()) {
/* SP is not running. The queues are not valid */
err = -EBUSY;
@@ -3357,12 +3344,10 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
err = ia_css_bufq_enqueue_buffer(thread_id, queue_id, (uint32_t)cpy);
if (err) {
free_ia_css_isp_parameter_set_info(cpy);
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
IA_CSS_LOG("pfp: FAILED to add config id %d for OF %d to q %d on thread %d",
isp_params_info.isp_parameters_id,
isp_params_info.output_frame_ptr,
queue_id, thread_id);
-#endif
break;
} else {
/* TMP: check discrepancy between nr of enqueued
@@ -3384,12 +3369,10 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
(uint8_t)thread_id,
(uint8_t)queue_id,
0);
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
IA_CSS_LOG("pfp: added config id %d for OF %d to q %d on thread %d",
isp_params_info.isp_parameters_id,
isp_params_info.output_frame_ptr,
queue_id, thread_id);
-#endif
}
/* clean-up old copy */
ia_css_dequeue_param_buffers(/*pipe_num*/);
diff --git a/drivers/staging/media/atomisp/pci/sh_css_sp.c b/drivers/staging/media/atomisp/pci/sh_css_sp.c
index ff7c2c5fd94d..4a0206f564c9 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_sp.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_sp.c
@@ -1319,14 +1319,12 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
(void)md_info;
#endif
-#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
sh_css_sp_group.pipe[thread_id].output_frame_queue_id = (uint32_t)SH_CSS_INVALID_QUEUE_ID;
if (pipe_id != IA_CSS_PIPE_ID_COPY) {
ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id,
(enum sh_css_queue_id *)(
&sh_css_sp_group.pipe[thread_id].output_frame_queue_id));
}
-#endif
IA_CSS_LOG("pipe_id %d port_config %08x",
pipe_id, sh_css_sp_group.pipe[thread_id].inout_port_config);
diff --git a/drivers/staging/media/atomisp/pci/system_global.h b/drivers/staging/media/atomisp/pci/system_global.h
index 9b22b8c168be..060b924023ec 100644
--- a/drivers/staging/media/atomisp/pci/system_global.h
+++ b/drivers/staging/media/atomisp/pci/system_global.h
@@ -25,9 +25,6 @@
* N.B. the 3 input formatters are of 2 different classess
*/
-/* per-frame parameter handling support */
-#define SH_CSS_ENABLE_PER_FRAME_PARAMS
-
#define DMA_DDR_TO_VAMEM_WORKAROUND
#define DMA_DDR_TO_HMEM_WORKAROUND
--
2.33.1
next prev parent reply other threads:[~2021-11-16 11:33 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 ` Mauro Carvalho Chehab [this message]
2021-11-16 11:28 ` [PATCH 11/23] media: atomisp: drop #ifdef WITH_PC_MONITORING Mauro Carvalho Chehab
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=cf9d37dbae4b3673ce0e6573fb2cab5e1ec00cfe.1637061474.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=abaci-bugfix@linux.alibaba.com \
--cc=adobriyan@gmail.com \
--cc=dingxiang@cmss.chinamobile.com \
--cc=drv@mailo.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kitakar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linuxarm@huawei.com \
--cc=masahiroy@kernel.org \
--cc=mauro.chehab@huawei.com \
--cc=mchehab@kernel.org \
--cc=nathan@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=sakari.ailus@linux.intel.com \
--cc=vrzh@vrzh.net \
--cc=zhengyongjun3@huawei.com \
/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®