Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: venus: Remove unused hfi_core_ping()

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>
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>

authored by

Dr. David Alan Gilbert and committed by
Hans Verkuil
210afa15 459997e8

-36
-23
drivers/media/platform/qcom/venus/hfi.c
··· 138 138 return core->ops->core_trigger_ssr(core, type); 139 139 } 140 140 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 - 164 141 static int wait_session_msg(struct venus_inst *inst) 165 142 { 166 143 int ret;
-2
drivers/media/platform/qcom/venus/hfi.h
··· 108 108 struct hfi_ops { 109 109 int (*core_init)(struct venus_core *core); 110 110 int (*core_deinit)(struct venus_core *core); 111 - int (*core_ping)(struct venus_core *core, u32 cookie); 112 111 int (*core_trigger_ssr)(struct venus_core *core, u32 trigger_type); 113 112 114 113 int (*session_init)(struct venus_inst *inst, u32 session_type, ··· 151 152 int hfi_core_suspend(struct venus_core *core); 152 153 int hfi_core_resume(struct venus_core *core, bool force); 153 154 int hfi_core_trigger_ssr(struct venus_core *core, u32 type); 154 - int hfi_core_ping(struct venus_core *core); 155 155 int hfi_session_create(struct venus_inst *inst, const struct hfi_inst_ops *ops); 156 156 void hfi_session_destroy(struct venus_inst *inst); 157 157 int hfi_session_init(struct venus_inst *inst, u32 pixfmt);
-11
drivers/media/platform/qcom/venus/hfi_venus.c
··· 1178 1178 return 0; 1179 1179 } 1180 1180 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 - 1191 1181 static int venus_core_trigger_ssr(struct venus_core *core, u32 trigger_type) 1192 1182 { 1193 1183 struct venus_hfi_device *hdev = to_hfi_priv(core); ··· 1629 1639 static const struct hfi_ops venus_hfi_ops = { 1630 1640 .core_init = venus_core_init, 1631 1641 .core_deinit = venus_core_deinit, 1632 - .core_ping = venus_core_ping, 1633 1642 .core_trigger_ssr = venus_core_trigger_ssr, 1634 1643 1635 1644 .session_init = venus_session_init,