From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbeAWO1B (ORCPT ); Tue, 23 Jan 2018 09:27:01 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:55782 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751710AbeAWO07 (ORCPT ); Tue, 23 Jan 2018 09:26:59 -0500 From: Philippe Cornu To: Archit Taneja , Andrzej Hajda , Laurent Pinchart , David Airlie , Philippe Cornu , Brian Norris , Benjamin Gaignard , Bhumika Goyal , , , "Sandy Huang" , Heiko Stubner , , CC: Yannick Fertre , Vincent Abriou , Alexandre Torgue , "Maxime Coquelin" , Ludovic Barre , Mickael Reulier Subject: [PATCH v1 2/2] drm/bridge/synopsys: dsi: Add a warning msg on dsi read operations Date: Tue, 23 Jan 2018 15:26:18 +0100 Message-ID: <20180123142618.28384-3-philippe.cornu@st.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180123142618.28384-1-philippe.cornu@st.com> References: <20180123142618.28384-1-philippe.cornu@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.32] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-23_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DCS/GENERIC DSI read feature is not yet implemented so it is important to warn the host_transfer() caller in case of read operation requests. Signed-off-by: Philippe Cornu --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 9 ++++++++- 1 file changed, 8 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 096cf5e5bb30..e46ddff8601c 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -417,7 +417,14 @@ static ssize_t dw_mipi_dsi_host_transfer(struct mipi_dsi_host *host, if (ret) return ret; - nb_bytes = packet.size; + if (msg->rx_buf && msg->rx_len > 0) { + /* TODO dw drv improvements: implement read feature */ + dev_warn(dsi->dev, "read operations not yet implemented\n"); + return -EPERM; + + } else { + nb_bytes = packet.size; + } return nb_bytes; } -- 2.15.1