Received: by 10.223.176.46 with SMTP id f43csp4235545wra; Tue, 23 Jan 2018 06:28:03 -0800 (PST) X-Google-Smtp-Source: AH8x227zncVd5XsoX5ewR+LlwvyLynJh67FTXXm4ufACH0yGWNGwV1U9w5xcEm6yZ+YcHDskdfHk X-Received: by 2002:a17:902:28c4:: with SMTP id f62-v6mr3375113plb.31.1516717683677; Tue, 23 Jan 2018 06:28:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516717683; cv=none; d=google.com; s=arc-20160816; b=eFzfHPD4FKSdFXe+wdRTVWfhq7ik8UnOZIWsmMYoVvrZacg2bXtotqDSonU5nthN5q X3nFYBUcHpCmycCI54ri+kZQYJwzyGadzwxqutglKh03ZrmeDg/cSSXYOsbb9s28WJwa bSzXKh472psAL8nFzFQomR6VYhehURost5vXAWbOAdZcfUPVM/LmYoS/hDp2XkrM9D2g /JS6z7S0PbuY7cnhK1q7Z8wCt+MBgBGIcJqwnnkB3p5ajSw0eXWC9aAtZvEBzHmQzxxe fU08KlSLf54f9Z2aDAg1yr1BSmjH7F6g8MlFy/Z8j5SbvQlK2igdpq0pAJeJoiRI2kC4 eFMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=nwfQ1cXMK6a+1svWHJUj1w1bDB4QLCVw4gpppzB+bbE=; b=xfuSW/XI37w4FYeEpF2f4TDU2iNEInq2kWtaYZ8MiqBOUgAmFbKMojNNPeLZv5mY32 zyxyVq/tHuk8f3Dv5NnqDkL1+sbZ+S77s4tZIm2Ooy4/cSd2HL2/PKfZbkDTPnB7NTla /af0ZMJataSt1h/z8gnunfz+Xq/QJsu0cHULVaoVvFKu6UApQr5BEcYQiWN3V6KImicg IYAlp33OLpEHudugvfJzDnwDiq69dFgJUxCExLAyDPIout8oyUOOB+cFP6nbhLGPfSuo AVFm/muVxwXvhP/TLs3rPJMGVQF5SsqxE2rbghLT+SfdvTIgqzTdPCwucpOJA4jM2KaW FRFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si1516167pfj.303.2018.01.23.06.27.49; Tue, 23 Jan 2018 06:28:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751885AbeAWO1B (ORCPT + 99 others); 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 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 , , 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 Precedence: bulk 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