diff options
author | Sachin Nikam <snikam@nvidia.com> | 2011-06-30 21:10:05 +0530 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-07-08 11:00:41 -0700 |
commit | 11237d6a408d6ca7aea619e47b02ddf7e158945d (patch) | |
tree | bb12b03a7b25691938821c4ef5f61f29dbe74d4c /drivers/media/video | |
parent | a8c8ee0ac3e70671fe189e12c24a5d65aa00b129 (diff) |
media: tegra: avp: respond to unsupported service ids
AVP service driver responds error to AVP for invalid or unsupported
service IDs.
Bug 843473
Change-Id: Ic747c7cf0b34b6b30abdb64c4ff005d298fa1530
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/39225
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/tegra/avp/avp_svc.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/media/video/tegra/avp/avp_svc.c b/drivers/media/video/tegra/avp/avp_svc.c index 0c2253069e0e..7b374a0c59b3 100644 --- a/drivers/media/video/tegra/avp/avp_svc.c +++ b/drivers/media/video/tegra/avp/avp_svc.c @@ -459,7 +459,7 @@ static void do_svc_module_clock_set(struct avp_svc_info *avp_svc, aclk = &avp_svc->clks[mod->clk_req]; ret = clk_set_rate(aclk->clk, msg->clk_freq); if (ret) { - pr_err("avp_svc: Failed to set module (id = %d) frequency to %d kHz\n", + pr_err("avp_svc: Failed to set module (id = %d) frequency to %d Hz\n", msg->module_id, msg->clk_freq); resp.err = AVP_ERR_EINVAL; resp.act_freq = 0; @@ -478,6 +478,17 @@ send_response: sizeof(resp), GFP_KERNEL); } +static void do_svc_unsupported_msg(struct avp_svc_info *avp_svc, + u32 resp_svc_id) +{ + struct svc_common_resp resp; + + resp.err = AVP_ERR_ENOTSUP; + resp.svc_id = resp_svc_id; + trpc_send_msg(avp_svc->rpc_node, avp_svc->cpu_ep, &resp, + sizeof(resp), GFP_KERNEL); +} + static int dispatch_svc_message(struct avp_svc_info *avp_svc, struct svc_msg *msg, size_t len) @@ -565,7 +576,8 @@ static int dispatch_svc_message(struct avp_svc_info *avp_svc, do_svc_module_clock_set(avp_svc, msg, len); break; default: - pr_err("avp_svc: invalid SVC call 0x%x\n", msg->svc_id); + pr_warning("avp_svc: Unsupported SVC call 0x%x\n", msg->svc_id); + do_svc_unsupported_msg(avp_svc, msg->svc_id); ret = -ENOMSG; break; } |