Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: linux@treblig.org, stanimir.k.varbanov@gmail.com,
	quic_vgarodia@quicinc.com, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: venus: Remove unused hfi_core_ping()
Date: Wed, 18 Dec 2024 15:46:30 +0000	[thread overview]
Message-ID: <2d5a519c-deb1-486a-9453-7f2131e162cc@linaro.org> (raw)
In-Reply-To: <20241216220628.1018633-1-linux@treblig.org>

On 16/12/2024 22:06, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> hfi_core_ping() was added by 2017's
> commit 09c2845e8fe4 ("[media] media: venus: hfi: add Host Firmware
> Interface (HFI)")
> 
> but has remained unused.
> 
> Remove it.
> 
> It was the only caller of the ->core_ping member of hfi_ops,
> so remove it, and the venus_core_ping that it pointed to.
> 
> Note I've left pky_sys_ping which seems to be the lowest level
> definition of the command.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
>   drivers/media/platform/qcom/venus/hfi.c       | 23 -------------------
>   drivers/media/platform/qcom/venus/hfi.h       |  2 --
>   drivers/media/platform/qcom/venus/hfi_venus.c | 11 ---------
>   3 files changed, 36 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c
> index e00aedb41d16..675e6fd1e9fa 100644
> --- a/drivers/media/platform/qcom/venus/hfi.c
> +++ b/drivers/media/platform/qcom/venus/hfi.c
> @@ -138,29 +138,6 @@ int hfi_core_trigger_ssr(struct venus_core *core, u32 type)
>   	return core->ops->core_trigger_ssr(core, type);
>   }
>   
> -int hfi_core_ping(struct venus_core *core)
> -{
> -	int ret;
> -
> -	mutex_lock(&core->lock);
> -
> -	ret = core->ops->core_ping(core, 0xbeef);
> -	if (ret)
> -		goto unlock;
> -
> -	ret = wait_for_completion_timeout(&core->done, TIMEOUT);
> -	if (!ret) {
> -		ret = -ETIMEDOUT;
> -		goto unlock;
> -	}
> -	ret = 0;
> -	if (core->error != HFI_ERR_NONE)
> -		ret = -ENODEV;
> -unlock:
> -	mutex_unlock(&core->lock);
> -	return ret;
> -}
> -
>   static int wait_session_msg(struct venus_inst *inst)
>   {
>   	int ret;
> diff --git a/drivers/media/platform/qcom/venus/hfi.h b/drivers/media/platform/qcom/venus/hfi.h
> index f25d412d6553..0338841d5992 100644
> --- a/drivers/media/platform/qcom/venus/hfi.h
> +++ b/drivers/media/platform/qcom/venus/hfi.h
> @@ -108,7 +108,6 @@ struct hfi_inst_ops {
>   struct hfi_ops {
>   	int (*core_init)(struct venus_core *core);
>   	int (*core_deinit)(struct venus_core *core);
> -	int (*core_ping)(struct venus_core *core, u32 cookie);
>   	int (*core_trigger_ssr)(struct venus_core *core, u32 trigger_type);
>   
>   	int (*session_init)(struct venus_inst *inst, u32 session_type,
> @@ -152,7 +151,6 @@ int hfi_core_deinit(struct venus_core *core, bool blocking);
>   int hfi_core_suspend(struct venus_core *core);
>   int hfi_core_resume(struct venus_core *core, bool force);
>   int hfi_core_trigger_ssr(struct venus_core *core, u32 type);
> -int hfi_core_ping(struct venus_core *core);
>   int hfi_session_create(struct venus_inst *inst, const struct hfi_inst_ops *ops);
>   void hfi_session_destroy(struct venus_inst *inst);
>   int hfi_session_init(struct venus_inst *inst, u32 pixfmt);
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
> index f9437b6412b9..a9167867063c 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
> @@ -1178,16 +1178,6 @@ static int venus_core_deinit(struct venus_core *core)
>   	return 0;
>   }
>   
> -static int venus_core_ping(struct venus_core *core, u32 cookie)
> -{
> -	struct venus_hfi_device *hdev = to_hfi_priv(core);
> -	struct hfi_sys_ping_pkt pkt;
> -
> -	pkt_sys_ping(&pkt, cookie);
> -
> -	return venus_iface_cmdq_write(hdev, &pkt, false);
> -}
> -
>   static int venus_core_trigger_ssr(struct venus_core *core, u32 trigger_type)
>   {
>   	struct venus_hfi_device *hdev = to_hfi_priv(core);
> @@ -1639,7 +1629,6 @@ static int venus_suspend(struct venus_core *core)
>   static const struct hfi_ops venus_hfi_ops = {
>   	.core_init			= venus_core_init,
>   	.core_deinit			= venus_core_deinit,
> -	.core_ping			= venus_core_ping,
>   	.core_trigger_ssr		= venus_core_trigger_ssr,
>   
>   	.session_init			= venus_session_init,

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

      reply	other threads:[~2024-12-18 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16 22:06 [PATCH] media: venus: Remove unused hfi_core_ping() linux
2024-12-18 15:46 ` Bryan O'Donoghue [this message]

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=2d5a519c-deb1-486a-9453-7f2131e162cc@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=mchehab@kernel.org \
    --cc=quic_vgarodia@quicinc.com \
    --cc=stanimir.k.varbanov@gmail.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