From patchwork Tue Jan 23 14:26:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe CORNU X-Patchwork-Id: 10180401 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 74537601D5 for ; Tue, 23 Jan 2018 14:27:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B833D286F5 for ; Tue, 23 Jan 2018 14:27:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACAF928708; Tue, 23 Jan 2018 14:27:28 +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 44C81286F7 for ; Tue, 23 Jan 2018 14:27:28 +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=GR9ScBPJdL9jNeIcU9RrNAuGk02qG7T7dTRernSGlHY=; b=Q1oR/PIbWtOd23 24hZTI7ZcZPHMdIjCABctf+5+/YyE9TQgUtSMtNXH+qFM3C3qs9mIP55L6dgTtlinautdNiIDbijN 26gkJaltzz3rLjmx/QmghKQlR14Aia0HZ0JqieBPgvkLCfRZuVskBzsQPTfj3cKOnylViyA06gbbB v8/2lJJzLcZiXdvr8bo90PfPbtzkSRcJzwF0a+qvjugxs9YmUAfod/aawyBam0XWW+lcVLc3YZK+H labwB+QJP+wyDOWMNohN0+Bx5qp47O/pVftAsjtlM0Lqshbwa+Cd16LNR+Wf9KlYAOxbdfYEQ/h/p qEsKpOutUR01XxzPOnLg==; 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 1edzXp-000599-SK; Tue, 23 Jan 2018 14:27:25 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1edzXF-0004WP-U8; Tue, 23 Jan 2018 14:26:51 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0NEO5kx032034; Tue, 23 Jan 2018 15:26:26 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2fnaj6qj96-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 23 Jan 2018 15:26:26 +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 925FD3A; Tue, 23 Jan 2018 14:26:25 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 745572A9A; Tue, 23 Jan 2018 14:26:25 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.352.0; Tue, 23 Jan 2018 15:26:25 +0100 Received: from localhost (10.201.23.32) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Tue, 23 Jan 2018 15:26:25 +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 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 X-Originating-IP: [10.201.23.32] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-23_04:, , 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 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; }