Make msm_serial_hs RT to improve bluetooth performance

msm_serial_hs threads for RX and TX are responsible for passing key
bluetooth buffers, such as bluetooth audio, between the Bluetooth HW and
the upper layers of the stack.  These threads are therefore on the
critical path for bluetooth audio latency, and should be scheduled as
RT threads in order to ensure that they meet audio deadlines.

Bug 36106419

Test:  Play bluetooth audio, confirm msm_serial_hs_0 threads are
scheduled as RT threads via systrace
Change-Id: I078dbcbab189a03bdc5fdfde6ec8c41c79c11610
Signed-off-by: Philip Cuadra <philipcuadra@google.com>
This commit is contained in:
Philip Cuadra 2017-03-27 23:38:27 -07:00 committed by Timi
parent 88bda1d53c
commit d98e5d2d5f

View file

@ -2831,6 +2831,7 @@ static int uartdm_init_port(struct uart_port *uport)
struct msm_hs_port *msm_uport = UARTDM_TO_MSM(uport);
struct msm_hs_tx *tx = &msm_uport->tx;
struct msm_hs_rx *rx = &msm_uport->rx;
struct sched_param param = { .sched_priority = 1 };
init_waitqueue_head(&rx->wait);
init_waitqueue_head(&tx->wait);
@ -2845,6 +2846,8 @@ static int uartdm_init_port(struct uart_port *uport)
MSM_HS_ERR("%s(): error creating task", __func__);
goto exit_lh_init;
}
sched_setscheduler(rx->task, SCHED_FIFO, &param);
init_kthread_work(&rx->kwork, msm_serial_hs_rx_work);
init_kthread_worker(&tx->kworker);
@ -2854,6 +2857,7 @@ static int uartdm_init_port(struct uart_port *uport)
MSM_HS_ERR("%s(): error creating task", __func__);
goto exit_lh_init;
}
sched_setscheduler(tx->task, SCHED_FIFO, &param);
init_kthread_work(&tx->kwork, msm_serial_hs_tx_work);