From nobody Sun Jun 14 17:34:12 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B459522A7F9 for ; Sat, 4 Apr 2026 12:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775305091; cv=none; b=mreZnHZPe2BI0fEM7sD7zuQJcQ5QIHLz9Z8+gZdo2X2nzqK9+rC7Z5SFEeypw5XEAnC0x4rI3X3RHNkQRb5cAaG6L1EMykOTOZc6s8zSC6FYJfzacStO3oyQ8VNuC7D9eNbY0bgvhheICbfM9JpS1Dtf54bJrWlU9Q0wXs6CKrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775305091; c=relaxed/simple; bh=AkabFUGAkZE2eyvcIF8PNV6NL3mmr50IutCPhNS2V4o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s4lw/fWEzzoJUrXUhuD2IK7MzKeQtpSv9Gj9cJaQYx0AbDZbBc75A3AN3Q9eBWw2ww+avmpWxsudDJvf/GXh48xvHg4/2pgWCRdaBZLZOOue7l0mTRKh+UbGDNfu3VCMhYI8fl7x9MW5snp9yVB2lfTQB527H4KdHm0VGHz4wA4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Y7So4M95; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y7So4M95" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-48558d6ef83so26441015e9.3 for ; Sat, 04 Apr 2026 05:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775305088; x=1775909888; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PPGMod7ytQAkDmoXaGJE6MlLHF6RiPtjuIVE+LDRQX4=; b=Y7So4M95WjRZhZC6dFCRCdBt6ro48HQNHaUfUCJQqG5Ad06eS/MkgT3IO8qZtJwpmP xb8HeFxibU8/6KLFAsftoXCtwt8CHytf5t59Lr09b5nOnaaWFhoguVrli2PRVRc93AuW CiPcXWRM/wAW/6RqNQLUa72Zmyr/ZK0kyMWbHwClLCocJFGjhV53hSV0LMpsZoqwS8UD 38kSIj8D89qmNSoWOESsREYcRBNs6jIOg7texPHdOffRDGrH1Lb8MfJL0UGKtRJ5armV tGeeVBFEhHi4VluEqxEhYJSIVTpr38FEvgAPjKiW3rAI8JCtHk+RPMUpRA4tDImDFXT4 xGxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775305088; x=1775909888; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PPGMod7ytQAkDmoXaGJE6MlLHF6RiPtjuIVE+LDRQX4=; b=eRlsfdsKhLkW5/GLr3w9ZBsRRM1OXnHar8JotKw6xj3xwJ9hcPjJdRXCwyrZlCP9eJ YzMkaLZt7A3i4B1FNdW+Yj+62jDDRd3aITr0QXk+yZnkXWGkdsR70tal/g3dp/VfBP3E ikcfoAXSo7rW+M060j6IQ79ogycfO/xQvtIKON1X5X0pI3rAZGHKv/a8BGCqig16UZx2 PpA6vChy1r6NrW9UsdN9sTlSoPzZYIR92VDEkREl8rhw9+1jOZ1UglYPd2yDIJGoB6pY Tp+NvILsPoXNFbQB3+luuoS+EQdkQPzJRqwcwcPec7oiY6nOFYcgPiXNp+u+F8q4QFvo n78A== X-Forwarded-Encrypted: i=1; AJvYcCUocI+CraE5L9WeKBszaxircjhXY+hp93L0alRPllJ3UHAmOD79yn3v/X4FE+zVlTgRyDzyNQBrcjIPWuc=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1BVje3NTb8ockWYWOnHwfvlz3vgE/UiUBXId2j+PZ93Xi5Jjv 5glH08ntxyTz1ziG8y3aoVQsYsGMT3Kyx5a0QCypoE9iLqPaXA5VDtcwyryHWdff7uw= X-Gm-Gg: AeBDietB6mNM0oLFeyNUx2V7YrNztH8T6I/u3BzzGuU12hu/XIyjswx4PpvlfBYl2BL jII4VF+TTg6FXFDRvvOgOSDSqyEee3K6+tnPpMsniAgI4t1Y/84ZhwX7myrxBYo81FfUs6A5WJW Iq7Q1VBBD2Ht+7Dxl66BQvMHY5EBWecTZ35LfdGSci9GR9kUNETPkVgGmhClx3RNbEmXSmMqANb +lpFjWsA62WEXPG2nNbgYcxeEFh8c5Arr97nC9/Tfjpy+UH+lkfrfvkn1a7wBOqWDXQeIyqILVF aUIR5eQfrMilMmewitgc8cAGZr3Sx+9NU7shJ4clgDxt8DAcMz+ff8XFVzT1U+F1p0suVRJKiEg GAzn1W9l5WQXPF5YBgEt58+Ele+gquxN7kmknga92R1qtnVhCMF9BUMUqbaeC9wJHebK/noS8EO nZyU7mOSwoYSF6pAZ9juxG X-Received: by 2002:a05:600c:64cd:b0:487:1fbf:e0bb with SMTP id 5b1f17b1804b1-488996a1c9dmr103185605e9.6.1775305087673; Sat, 04 Apr 2026 05:18:07 -0700 (PDT) Received: from MEROWN ([85.93.99.108]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887e83682fsm346987485e9.7.2026.04.04.05.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2026 05:18:07 -0700 (PDT) From: Daniil Bulgar To: Andy Shevchenko , Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Cc: Daniil Bulgar , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH] staging: media: atomisp: pci: cleanup and refactor tracing functions Date: Sat, 4 Apr 2026 14:16:58 +0200 Message-ID: <20260404121701.47745-1-bulgardaniil18@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The current tracing in sh_css.c contains ftrace-like enter/leave logs that clutter the code and provide little diagnostic value. This patch removes these redundant traces and updates the remaining useful logs to use __func__ for better maintainability. Signed-off-by: Daniil Bulgar --- drivers/staging/media/atomisp/pci/sh_css.c | 226 +++++---------------- 1 file changed, 55 insertions(+), 171 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/m= edia/atomisp/pci/sh_css.c index 6cda5925f..bfa50d7de 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -464,9 +464,6 @@ sh_css_config_input_network_2400(struct ia_css_stream *= stream) assert(stream); assert(pipe); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_config_input_network() enter:\n"); - if (pipe->pipeline.stages) binary =3D pipe->pipeline.stages->binary; =20 @@ -499,8 +496,6 @@ sh_css_config_input_network_2400(struct ia_css_stream *= stream) vblank_cycles =3D vblank_lines * (width + hblank_cycles); sh_css_sp_configure_sync_gen(width, height, hblank_cycles, vblank_cycles= ); } - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_config_input_network() leave:\n"); return 0; } =20 @@ -848,8 +843,6 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_= descr( { bool rc; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_translate_stream_cfg_to_isys_stream_descr() enter:\n"); rc =3D sh_css_translate_stream_cfg_to_input_system_input_port_id(stream_= cfg, isys_stream_descr); rc &=3D sh_css_translate_stream_cfg_to_input_system_input_port_type(strea= m_cfg, @@ -863,10 +856,6 @@ static bool sh_css_translate_stream_cfg_to_isys_stream= _descr( isys_stream_descr->linked_isys_stream_id =3D (int8_t) stream_cfg->isys_config[isys_stream_idx].linked_isys_stream_id; =20 - if (IS_ISP2401) - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n"); - return rc; } =20 @@ -899,7 +888,7 @@ sh_css_config_input_network_2401(struct ia_css_stream *= stream) =20 assert(stream); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_config_input_network() enter 0x%p:\n", stream); + "%s enter 0x%p:\n", __func__, stream); =20 if (stream->config.continuous) { if (stream->last_pipe->config.mode =3D=3D IA_CSS_PIPE_MODE_CAPTURE) @@ -982,10 +971,6 @@ sh_css_config_input_network_2401(struct ia_css_stream = *stream) return -EINVAL; } } - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_config_input_network() leave:\n"); - return 0; } =20 @@ -1201,16 +1186,10 @@ sh_css_invalidate_shading_tables(struct ia_css_stre= am *stream) =20 assert(stream); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "sh_css_invalidate_shading_tables() enter:\n"); - for (i =3D 0; i < stream->num_pipes; i++) { assert(stream->pipes[i]); sh_css_pipe_free_shading_table(stream->pipes[i]); } - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "sh_css_invalidate_shading_tables() leave: return_void\n"); } =20 static void @@ -1314,8 +1293,6 @@ ia_css_load_firmware(struct device *dev, const struct= ia_css_env *env, if (!fw) return -EINVAL; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_load_firmware() enter\n"); - /* make sure we initialize my_css */ if (my_css.flush !=3D env->cpu_mem_env.flush) { ia_css_reset_defaults(&my_css); @@ -1326,7 +1303,6 @@ ia_css_load_firmware(struct device *dev, const struct= ia_css_env *env, if (!err) err =3D ia_css_binary_init_infos(); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_load_firmware() leave\n"); return err; } =20 @@ -1864,7 +1840,7 @@ pipe_release_pipe_num(unsigned int pipe_num) my_css.all_pipes[pipe_num] =3D NULL; my_css.pipe_counter--; ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "pipe_release_pipe_num (%d)\n", pipe_num); + "%s (%d)\n", __func__, pipe_num); } =20 static int @@ -1946,8 +1922,8 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe) if (pipe->pipe_settings.preview.copy_pipe) { err =3D ia_css_pipe_destroy(pipe->pipe_settings.preview.copy_pipe); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipe_destroy(): destroyed internal copy pipe err=3D%d\n", - err); + "%s: destroyed internal copy pipe err=3D%d\n", + __func__, err); } } break; @@ -1960,8 +1936,8 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe) if (pipe->pipe_settings.video.copy_pipe) { err =3D ia_css_pipe_destroy(pipe->pipe_settings.video.copy_pipe); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipe_destroy(): destroyed internal copy pipe err=3D%d\n", - err); + "%s: destroyed internal copy pipe err=3D%d\n", + __func__, err); } } ia_css_frame_free_multiple(NUM_VIDEO_TNR_FRAMES, @@ -1998,8 +1974,6 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe) void ia_css_uninit(void) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_uninit() enter: void\n"); - sh_css_params_free_default_gdc_lut(); =20 /* cleanup generic data */ @@ -2021,8 +1995,6 @@ ia_css_uninit(void) sh_css_sp_reset_global_vars(); =20 ia_css_isys_uninit(); - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_uninit() leave: return_vo= id\n"); } =20 int ia_css_irq_translate( @@ -2035,7 +2007,8 @@ int ia_css_irq_translate( /* irq_infos can be NULL, but that would make the function useless */ /* assert(irq_infos !=3D NULL); */ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_irq_translate() enter: irq_infos=3D%p\n", irq_infos); + "%s enter: irq_infos=3D%p\n", + __func__, irq_infos); =20 while (status =3D=3D hrt_isp_css_irq_status_more_irqs) { status =3D virq_get_channel_id(&irq); @@ -2085,8 +2058,8 @@ int ia_css_irq_translate( *irq_infos =3D infos; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_irq_translate() leave: irq_infos=3D%u\n", - infos); + "%s leave: irq_infos=3D%u\n", + __func__, infos); =20 return 0; } @@ -2155,10 +2128,9 @@ sh_css_get_sw_interrupt_value(unsigned int irq) unsigned int irq_value; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "sh_css_get_sw_interrupt_value() enter: irq=3D%d\n", irq); + "%s enter: irq=3D%d\n", __func__, irq); irq_value =3D sh_css_sp_get_sw_interrupt_value(irq); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "sh_css_get_sw_interrupt_value() leave: irq_value=3D%d\n", irq_valu= e); + return irq_value; } =20 @@ -2179,8 +2151,6 @@ static int load_copy_binary( /* next_binary can be NULL */ assert(pipe); assert(copy_binary); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "load_copy_binary() enter:\n"); =20 if (next_binary) { copy_out_info =3D next_binary->in_frame_info; @@ -2254,12 +2224,12 @@ alloc_continuous_frames(struct ia_css_pipe *pipe, b= ool init_time) =20 if (pipe->stream->config.pack_raw_pixels) { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW_PACKED\n"); + "%s IA_CSS_FRAME_FORMAT_RAW_PACKED\n", __func__); ref_info.format =3D IA_CSS_FRAME_FORMAT_RAW_PACKED; } else { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW\n"); + "%s IA_CSS_FRAME_FORMAT_RAW\n", __func__); ref_info.format =3D IA_CSS_FRAME_FORMAT_RAW; } =20 @@ -2543,8 +2513,6 @@ static int add_firmwares( struct ia_css_pipeline_stage_desc stage_desc; =20 /* all args can be NULL ??? */ - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "add_firmwares() enter:\n"); =20 for (; fw; fw =3D fw->next) { struct ia_css_frame *out[IA_CSS_BINARY_MAX_OUTPUT_PORTS] =3D {NULL}; @@ -2604,9 +2572,6 @@ static int add_vf_pp_stage( ia_css_pipe_util_create_output_frames(out_frames); me =3D &pipe->pipeline; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "add_vf_pp_stage() enter:\n"); - *vf_pp_stage =3D NULL; =20 last_fw =3D last_output_firmware(pipe->vf_stage); @@ -2653,8 +2618,6 @@ static int add_yuv_scaler_stage( assert(me); assert(yuv_scaler_binary); assert(pre_vf_pp_stage); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "add_yuv_scaler_stage() enter:\n"); =20 *pre_vf_pp_stage =3D NULL; ia_css_pipe_util_create_output_frames(out_frames); @@ -2684,9 +2647,6 @@ static int add_yuv_scaler_stage( /* If a firmware produce vf_pp output, we set that as vf_pp input */ (*pre_vf_pp_stage)->args.vf_downscale_log2 =3D yuv_scaler_binary->vf_downscale_log2; - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "add_yuv_scaler_stage() leave:\n"); return err; } =20 @@ -2710,8 +2670,6 @@ static int add_capture_pp_stage( assert(me); assert(capture_pp_binary); assert(capture_pp_stage); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "add_capture_pp_stage() enter:\n"); =20 *capture_pp_stage =3D NULL; ia_css_pipe_util_create_output_frames(out_frames); @@ -2765,7 +2723,6 @@ static void sh_css_setup_queues(void) sp_dmem_store_uint32(SP0_ID, (unsigned int)sp_address_of(host_sp_queues_initialized), (uint32_t)(1)); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_setup_queues() leave:\n"); } =20 static int @@ -3519,8 +3476,9 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe, ddr_buffer.payload.frame.flashed =3D 0; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipe_enqueue_buffer() buf_type=3D%d, data(DDR address)=3D0= x%x\n", - buf_type, buffer->data.frame->data); + "%s buf_type=3D%d, data(DDR address)=3D0x%x\n", + __func__, buf_type, + buffer->data.frame->data); =20 } =20 @@ -3763,8 +3721,9 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe, } =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipe_dequeue_buffer() buf_type=3D%d, data(DDR address)= =3D0x%x\n", - buf_type, buffer->data.frame->data); + "%s buf_type=3D%d, data(DDR address)=3D0x%x\n", + __func__, buf_type, + buffer->data.frame->data); =20 break; case IA_CSS_BUFFER_TYPE_3A_STATISTICS: @@ -4211,7 +4170,8 @@ void sh_css_enable_cont_capt(bool enable, bool stop_copy_preview) { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "sh_css_enable_cont_capt() enter: enable=3D%d\n", enable); + "%s enter: enable=3D%d\n", + __func__, enable); //my_css.cont_capt =3D enable; my_css.stop_copy_preview =3D stop_copy_preview; } @@ -4223,13 +4183,14 @@ sh_css_continuous_is_enabled(uint8_t pipe_num) bool continuous; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "sh_css_continuous_is_enabled() enter: pipe_num=3D%d\n", pipe_num); + "%s enter: pipe_num=3D%d\n", + __func__, pipe_num); =20 pipe =3D find_pipe_by_num(pipe_num); continuous =3D pipe && pipe->stream->config.continuous; ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "sh_css_continuous_is_enabled() leave: enable=3D%d\n", - continuous); + "%s leave: enable=3D%d\n", + __func__, continuous); return continuous; } =20 @@ -4240,7 +4201,6 @@ ia_css_stream_get_max_buffer_depth(struct ia_css_stre= am *stream, { if (!buffer_depth) return -EINVAL; - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_max_buffer_dep= th() enter: void\n"); (void)stream; *buffer_depth =3D NUM_CONTINUOUS_FRAMES; return 0; @@ -4249,7 +4209,9 @@ ia_css_stream_get_max_buffer_depth(struct ia_css_stre= am *stream, int ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_de= pth) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_set_buffer_depth()= enter: num_frames=3D%d\n", buffer_depth); + ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, + "%s enter: num_frames=3D%d\n", + __func__, buffer_depth); (void)stream; if (buffer_depth > NUM_CONTINUOUS_FRAMES || buffer_depth < 1) return -EINVAL; @@ -4266,7 +4228,6 @@ ia_css_stream_get_buffer_depth(struct ia_css_stream *= stream, { if (!buffer_depth) return -EINVAL; - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_buffer_depth()= enter: void\n"); (void)stream; *buffer_depth =3D stream->config.target_num_cont_raw_buf; return 0; @@ -4278,7 +4239,7 @@ sh_css_get_mipi_sizes_for_check(const unsigned int po= rt, const unsigned int idx) OP___assert(port < N_CSI_PORTS); OP___assert(idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_get_mipi_sizes_for_check(port %d, idx %d): %d\n", + "%s(port %d, idx %d): %d\n", __func__, port, idx, my_css.mipi_sizes_for_check[port][idx]); return my_css.mipi_sizes_for_check[port][idx]; } @@ -4327,9 +4288,6 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe, int err =3D 0; struct ia_css_binary *binary =3D NULL; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_pipe_get_shading_info() enter:\n"); - binary =3D ia_css_pipe_get_shading_correction_binary(pipe); =20 if (binary) { @@ -4615,7 +4573,8 @@ static int load_video_binaries(struct ia_css_pipe *pi= pe) if (need_vf_pp) { /* save the current vf_info format for restoration later */ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "load_video_binaries() need_vf_pp; find video binary with YUV_LIN= E again\n"); + "%s need_vf_pp; find video binary with YUV_LINE again\n", + __func__); =20 vf_info_format =3D video_vf_info->format; =20 @@ -4659,8 +4618,8 @@ static int load_video_binaries(struct ia_css_pipe *pi= pe) pipe->num_invalid_frames *=3D 2; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "load_video_binaries() num_invalid_frames=3D%d dvs_frame_delay=3D%d= \n", - pipe->num_invalid_frames, pipe->dvs_frame_delay); + "%s num_invalid_frames=3D%d dvs_frame_delay=3D%d\n", + __func__, pipe->num_invalid_frames, pipe->dvs_frame_delay); =20 /* pqiao TODO: temp hack for PO, should be removed after offline YUVPP is= enabled */ if (!IS_ISP2401) { @@ -4855,8 +4814,6 @@ int sh_css_pipe_get_viewfinder_frame_info( assert(info); =20 /* We could print the pointer as input arg, and the values as output */ - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_pipe_get_viewfinder_frame_info() enter: void\n"); =20 if (pipe->mode =3D=3D IA_CSS_PIPE_ID_CAPTURE && (pipe->config.default_capture_config.mode =3D=3D IA_CSS_CAPTURE_MODE_= RAW || @@ -4866,11 +4823,8 @@ int sh_css_pipe_get_viewfinder_frame_info( *info =3D pipe->vf_output_info[idx]; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_pipe_get_viewfinder_frame_info() leave: \ - info.res.width=3D%d, info.res.height=3D%d, \ - info.padded_width=3D%d, info.format=3D%d, \ - info.raw_bit_depth=3D%d, info.raw_bayer_order=3D%d\n", - info->res.width, info->res.height, + "%s leave: info.res.width=3D%d, info.res.height=3D%d, info.padded_w= idth=3D%d, info.format=3D%d, info.raw_bit_depth=3D%d, info.raw_bayer_order= =3D%d\n", + __func__, info->res.width, info->res.height, info->padded_width, info->format, info->raw_bit_depth, info->raw_bayer_order); =20 @@ -5619,7 +5573,6 @@ static bool copy_on_sp(struct ia_css_pipe *pipe) bool rval; =20 assert(pipe); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "copy_on_sp() enter:\n"); =20 rval =3D true; =20 @@ -5802,9 +5755,6 @@ static int ia_css_pipe_create_cas_scaler_desc_single_= output( assert(in_info); assert(out_info); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_pipe_create_cas_scaler_desc() enter:\n"); - /* We assume that this function is used only for single output port case.= */ descr->num_output_stage =3D 1; =20 @@ -5902,9 +5852,6 @@ static int ia_css_pipe_create_cas_scaler_desc_single_= output( tmp_in_info =3D descr->internal_out_info[i]; } ERR: - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_pipe_create_cas_scaler_desc() leave, err=3D%d\n", - err); return err; } =20 @@ -5926,9 +5873,6 @@ ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe= *pipe, =20 unsigned int max_scale_factor_per_stage =3D MAX_PREFERRED_YUV_DS_PER_STEP; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_pipe_create_cas_scaler_desc() enter:\n"); - for (i =3D 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) { out_info[i] =3D NULL; vf_out_info[i] =3D NULL; @@ -6065,17 +6009,12 @@ ia_css_pipe_create_cas_scaler_desc(struct ia_css_pi= pe *pipe, tmp_in_info =3D descr->internal_out_info[i]; } ERR: - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_pipe_create_cas_scaler_desc() leave, err=3D%d\n", - err); return err; } =20 static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_d= escr *descr) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_pipe_destroy_cas_scaler_desc() enter:\n"); kfree(descr->in_info); descr->in_info =3D NULL; kfree(descr->internal_out_info); @@ -6086,8 +6025,6 @@ static void ia_css_pipe_destroy_cas_scaler_desc(struc= t ia_css_cas_binary_descr descr->vf_info =3D NULL; kfree(descr->is_output_stage); descr->is_output_stage =3D NULL; - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_pipe_destroy_cas_scaler_desc() leave\n"); } =20 static int @@ -6269,9 +6206,6 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe) ERR: if (need_scaler) ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr); - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "load_yuvpp_binaries() le= ave, err=3D%d\n", - err); return err; } =20 @@ -6381,7 +6315,6 @@ sh_css_pipe_load_binaries(struct ia_css_pipe *pipe) int err =3D 0; =20 assert(pipe); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_pipe_load_binarie= s() enter:\n"); =20 /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/ if (pipe->config.mode =3D=3D IA_CSS_PIPE_MODE_COPY) @@ -6680,9 +6613,6 @@ create_host_copy_pipeline(struct ia_css_pipe *pipe, int err =3D 0; struct ia_css_pipeline_stage_desc stage_desc; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "create_host_copy_pipeline() enter:\n"); - /* pipeline already created as part of create_host_pipeline_structure */ me =3D &pipe->pipeline; ia_css_pipeline_clean(me); @@ -6708,10 +6638,6 @@ create_host_copy_pipeline(struct ia_css_pipe *pipe, =20 ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous); - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "create_host_copy_pipeline() leave:\n"); - return err; } =20 @@ -6727,8 +6653,6 @@ create_host_isyscopy_capture_pipeline(struct ia_css_p= ipe *pipe) enum sh_css_queue_id queue_id; unsigned int max_input_width =3D MAX_VECTORS_PER_INPUT_LINE_CONT * ISP_VE= C_NELEMS; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "create_host_isyscopy_capture_pipeline() enter:\n"); ia_css_pipeline_clean(me); =20 /* Construct out_frame info */ @@ -6753,9 +6677,6 @@ create_host_isyscopy_capture_pipeline(struct ia_css_p= ipe *pipe) =20 ia_css_pipeline_finalize_stages(me, pipe->stream->config.continuous); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "create_host_isyscopy_capture_pipeline() leave:\n"); - return err; } =20 @@ -7098,9 +7019,6 @@ create_host_regular_capture_pipeline(struct ia_css_pi= pe *pipe) } ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.con= tinuous); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "create_host_regular_capture_pipeline() leave:\n"); - return 0; } =20 @@ -7189,9 +7107,6 @@ sh_css_pipe_get_output_frame_info(struct ia_css_pipe = *pipe, assert(pipe); assert(info); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_pipe_get_output_frame_info() enter:\n"); - *info =3D pipe->output_info[idx]; if (copy_on_sp(pipe) && pipe->stream->config.input_config.format =3D=3D ATOMISP_INPUT_FORMAT_= BINARY_8) { @@ -7206,9 +7121,6 @@ sh_css_pipe_get_output_frame_info(struct ia_css_pipe = *pipe, info->raw_bit_depth =3D ia_css_pipe_util_pipe_input_format_bpp(pipe); } - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_pipe_get_output_frame_info() leave:\n"); return 0; } =20 @@ -7280,16 +7192,12 @@ ia_css_pipeline_uses_params(struct ia_css_pipeline = *me) assert(me); =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipeline_uses_params() enter: me=3D%p\n", me); + "%s enter: me=3D%p\n", __func__, me); =20 for (stage =3D me->stages; stage; stage =3D stage->next) if (stage->binary_info && stage->binary_info->enable.params) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipeline_uses_params() leave: return_bool=3Dtrue\n"); return true; } - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipeline_uses_params() leave: return_bool=3Dfalse\n"); return false; } =20 @@ -7350,14 +7258,11 @@ int ia_css_stream_capture(struct ia_css_stream *str= eam, int num_captures, return -EINVAL; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_capture() enter: num_captures=3D%d, skip=3D%d, offse= t=3D%d\n", - num_captures, skip, offset); + "%s enter: num_captures=3D%d, skip=3D%d, offset=3D%d\n", + __func__, num_captures, skip, offset); =20 /* Check if the tag descriptor is valid */ if (num_captures < SH_CSS_MINIMUM_TAG_ID) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_capture() leave: return_err=3D%d\n", - -EINVAL); return -EINVAL; } =20 @@ -7370,7 +7275,7 @@ int ia_css_stream_capture(struct ia_css_stream *strea= m, int num_captures, if (!sh_css_sp_is_running()) { /* SP is not running. The queues are not valid */ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_capture() leaving:queues unavailable\n"); + "%s :queues unavailable\n", __func__); return -EBUSY; } =20 @@ -7382,10 +7287,6 @@ int ia_css_stream_capture(struct ia_css_stream *stre= am, int num_captures, */ return_err =3D ia_css_bufq_enqueue_tag_cmd((uint32_t)encoded_tag_descr); =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_capture() leave: return_err=3D%d\n", - return_err); - return return_err; } =20 @@ -7405,9 +7306,6 @@ sh_css_init_host_sp_control_vars(void) =20 unsigned int i; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_init_host_sp_control_vars() enter: void\n"); - fw =3D &sh_css_sp_fw; HIVE_ADDR_ia_css_ispctrl_sp_isp_started =3D fw->info.sp.isp_started; =20 @@ -7440,9 +7338,6 @@ sh_css_init_host_sp_control_vars(void) sh_css_update_host2sp_num_mipi_frames (my_css.num_mipi_frames[i]); } - - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "sh_css_init_host_sp_control_vars() leave: return_void\n"); } =20 /* @@ -7454,7 +7349,6 @@ ia_css_pipe_config ia_css_pipe_default_config =3D DEF= AULT_PIPE_CONFIG; =20 void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_config_defaults()\n"= ); memcpy(pipe_config, &ia_css_pipe_default_config, sizeof(*pipe_config)); } =20 @@ -7477,7 +7371,6 @@ ia_css_pipe_extra_config_defaults(struct ia_css_pipe_= extra_config *extra_config) =20 void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_con= fig) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_config_defaults()\= n"); assert(stream_config); memset(stream_config, 0, sizeof(*stream_config)); stream_config->online =3D true; @@ -7658,21 +7551,19 @@ int ia_css_pipe_get_info(const struct ia_css_pipe *pipe, struct ia_css_pipe_info *pipe_info) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_pipe_get_info()\n"); if (!pipe_info) { ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, - "ia_css_pipe_get_info: pipe_info cannot be NULL\n"); + "%s: pipe_info cannot be NULL\n", __func__); return -EINVAL; } if (!pipe || !pipe->stream) { ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, - "ia_css_pipe_get_info: ia_css_stream_create needs to be called bef= ore ia_css_[stream/pipe]_get_info\n"); + "%s: call ia_css_stream_create before ia_css_[stream/pipe]_get_info\n", + __func__); return -EINVAL; } /* we succeeded return the info */ *pipe_info =3D pipe->info; - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_get_info() leave\n"); return 0; } =20 @@ -7872,7 +7763,8 @@ ia_css_stream_create(const struct ia_css_stream_confi= g *stream_config, my_css.mipi_frame_size[port] =3D stream_config->mipi_buffer_config.siz= e_mem_words; } else { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_create() exit: error, need to set mipi frame size= .\n"); + "%s: unset mipi frame size.\n", + __func__); assert(stream_config->mipi_buffer_config.size_mem_words !=3D 0); err =3D -EINVAL; IA_CSS_LEAVE_ERR(err); @@ -7887,7 +7779,8 @@ ia_css_stream_create(const struct ia_css_stream_confi= g *stream_config, stream_config->mipi_buffer_config.nof_mipi_buffers; } else { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_create() exit: error, need to set number of mipi = frames.\n"); + "%s: unset number of mipi frames.\n", + __func__); assert(stream_config->mipi_buffer_config.nof_mipi_buffers !=3D 0); err =3D -EINVAL; IA_CSS_LEAVE_ERR(err); @@ -8311,7 +8204,6 @@ int ia_css_stream_get_info(const struct ia_css_stream *stream, struct ia_css_stream_info *stream_info) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_info: enter/ex= it\n"); assert(stream); assert(stream_info); =20 @@ -8375,11 +8267,10 @@ ia_css_stream_stop(struct ia_css_stream *stream) { int err =3D 0; =20 - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop() enter/exit\= n"); assert(stream); assert(stream->last_pipe); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop: stopping %d\= n", - stream->last_pipe->mode); + ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s: stopping %d\n", + __func__, stream->last_pipe->mode); =20 /* De-initialize mipi size checks */ if (!IS_ISP2401 && stream->config.mode =3D=3D IA_CSS_INPUT_MODE_BUFFERED_= SENSOR) { @@ -8426,7 +8317,6 @@ ia_css_stream_unload(struct ia_css_stream *stream) int i; =20 assert(stream); - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() enter,\n"= ); /* some checks */ assert(stream); for (i =3D 0; i < MAX_ACTIVE_STREAMS; i++) @@ -8434,17 +8324,18 @@ ia_css_stream_unload(struct ia_css_stream *stream) int j; =20 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_unload(): unloading %d (%p)\n", i, + "%s: unloading %d (%p)\n", + __func__, i, my_css_save.stream_seeds[i].stream); ia_css_stream_destroy(stream); for (j =3D 0; j < my_css_save.stream_seeds[i].num_pipes; j++) ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, - "ia_css_stream_unload(): after unloading %d (%p)\n", i, + "%s: after unloading %d (%p)\n", + __func__, i, my_css_save.stream_seeds[i].stream); break; } - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() exit,\n"); return 0; } =20 @@ -8452,7 +8343,6 @@ int ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe, enum ia_css_pipe_id *pipe_id) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_temp_pipe_to_pipe_id() en= ter/exit\n"); if (pipe) *pipe_id =3D pipe->mode; else @@ -8809,14 +8699,11 @@ ia_css_update_continuous_frames(struct ia_css_strea= m *stream) struct ia_css_pipe *pipe; unsigned int i; =20 - ia_css_debug_dtrace( - IA_CSS_DEBUG_TRACE, - "sh_css_update_continuous_frames() enter:\n"); - if (!stream) { ia_css_debug_dtrace( IA_CSS_DEBUG_TRACE, - "sh_css_update_continuous_frames() leave: invalid stream, return_voi= d\n"); + "%s leave: invalid stream, return_void\n", + __func__); return -EINVAL; } =20 @@ -8829,9 +8716,6 @@ ia_css_update_continuous_frames(struct ia_css_stream = *stream) =20 sh_css_update_host2sp_cont_num_raw_frames (stream->config.target_num_cont_raw_buf, true); - ia_css_debug_dtrace( - IA_CSS_DEBUG_TRACE, - "sh_css_update_continuous_frames() leave: return_void\n"); =20 return 0; } --=20 2.53.0