From patchwork Thu Jan 25 10:38:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe CORNU X-Patchwork-Id: 10183877 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8ED360388 for ; Thu, 25 Jan 2018 10:38:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A818F28A46 for ; Thu, 25 Jan 2018 10:38:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CC2B28A47; Thu, 25 Jan 2018 10:38:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5923328A51 for ; Thu, 25 Jan 2018 10:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4r7r3T9eDkuCCpp1ri7TZ2t6rAGkgxiYxBEhKNMYbnQ=; b=dGzrElSevuY+GS dQd91SjXuI7M1V1kn03rSAxd+Amstyvx5MU+6jtylYBGxz3Sie4gxtXIaj6bhw+DcJFKzNYYjetTg mOP69vVb0riJf4HLtoY2OTKNePbS5Gy7XZerqDboedCBJrFzt+SFSr8yi2i5KmQlQI4H8BKbc0Ge9 /O3nOQ2RP1ui3Ynte8Z5pnoHoC5MtJZCah9oUpXwJpj6nh4sbIqCh2vJ272tXrdHJwRDFPAxZ4kCb w+19W9BR/c0Toc6LEkdcZG9nTdyIhn6ZwKzdGWMPCs5BWfOC/W0IRyZF5PDDxLRowkjxVhVjB5JA4 i9vlCMY0r8QdASUbaYuA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eeeve-0004eN-JY; Thu, 25 Jan 2018 10:38:46 +0000 Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eeevX-0004Hi-KG; Thu, 25 Jan 2018 10:38:41 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0PAYIee002680; Thu, 25 Jan 2018 11:38:19 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2fq4fyabvw-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 25 Jan 2018 11:38:19 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 590FA42; Thu, 25 Jan 2018 10:38:19 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EA0DF24E3; Thu, 25 Jan 2018 10:38:18 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Jan 2018 11:38:18 +0100 Received: from localhost (10.129.7.153) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Jan 2018 11:38:18 +0100 From: Philippe Cornu To: Archit Taneja , Andrzej Hajda , Laurent Pinchart , David Airlie , Philippe Cornu , Brian Norris , Benjamin Gaignard , Bhumika Goyal , , , "Sandy Huang" , Heiko Stubner , , Subject: [PATCH v2 2/2] drm/bridge/synopsys: dsi: Fix dsi_host_transfer() return value Date: Thu, 25 Jan 2018 11:38:00 +0100 Message-ID: <20180125103800.1999-3-philippe.cornu@st.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180125103800.1999-1-philippe.cornu@st.com> References: <20180125103800.1999-1-philippe.cornu@st.com> MIME-Version: 1.0 X-Originating-IP: [10.129.7.153] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-25_03:, , signatures=0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Torgue , Yannick Fertre , Maxime Coquelin , Mickael Reulier , Vincent Abriou , Ludovic Barre Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The dw_mipi_dsi_host_transfer() must return the number of bytes transmitted/received on success instead of 0. Note: As the read feature is not implemented, only the transmitted number of bytes is returned for the moment. Signed-off-by: Philippe Cornu Reviewed-by: Brian Norris --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index 72ecaeb40822..090bf62d1ea8 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -419,7 +419,16 @@ static ssize_t dw_mipi_dsi_host_transfer(struct mipi_dsi_host *host, dw_mipi_message_config(dsi, msg); - return dw_mipi_dsi_write(dsi, &packet); + ret = dw_mipi_dsi_write(dsi, &packet); + if (ret) + return ret; + + /* + * TODO Only transmitted size is returned as actual driver does + * not support dcs/generic reads. Please update return value when + * delivering the read feature. + */ + return packet.size; } static const struct mipi_dsi_host_ops dw_mipi_dsi_host_ops = {