Skip to content

Commit

Permalink
media: atomisp: Debug hack
Browse files Browse the repository at this point in the history
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
jwrdegoede committed Oct 9, 2022
1 parent 0ed72c5 commit 69fc466
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
9 changes: 7 additions & 2 deletions drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,7 @@ int atomisp_q_video_buffer_to_css(struct atomisp_sub_device *asd,
if (err)
return -EINVAL;

dev_info(asd->isp->dev, "Enqueued frame with data at 0x%x into CSS\n", css_buf.data.frame->data);
return 0;
}

Expand Down Expand Up @@ -1086,6 +1087,7 @@ int atomisp_css_start(struct atomisp_sub_device *asd,
int ret = 0, i = 0;

if (in_reset) {
dev_info(isp->dev, "atomisp_css_start() in reset\n");
ret = atomisp_css_update_stream(asd);
if (ret)
return ret;
Expand All @@ -1106,6 +1108,7 @@ int atomisp_css_start(struct atomisp_sub_device *asd,
* recreated in the next stream on.
*/
if (!asd->stream_prepared) {
dev_info(isp->dev, "atomisp_css_start() calling create_pipes_stream()\n");
ret = atomisp_create_pipes_stream(asd);
if (ret)
return ret;
Expand All @@ -1117,7 +1120,7 @@ int atomisp_css_start(struct atomisp_sub_device *asd,
* so need to skip start sp procedure
*/
if (atomisp_streaming_count(isp)) {
dev_dbg(isp->dev, "skip start sp\n");
dev_info(isp->dev, "atomisp_css_start() skip start sp\n");
} else {
if (!sh_css_hrt_system_is_idle())
dev_err(isp->dev, "CSS HW not idle before starting SP\n");
Expand All @@ -1128,18 +1131,20 @@ int atomisp_css_start(struct atomisp_sub_device *asd,
} else {
sp_is_started = true;
}
dev_info(isp->dev, "atomisp_css_start() started sp\n");
}

for (i = 0; i < ATOMISP_INPUT_STREAM_NUM; i++) {
if (asd->stream_env[i].stream) {
dev_info(isp->dev, "atomisp_css_start() starting stream %d\n", i);
if (ia_css_stream_start(asd->stream_env[i]
.stream) != 0) {
dev_err(isp->dev, "stream[%d] start error.\n", i);
ret = -EINVAL;
goto start_err;
} else {
asd->stream_env[i].stream_state = CSS_STREAM_STARTED;
dev_dbg(isp->dev, "stream[%d] started.\n", i);
dev_info(isp->dev, "stream[%d] started.\n", i);
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion drivers/staging/media/atomisp/pci/ia_css_isp_configs.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,17 @@ int ia_css_configure_iterator(const struct ia_css_binary *binary,

ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "%s:\n", __func__);

if (!binary->info->mem_offsets.offsets.config)

if (!binary->info->mem_offsets.offsets.config) {
pr_info("ia_css_configure_iterator no config\n");
return 0;
}

pr_info("ia_css_configure_iterator iterator.size %d iterator.offset 0x%x address 0x%lx config_dmem %p\n",
(int)binary->info->mem_offsets.offsets.config->dmem.iterator.size,
(int)binary->info->mem_offsets.offsets.config->dmem.iterator.offset,
(long)binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address,
config_dmem);

size = binary->info->mem_offsets.offsets.config->dmem.iterator.size;
if (!size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ ia_css_iterator_config(
unsigned int size)
{
(void)size;
pr_info("to: 0x%lx from->input_info %p from->internal_info %p from->output_info %p from->vf_info %p\n",
(long)to, from->input_info, from->internal_info, from->output_info, from->vf_info);
ia_css_frame_info_to_frame_sp_info(&to->input_info, from->input_info);
ia_css_frame_info_to_frame_sp_info(&to->internal_info, from->internal_info);
ia_css_frame_info_to_frame_sp_info(&to->output_info, from->output_info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void ia_css_frame_dump(struct ia_css_frame *frame)
if (!frame)
return;

dev_dbg(atomisp_dev, "New frame %dx%d, format 0x%x padded-width %d raw_bit_depth %d valid %d dynamic_queue_id %d buf_type %d data %x data_bytes %d\n",
dev_info(atomisp_dev, "New frame %dx%d, format 0x%x padded-width %d raw_bit_depth %d valid %d dynamic_queue_id %d buf_type %d data %x data_bytes %d\n",
frame->info.res.width, frame->info.res.height, frame->info.format,
frame->info.padded_width, frame->info.raw_bit_depth, frame->valid,
frame->dynamic_queue_id, frame->buf_type, frame->data, frame->data_bytes);
Expand Down

0 comments on commit 69fc466

Please sign in to comment.