Skip to content

Commit 210afa1

Browse files
Dr. David Alan Gilberthverkuil
authored andcommitted
media: venus: Remove unused hfi_core_ping()
hfi_core_ping() was added by 2017's commit 09c2845 ("[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> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
1 parent 459997e commit 210afa1

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

drivers/media/platform/qcom/venus/hfi.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -138,29 +138,6 @@ int hfi_core_trigger_ssr(struct venus_core *core, u32 type)
138138
return core->ops->core_trigger_ssr(core, type);
139139
}
140140

141-
int hfi_core_ping(struct venus_core *core)
142-
{
143-
int ret;
144-
145-
mutex_lock(&core->lock);
146-
147-
ret = core->ops->core_ping(core, 0xbeef);
148-
if (ret)
149-
goto unlock;
150-
151-
ret = wait_for_completion_timeout(&core->done, TIMEOUT);
152-
if (!ret) {
153-
ret = -ETIMEDOUT;
154-
goto unlock;
155-
}
156-
ret = 0;
157-
if (core->error != HFI_ERR_NONE)
158-
ret = -ENODEV;
159-
unlock:
160-
mutex_unlock(&core->lock);
161-
return ret;
162-
}
163-
164141
static int wait_session_msg(struct venus_inst *inst)
165142
{
166143
int ret;

drivers/media/platform/qcom/venus/hfi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ struct hfi_inst_ops {
108108
struct hfi_ops {
109109
int (*core_init)(struct venus_core *core);
110110
int (*core_deinit)(struct venus_core *core);
111-
int (*core_ping)(struct venus_core *core, u32 cookie);
112111
int (*core_trigger_ssr)(struct venus_core *core, u32 trigger_type);
113112

114113
int (*session_init)(struct venus_inst *inst, u32 session_type,
@@ -152,7 +151,6 @@ int hfi_core_deinit(struct venus_core *core, bool blocking);
152151
int hfi_core_suspend(struct venus_core *core);
153152
int hfi_core_resume(struct venus_core *core, bool force);
154153
int hfi_core_trigger_ssr(struct venus_core *core, u32 type);
155-
int hfi_core_ping(struct venus_core *core);
156154
int hfi_session_create(struct venus_inst *inst, const struct hfi_inst_ops *ops);
157155
void hfi_session_destroy(struct venus_inst *inst);
158156
int hfi_session_init(struct venus_inst *inst, u32 pixfmt);

drivers/media/platform/qcom/venus/hfi_venus.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,16 +1178,6 @@ static int venus_core_deinit(struct venus_core *core)
11781178
return 0;
11791179
}
11801180

1181-
static int venus_core_ping(struct venus_core *core, u32 cookie)
1182-
{
1183-
struct venus_hfi_device *hdev = to_hfi_priv(core);
1184-
struct hfi_sys_ping_pkt pkt;
1185-
1186-
pkt_sys_ping(&pkt, cookie);
1187-
1188-
return venus_iface_cmdq_write(hdev, &pkt, false);
1189-
}
1190-
11911181
static int venus_core_trigger_ssr(struct venus_core *core, u32 trigger_type)
11921182
{
11931183
struct venus_hfi_device *hdev = to_hfi_priv(core);
@@ -1639,7 +1629,6 @@ static int venus_suspend(struct venus_core *core)
16391629
static const struct hfi_ops venus_hfi_ops = {
16401630
.core_init = venus_core_init,
16411631
.core_deinit = venus_core_deinit,
1642-
.core_ping = venus_core_ping,
16431632
.core_trigger_ssr = venus_core_trigger_ssr,
16441633

16451634
.session_init = venus_session_init,

0 commit comments

Comments
 (0)