summaryrefslogtreecommitdiff
path: root/drivers/staging/most/hdm-dim2/dim2_hdm.c
diff options
context:
space:
mode:
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>2016-09-15 17:19:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-15 20:23:29 +0300
commit6631c5c9b0c3698f3977caf5694e8ece6a36f48b (patch)
tree9a6e2e9aaeda477355729365e887294933b0c69f /drivers/staging/most/hdm-dim2/dim2_hdm.c
parent9b762fdfe26e798897f2a84a426df0fdee548dae (diff)
downloadlinux-6631c5c9b0c3698f3977caf5694e8ece6a36f48b.tar.xz
staging: most: hdm-dim2: double size of DBR buffer
This patch increases the size of the asynchronous and control DBR buffers in the Tx path to twice the max. message size. This patch is needed to increase the throughput for big messages. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/hdm-dim2/dim2_hdm.c')
-rw-r--r--drivers/staging/most/hdm-dim2/dim2_hdm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 8bef73cd9c47..78ce7472f837 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -526,7 +526,7 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
hdm_ch->name, buf_size, new_size);
spin_lock_irqsave(&dim_lock, flags);
hal_ret = dim_init_control(&hdm_ch->ch, is_tx, ch_addr,
- new_size);
+ is_tx ? new_size * 2 : new_size);
break;
case MOST_CH_ASYNC:
new_size = dim_norm_ctrl_async_buffer_size(buf_size);
@@ -539,7 +539,8 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
pr_warn("%s: fixed buffer size (%d -> %d)\n",
hdm_ch->name, buf_size, new_size);
spin_lock_irqsave(&dim_lock, flags);
- hal_ret = dim_init_async(&hdm_ch->ch, is_tx, ch_addr, new_size);
+ hal_ret = dim_init_async(&hdm_ch->ch, is_tx, ch_addr,
+ is_tx ? new_size * 2 : new_size);
break;
case MOST_CH_ISOC_AVP:
new_size = dim_norm_isoc_buffer_size(buf_size, sub_size);