From patchwork Wed Dec 4 12:28:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 3282081 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A06EBC0D4A for ; Wed, 4 Dec 2013 12:30:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0650D204DE for ; Wed, 4 Dec 2013 12:30:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFE6E2022F for ; Wed, 4 Dec 2013 12:30:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932227Ab3LDMaL (ORCPT ); Wed, 4 Dec 2013 07:30:11 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:52576 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755727Ab3LDMaH (ORCPT ); Wed, 4 Dec 2013 07:30:07 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id rB4CTsl3025994; Wed, 4 Dec 2013 06:29:54 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB4CTsxH021085; Wed, 4 Dec 2013 06:29:54 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Wed, 4 Dec 2013 06:29:53 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB4CTkkn015425; Wed, 4 Dec 2013 06:29:52 -0600 From: Tomi Valkeinen To: , , CC: Archit Taneja , Darren Etheridge , Tony Lindgren , Tomi Valkeinen Subject: [PATCH 02/26] OMAPDSS: DSI: fix fifosize Date: Wed, 4 Dec 2013 14:28:29 +0200 Message-ID: <1386160133-24026-3-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386160133-24026-1-git-send-email-tomi.valkeinen@ti.com> References: <1386160133-24026-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DSI has separate TX and RX fifos. However, the current code only has one field where the fifo size is stored, and the code for both TX and RX config write to the same field. This has not caused issues, as we've been using the same fifo sizes. Fix this bug by creating separate fields for TX and RX fifo sizes. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dsi.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 6056b27cf73c..1cd3e47fd43f 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -297,7 +297,8 @@ struct dsi_data { struct { enum dsi_vc_source source; struct omap_dss_device *dssdev; - enum fifo_size fifo_size; + enum fifo_size tx_fifo_size; + enum fifo_size rx_fifo_size; int vc_id; } vc[4]; @@ -2427,14 +2428,14 @@ static void dsi_config_tx_fifo(struct platform_device *dsidev, int add = 0; int i; - dsi->vc[0].fifo_size = size1; - dsi->vc[1].fifo_size = size2; - dsi->vc[2].fifo_size = size3; - dsi->vc[3].fifo_size = size4; + dsi->vc[0].tx_fifo_size = size1; + dsi->vc[1].tx_fifo_size = size2; + dsi->vc[2].tx_fifo_size = size3; + dsi->vc[3].tx_fifo_size = size4; for (i = 0; i < 4; i++) { u8 v; - int size = dsi->vc[i].fifo_size; + int size = dsi->vc[i].tx_fifo_size; if (add + size > 4) { DSSERR("Illegal FIFO configuration\n"); @@ -2460,14 +2461,14 @@ static void dsi_config_rx_fifo(struct platform_device *dsidev, int add = 0; int i; - dsi->vc[0].fifo_size = size1; - dsi->vc[1].fifo_size = size2; - dsi->vc[2].fifo_size = size3; - dsi->vc[3].fifo_size = size4; + dsi->vc[0].rx_fifo_size = size1; + dsi->vc[1].rx_fifo_size = size2; + dsi->vc[2].rx_fifo_size = size3; + dsi->vc[3].rx_fifo_size = size4; for (i = 0; i < 4; i++) { u8 v; - int size = dsi->vc[i].fifo_size; + int size = dsi->vc[i].rx_fifo_size; if (add + size > 4) { DSSERR("Illegal FIFO configuration\n"); @@ -2920,7 +2921,7 @@ static int dsi_vc_send_long(struct platform_device *dsidev, int channel, DSSDBG("dsi_vc_send_long, %d bytes\n", len); /* len + header */ - if (dsi->vc[channel].fifo_size * 32 * 4 < len + 4) { + if (dsi->vc[channel].tx_fifo_size * 32 * 4 < len + 4) { DSSERR("unable to send long packet: packet too long.\n"); return -EINVAL; }