Skip to content

Conversation

@ekanshibu
Copy link
Contributor

For any remote call to DSP, after sending an invocation message, fastRPC driver waits for glink response and during this time the CPU can go into low power modes. With polling mode support fastRPC driver can poll continuously on a memory after sending a message to remote subsystem which will eliminate CPU wakeup and scheduling latencies and reduce fastRPC overhead. With this change, DSP always sends a glink response which will get ignored if polling mode didn't time out.

Steps to enable polling mode:

** Remote control structure **:

typedef enum remote_rpc_latency_flags {
RPC_DISABLE_QOS = 0,
RPC_PM_QOS,
RPC_ADAPTIVE_QOS,
RPC_POLL_QOS,
} remote_rpc_control_latency_t;

struct remote_rpc_control_latency {
remote_rpc_control_latency_t enable;
uint32_t latency;
};

** Application code **:

struct remote_rpc_control_latency data;
data.enable = RPC_POLL_QOS;
err = remote_handle64_control(h, DSPRPC_CONTROL_LATENCY, (void*)&data, sizeof(data));

For any remote call to DSP, after sending an invocation message,
fastRPC driver waits for glink response and during this time the
CPU can go into low power modes. With polling mode support fastRPC
driver can poll continuously on a memory after sending a message
to remote subsystem which will eliminate CPU wakeup and scheduling
latencies and reduce fastRPC overhead. With this change, DSP always
sends a glink response which will get ignored if polling mode didn't
time out.

Steps to enable polling mode:

** Remote control structure **:

typedef enum remote_rpc_latency_flags {
  RPC_DISABLE_QOS = 0,
  RPC_PM_QOS,
  RPC_ADAPTIVE_QOS,
  RPC_POLL_QOS,
} remote_rpc_control_latency_t;

struct remote_rpc_control_latency {
  remote_rpc_control_latency_t enable;
  uint32_t latency;
};

** Application code **:

struct remote_rpc_control_latency data;
data.enable = RPC_POLL_QOS;
err = remote_handle64_control(h, DSPRPC_CONTROL_LATENCY, (void*)&data, sizeof(data));

Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant