* [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full()
@ 2019-06-25 18:17 Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 2/9] staging: vc04_services: Remove function vchiq_arm_allow_resume() Nishka Dasgupta
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove unused function vchiu_queue_is_full.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../staging/vc04_services/interface/vchiq_arm/vchiq_util.c | 5 -----
.../staging/vc04_services/interface/vchiq_arm/vchiq_util.h | 1 -
2 files changed, 6 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
index 8ee85c5e6f77..5e6d3035dc05 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
@@ -39,11 +39,6 @@ int vchiu_queue_is_empty(struct vchiu_queue *queue)
return queue->read == queue->write;
}
-int vchiu_queue_is_full(struct vchiu_queue *queue)
-{
- return queue->write == queue->read + queue->size;
-}
-
void vchiu_queue_push(struct vchiu_queue *queue, struct vchiq_header *header)
{
if (!queue->initialized)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h
index ee1459468171..f03a4250de0d 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h
@@ -40,7 +40,6 @@ extern int vchiu_queue_init(struct vchiu_queue *queue, int size);
extern void vchiu_queue_delete(struct vchiu_queue *queue);
extern int vchiu_queue_is_empty(struct vchiu_queue *queue);
-extern int vchiu_queue_is_full(struct vchiu_queue *queue);
extern void vchiu_queue_push(struct vchiu_queue *queue,
struct vchiq_header *header);
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/9] staging: vc04_services: Remove function vchiq_arm_allow_resume()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 3/9] staging: vc04_services: Remove vchiq_arm_force_suspend() Nishka Dasgupta
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove unused function vchiq_arm_allow_resume.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../interface/vchiq_arm/vchiq_arm.c | 43 -------------------
.../interface/vchiq_arm/vchiq_arm.h | 3 --
2 files changed, 46 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 9264a07cf160..bf7c1e2bce67 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2883,49 +2883,6 @@ vchiq_check_suspend(struct vchiq_state *state)
vchiq_log_trace(vchiq_susp_log_level, "%s exit", __func__);
}
-int
-vchiq_arm_allow_resume(struct vchiq_state *state)
-{
- struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state);
- int resume = 0;
- int ret = -1;
-
- if (!arm_state)
- goto out;
-
- vchiq_log_trace(vchiq_susp_log_level, "%s", __func__);
-
- write_lock_bh(&arm_state->susp_res_lock);
- unblock_resume(arm_state);
- resume = vchiq_check_resume(state);
- write_unlock_bh(&arm_state->susp_res_lock);
-
- if (resume) {
- if (wait_for_completion_interruptible(
- &arm_state->vc_resume_complete) < 0) {
- vchiq_log_error(vchiq_susp_log_level,
- "%s interrupted", __func__);
- /* failed, cannot accurately derive suspend
- * state, so exit early. */
- goto out;
- }
- }
-
- read_lock_bh(&arm_state->susp_res_lock);
- if (arm_state->vc_suspend_state == VC_SUSPEND_SUSPENDED) {
- vchiq_log_info(vchiq_susp_log_level,
- "%s: Videocore remains suspended", __func__);
- } else {
- vchiq_log_info(vchiq_susp_log_level,
- "%s: Videocore resumed", __func__);
- ret = 0;
- }
- read_unlock_bh(&arm_state->susp_res_lock);
-out:
- vchiq_log_trace(vchiq_susp_log_level, "%s exit %d", __func__, ret);
- return ret;
-}
-
/* This function should be called with the write lock held */
int
vchiq_check_resume(struct vchiq_state *state)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
index c1d5a9d17071..61b15278c999 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
@@ -115,9 +115,6 @@ vchiq_arm_vcsuspend(struct vchiq_state *state);
extern VCHIQ_STATUS_T
vchiq_arm_force_suspend(struct vchiq_state *state);
-extern int
-vchiq_arm_allow_resume(struct vchiq_state *state);
-
extern VCHIQ_STATUS_T
vchiq_arm_vcresume(struct vchiq_state *state);
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/9] staging: vc04_services: Remove vchiq_arm_force_suspend()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 2/9] staging: vc04_services: Remove function vchiq_arm_allow_resume() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 4/9] staging: vc04_services: Remove vchiq_pause_internal() Nishka Dasgupta
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove unused function vchiq_arm_force_suspend.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../interface/vchiq_arm/vchiq_arm.c | 120 ------------------
.../interface/vchiq_arm/vchiq_arm.h | 3 -
2 files changed, 123 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index bf7c1e2bce67..6e59470d44ab 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2741,126 +2741,6 @@ output_timeout_error(struct vchiq_state *state)
}
-/* Try to get videocore into suspended state, regardless of autosuspend state.
-** We don't actually force suspend, since videocore may get into a bad state
-** if we force suspend at a bad time. Instead, we wait for autosuspend to
-** determine a good point to suspend. If this doesn't happen within 100ms we
-** report failure.
-**
-** Returns VCHIQ_SUCCESS if videocore suspended successfully, VCHIQ_RETRY if
-** videocore failed to suspend in time or VCHIQ_ERROR if interrupted.
-*/
-VCHIQ_STATUS_T
-vchiq_arm_force_suspend(struct vchiq_state *state)
-{
- struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state);
- VCHIQ_STATUS_T status = VCHIQ_ERROR;
- long rc = 0;
- int repeat = -1;
-
- if (!arm_state)
- goto out;
-
- vchiq_log_trace(vchiq_susp_log_level, "%s", __func__);
-
- write_lock_bh(&arm_state->susp_res_lock);
-
- status = block_resume(arm_state);
- if (status != VCHIQ_SUCCESS)
- goto unlock;
- if (arm_state->vc_suspend_state == VC_SUSPEND_SUSPENDED) {
- /* Already suspended - just block resume and exit */
- vchiq_log_info(vchiq_susp_log_level, "%s already suspended",
- __func__);
- status = VCHIQ_SUCCESS;
- goto unlock;
- } else if (arm_state->vc_suspend_state <= VC_SUSPEND_IDLE) {
- /* initiate suspend immediately in the case that we're waiting
- * for the timeout */
- stop_suspend_timer(arm_state);
- if (!vchiq_videocore_wanted(state)) {
- vchiq_log_info(vchiq_susp_log_level, "%s videocore "
- "idle, initiating suspend", __func__);
- status = vchiq_arm_vcsuspend(state);
- } else if (arm_state->autosuspend_override <
- FORCE_SUSPEND_FAIL_MAX) {
- vchiq_log_info(vchiq_susp_log_level, "%s letting "
- "videocore go idle", __func__);
- status = VCHIQ_SUCCESS;
- } else {
- vchiq_log_warning(vchiq_susp_log_level, "%s failed too "
- "many times - attempting suspend", __func__);
- status = vchiq_arm_vcsuspend(state);
- }
- } else {
- vchiq_log_info(vchiq_susp_log_level, "%s videocore suspend "
- "in progress - wait for completion", __func__);
- status = VCHIQ_SUCCESS;
- }
-
- /* Wait for suspend to happen due to system idle (not forced..) */
- if (status != VCHIQ_SUCCESS)
- goto unblock_resume;
-
- do {
- write_unlock_bh(&arm_state->susp_res_lock);
-
- rc = wait_for_completion_interruptible_timeout(
- &arm_state->vc_suspend_complete,
- msecs_to_jiffies(FORCE_SUSPEND_TIMEOUT_MS));
-
- write_lock_bh(&arm_state->susp_res_lock);
- if (rc < 0) {
- vchiq_log_warning(vchiq_susp_log_level, "%s "
- "interrupted waiting for suspend", __func__);
- status = VCHIQ_ERROR;
- goto unblock_resume;
- } else if (rc == 0) {
- if (arm_state->vc_suspend_state > VC_SUSPEND_IDLE) {
- /* Repeat timeout once if in progress */
- if (repeat < 0) {
- repeat = 1;
- continue;
- }
- }
- arm_state->autosuspend_override++;
- output_timeout_error(state);
-
- status = VCHIQ_RETRY;
- goto unblock_resume;
- }
- } while (0 < (repeat--));
-
- /* Check and report state in case we need to abort ARM suspend */
- if (arm_state->vc_suspend_state != VC_SUSPEND_SUSPENDED) {
- status = VCHIQ_RETRY;
- vchiq_log_error(vchiq_susp_log_level,
- "%s videocore suspend failed (state %s)", __func__,
- suspend_state_names[arm_state->vc_suspend_state +
- VC_SUSPEND_NUM_OFFSET]);
- /* Reset the state only if it's still in an error state.
- * Something could have already initiated another suspend. */
- if (arm_state->vc_suspend_state < VC_SUSPEND_IDLE)
- set_suspend_state(arm_state, VC_SUSPEND_IDLE);
-
- goto unblock_resume;
- }
-
- /* successfully suspended - unlock and exit */
- goto unlock;
-
-unblock_resume:
- /* all error states need to unblock resume before exit */
- unblock_resume(arm_state);
-
-unlock:
- write_unlock_bh(&arm_state->susp_res_lock);
-
-out:
- vchiq_log_trace(vchiq_susp_log_level, "%s exit %d", __func__, status);
- return status;
-}
-
void
vchiq_check_suspend(struct vchiq_state *state)
{
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
index 61b15278c999..b424323e9613 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
@@ -112,9 +112,6 @@ vchiq_get_state(void);
extern VCHIQ_STATUS_T
vchiq_arm_vcsuspend(struct vchiq_state *state);
-extern VCHIQ_STATUS_T
-vchiq_arm_force_suspend(struct vchiq_state *state);
-
extern VCHIQ_STATUS_T
vchiq_arm_vcresume(struct vchiq_state *state);
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/9] staging: vc04_services: Remove vchiq_pause_internal()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 2/9] staging: vc04_services: Remove function vchiq_arm_allow_resume() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 3/9] staging: vc04_services: Remove vchiq_arm_force_suspend() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 5/9] staging: vc04_services: Remove vchiq_resume_internal() Nishka Dasgupta
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove unused function vchiq_pause_internal.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../interface/vchiq_arm/vchiq_core.c | 23 -------------------
.../interface/vchiq_arm/vchiq_core.h | 3 ---
2 files changed, 26 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 0dca6e834ffa..7f093b2679ae 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -2830,29 +2830,6 @@ vchiq_shutdown_internal(struct vchiq_state *state, VCHIQ_INSTANCE_T instance)
return VCHIQ_SUCCESS;
}
-VCHIQ_STATUS_T
-vchiq_pause_internal(struct vchiq_state *state)
-{
- VCHIQ_STATUS_T status = VCHIQ_SUCCESS;
-
- switch (state->conn_state) {
- case VCHIQ_CONNSTATE_CONNECTED:
- /* Request a pause */
- vchiq_set_conn_state(state, VCHIQ_CONNSTATE_PAUSING);
- request_poll(state, NULL, 0);
- break;
- default:
- vchiq_log_error(vchiq_core_log_level,
- "%s in state %s\n",
- __func__, conn_state_names[state->conn_state]);
- status = VCHIQ_ERROR;
- VCHIQ_STATS_INC(state, error_count);
- break;
- }
-
- return status;
-}
-
VCHIQ_STATUS_T
vchiq_resume_internal(struct vchiq_state *state)
{
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index aee2d362e88d..b319031145ed 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -518,9 +518,6 @@ vchiq_free_service_internal(struct vchiq_service *service);
extern VCHIQ_STATUS_T
vchiq_shutdown_internal(struct vchiq_state *state, VCHIQ_INSTANCE_T instance);
-extern VCHIQ_STATUS_T
-vchiq_pause_internal(struct vchiq_state *state);
-
extern VCHIQ_STATUS_T
vchiq_resume_internal(struct vchiq_state *state);
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/9] staging: vc04_services: Remove vchiq_resume_internal()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
` (2 preceding siblings ...)
2019-06-25 18:17 ` [PATCH 4/9] staging: vc04_services: Remove vchiq_pause_internal() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 6/9] staging: vc04_services: Remove vchiq_use_service_no_resume() Nishka Dasgupta
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove unused function vchiq_resume_internal.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../interface/vchiq_arm/vchiq_core.c | 16 ----------------
.../interface/vchiq_arm/vchiq_core.h | 3 ---
2 files changed, 19 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 7f093b2679ae..5e231cc5c87d 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -2830,22 +2830,6 @@ vchiq_shutdown_internal(struct vchiq_state *state, VCHIQ_INSTANCE_T instance)
return VCHIQ_SUCCESS;
}
-VCHIQ_STATUS_T
-vchiq_resume_internal(struct vchiq_state *state)
-{
- VCHIQ_STATUS_T status = VCHIQ_SUCCESS;
-
- if (state->conn_state == VCHIQ_CONNSTATE_PAUSED) {
- vchiq_set_conn_state(state, VCHIQ_CONNSTATE_RESUMING);
- request_poll(state, NULL, 0);
- } else {
- status = VCHIQ_ERROR;
- VCHIQ_STATS_INC(state, error_count);
- }
-
- return status;
-}
-
VCHIQ_STATUS_T
vchiq_close_service(VCHIQ_SERVICE_HANDLE_T handle)
{
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index b319031145ed..b5e09d52b202 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -518,9 +518,6 @@ vchiq_free_service_internal(struct vchiq_service *service);
extern VCHIQ_STATUS_T
vchiq_shutdown_internal(struct vchiq_state *state, VCHIQ_INSTANCE_T instance);
-extern VCHIQ_STATUS_T
-vchiq_resume_internal(struct vchiq_state *state);
-
extern void
remote_event_pollall(struct vchiq_state *state);
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/9] staging: vc04_services: Remove vchiq_use_service_no_resume()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
` (3 preceding siblings ...)
2019-06-25 18:17 ` [PATCH 5/9] staging: vc04_services: Remove vchiq_resume_internal() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 7/9] staging: vc04_services: Remove vchiq_send_remote_release() Nishka Dasgupta
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove unused function vchiq_use_service_no_resume.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 14 --------------
.../vc04_services/interface/vchiq_arm/vchiq_if.h | 2 --
2 files changed, 16 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 6e59470d44ab..a97076c18a0f 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3072,20 +3072,6 @@ static void suspend_timer_callback(struct timer_list *t)
vchiq_check_suspend(state);
}
-VCHIQ_STATUS_T
-vchiq_use_service_no_resume(VCHIQ_SERVICE_HANDLE_T handle)
-{
- VCHIQ_STATUS_T ret = VCHIQ_ERROR;
- struct vchiq_service *service = find_service_by_handle(handle);
-
- if (service) {
- ret = vchiq_use_internal(service->state, service,
- USE_TYPE_SERVICE_NO_RESUME);
- unlock_service(service);
- }
- return ret;
-}
-
VCHIQ_STATUS_T
vchiq_use_service(VCHIQ_SERVICE_HANDLE_T handle)
{
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h
index 5445f201e284..c23bd105c40f 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h
@@ -107,8 +107,6 @@ extern VCHIQ_STATUS_T vchiq_open_service(VCHIQ_INSTANCE_T instance,
extern VCHIQ_STATUS_T vchiq_close_service(VCHIQ_SERVICE_HANDLE_T service);
extern VCHIQ_STATUS_T vchiq_remove_service(VCHIQ_SERVICE_HANDLE_T service);
extern VCHIQ_STATUS_T vchiq_use_service(VCHIQ_SERVICE_HANDLE_T service);
-extern VCHIQ_STATUS_T vchiq_use_service_no_resume(
- VCHIQ_SERVICE_HANDLE_T service);
extern VCHIQ_STATUS_T vchiq_release_service(VCHIQ_SERVICE_HANDLE_T service);
extern VCHIQ_STATUS_T
vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T handle,
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/9] staging: vc04_services: Remove vchiq_send_remote_release()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
` (4 preceding siblings ...)
2019-06-25 18:17 ` [PATCH 6/9] staging: vc04_services: Remove vchiq_use_service_no_resume() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 8/9] staging: vc04_services: Remove function output_timeout_error() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 9/9] staging: vc04_services: Remove function block_resume() Nishka Dasgupta
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove unused function vchiq_send_remote_release.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../vc04_services/interface/vchiq_arm/vchiq_core.c | 11 -----------
.../vc04_services/interface/vchiq_arm/vchiq_core.h | 3 ---
2 files changed, 14 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 5e231cc5c87d..183f5cf887e0 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -3538,17 +3538,6 @@ VCHIQ_STATUS_T vchiq_send_remote_use(struct vchiq_state *state)
return status;
}
-VCHIQ_STATUS_T vchiq_send_remote_release(struct vchiq_state *state)
-{
- VCHIQ_STATUS_T status = VCHIQ_RETRY;
-
- if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED)
- status = queue_message(state, NULL,
- VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_RELEASE, 0, 0),
- NULL, NULL, 0, 0);
- return status;
-}
-
VCHIQ_STATUS_T vchiq_send_remote_use_active(struct vchiq_state *state)
{
VCHIQ_STATUS_T status = VCHIQ_RETRY;
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index b5e09d52b202..63f71b2a492f 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -639,9 +639,6 @@ vchiq_on_remote_use_active(struct vchiq_state *state);
extern VCHIQ_STATUS_T
vchiq_send_remote_use(struct vchiq_state *state);
-extern VCHIQ_STATUS_T
-vchiq_send_remote_release(struct vchiq_state *state);
-
extern VCHIQ_STATUS_T
vchiq_send_remote_use_active(struct vchiq_state *state);
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 8/9] staging: vc04_services: Remove function output_timeout_error()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
` (5 preceding siblings ...)
2019-06-25 18:17 ` [PATCH 7/9] staging: vc04_services: Remove vchiq_send_remote_release() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 9/9] staging: vc04_services: Remove function block_resume() Nishka Dasgupta
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove function output_timeout_error as it was only called by
vchiq_arm_force_suspend, which was deleted in a previous patch.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../interface/vchiq_arm/vchiq_arm.c | 36 -------------------
1 file changed, 36 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index a97076c18a0f..ebf7e2a3bd3b 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2705,42 +2705,6 @@ vchiq_platform_check_suspend(struct vchiq_state *state)
return;
}
-static void
-output_timeout_error(struct vchiq_state *state)
-{
- struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state);
- char err[50] = "";
- int vc_use_count = arm_state->videocore_use_count;
- int active_services = state->unused_service;
- int i;
-
- if (!arm_state->videocore_use_count) {
- snprintf(err, sizeof(err), " Videocore usecount is 0");
- goto output_msg;
- }
- for (i = 0; i < active_services; i++) {
- struct vchiq_service *service_ptr = state->services[i];
-
- if (service_ptr && service_ptr->service_use_count &&
- (service_ptr->srvstate != VCHIQ_SRVSTATE_FREE)) {
- snprintf(err, sizeof(err), " %c%c%c%c(%d) service has "
- "use count %d%s", VCHIQ_FOURCC_AS_4CHARS(
- service_ptr->base.fourcc),
- service_ptr->client_id,
- service_ptr->service_use_count,
- service_ptr->service_use_count ==
- vc_use_count ? "" : " (+ more)");
- break;
- }
- }
-
-output_msg:
- vchiq_log_error(vchiq_susp_log_level,
- "timed out waiting for vc suspend (%d).%s",
- arm_state->autosuspend_override, err);
-
-}
-
void
vchiq_check_suspend(struct vchiq_state *state)
{
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 9/9] staging: vc04_services: Remove function block_resume()
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
` (6 preceding siblings ...)
2019-06-25 18:17 ` [PATCH 8/9] staging: vc04_services: Remove function output_timeout_error() Nishka Dasgupta
@ 2019-06-25 18:17 ` Nishka Dasgupta
7 siblings, 0 replies; 9+ messages in thread
From: Nishka Dasgupta @ 2019-06-25 18:17 UTC (permalink / raw)
To: eric, wahrenst, gregkh, linux-rpi-kernel, linux-arm-kernel, devel
Cc: Nishka Dasgupta
Remove function block_resume as it was only called by
vchiq_arm_force_suspend, which was removed in a previous patch.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
.../interface/vchiq_arm/vchiq_arm.c | 66 -------------------
1 file changed, 66 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index ebf7e2a3bd3b..cc4383d1ec3e 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2554,72 +2554,6 @@ need_resume(struct vchiq_state *state)
vchiq_videocore_wanted(state);
}
-static int
-block_resume(struct vchiq_arm_state *arm_state)
-{
- int status = VCHIQ_SUCCESS;
- const unsigned long timeout_val =
- msecs_to_jiffies(FORCE_SUSPEND_TIMEOUT_MS);
- int resume_count = 0;
-
- /* Allow any threads which were blocked by the last force suspend to
- * complete if they haven't already. Only give this one shot; if
- * blocked_count is incremented after blocked_blocker is completed
- * (which only happens when blocked_count hits 0) then those threads
- * will have to wait until next time around */
- if (arm_state->blocked_count) {
- reinit_completion(&arm_state->blocked_blocker);
- write_unlock_bh(&arm_state->susp_res_lock);
- vchiq_log_info(vchiq_susp_log_level, "%s wait for previously "
- "blocked clients", __func__);
- if (wait_for_completion_interruptible_timeout(
- &arm_state->blocked_blocker, timeout_val)
- <= 0) {
- vchiq_log_error(vchiq_susp_log_level, "%s wait for "
- "previously blocked clients failed", __func__);
- status = VCHIQ_ERROR;
- write_lock_bh(&arm_state->susp_res_lock);
- goto out;
- }
- vchiq_log_info(vchiq_susp_log_level, "%s previously blocked "
- "clients resumed", __func__);
- write_lock_bh(&arm_state->susp_res_lock);
- }
-
- /* We need to wait for resume to complete if it's in process */
- while (arm_state->vc_resume_state != VC_RESUME_RESUMED &&
- arm_state->vc_resume_state > VC_RESUME_IDLE) {
- if (resume_count > 1) {
- status = VCHIQ_ERROR;
- vchiq_log_error(vchiq_susp_log_level, "%s waited too "
- "many times for resume", __func__);
- goto out;
- }
- write_unlock_bh(&arm_state->susp_res_lock);
- vchiq_log_info(vchiq_susp_log_level, "%s wait for resume",
- __func__);
- if (wait_for_completion_interruptible_timeout(
- &arm_state->vc_resume_complete, timeout_val)
- <= 0) {
- vchiq_log_error(vchiq_susp_log_level, "%s wait for "
- "resume failed (%s)", __func__,
- resume_state_names[arm_state->vc_resume_state +
- VC_RESUME_NUM_OFFSET]);
- status = VCHIQ_ERROR;
- write_lock_bh(&arm_state->susp_res_lock);
- goto out;
- }
- vchiq_log_info(vchiq_susp_log_level, "%s resumed", __func__);
- write_lock_bh(&arm_state->susp_res_lock);
- resume_count++;
- }
- reinit_completion(&arm_state->resume_blocker);
- arm_state->resume_blocked = 1;
-
-out:
- return status;
-}
-
static inline void
unblock_resume(struct vchiq_arm_state *arm_state)
{
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-06-25 18:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 18:17 [PATCH 1/9] staging: vc04_services: Remove function vchiu_queue_is_full() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 2/9] staging: vc04_services: Remove function vchiq_arm_allow_resume() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 3/9] staging: vc04_services: Remove vchiq_arm_force_suspend() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 4/9] staging: vc04_services: Remove vchiq_pause_internal() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 5/9] staging: vc04_services: Remove vchiq_resume_internal() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 6/9] staging: vc04_services: Remove vchiq_use_service_no_resume() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 7/9] staging: vc04_services: Remove vchiq_send_remote_release() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 8/9] staging: vc04_services: Remove function output_timeout_error() Nishka Dasgupta
2019-06-25 18:17 ` [PATCH 9/9] staging: vc04_services: Remove function block_resume() Nishka Dasgupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).