Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp708410ybt; Wed, 1 Jul 2020 08:14:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdDOeMaxfYlfML+/aTP3dySlBsBZV6WujmUHzLIFyxvYAybbA9wNhyEZzAzVQtU8pe2D/3 X-Received: by 2002:a50:e04e:: with SMTP id g14mr24827944edl.352.1593616451118; Wed, 01 Jul 2020 08:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593616451; cv=none; d=google.com; s=arc-20160816; b=Kt1TEHP3dg0HHHDR9GbYOd5n9pWm5yos49dBApJosKhg28Iqd3GmYLb011uPcRiIah 25LxJRbc7ZpAkXgJFyuE2mPPW4k7kp100+ALorxsouwy4BAa0XRoaX2qraBTyrnWq01n IiHbb7yzGqpPVKpZxkoTfGms4jwPS3HRuudbOGfWi6Dt9LJeDTvE0Rdhrl4f1VhPykzJ AOCOwmhM2pkcjqc6ekB2FrJZbQkzcJ/se3WLJA/lJfbkwLzk+S6nLmDE60PFCzlKSXC1 h39mrUfcRE/We3zzbzDQ84hwakyrkQUM0K/KWmoD7Z5YL1m9HjWb5nJCfWGuFZBBdpWN YQjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from:dkim-signature; bh=bdHlVzSiINWMtq0PIwPjyqUpkq3kAK0eh4ceBdGsIYg=; b=WKVC3awb2eVKkNwOT0ikf/LD03d3+IBaOs26KodxMv9kbq0pl21brgZ1Ob/SL9FFrU 3jnqKnaJfD3zuMzznGj1WOZg9DIupoleZRt5/sXvG+YmGUy5NDQcJya1r7cBCXDh7cFu mw3dH0TzuGvygB40STuvbO1GxBff0uYJQwyml5ViOUnroJKr2qvbayJ+hVQJ3nFIKx8u /0y7bYAkjQ1gWdvAPCo9IqcxvnWYm7AMlbJcS39XZVtASVmeyoF6nz3D1kxXrRR7v8V+ N7VStVlqzxphE7uTzemW7TcqFrlIWIwrKx6cRPxu+/0q6gHBD7znsUY7mxfySc8ilNHZ HbgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b="rGRXI/ky"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si4095087eje.123.2020.07.01.08.13.47; Wed, 01 Jul 2020 08:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b="rGRXI/ky"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731819AbgGAPN2 (ORCPT + 99 others); Wed, 1 Jul 2020 11:13:28 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:29190 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730883AbgGAPN2 (ORCPT ); Wed, 1 Jul 2020 11:13:28 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 061F9BVI006050; Wed, 1 Jul 2020 17:13:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=bdHlVzSiINWMtq0PIwPjyqUpkq3kAK0eh4ceBdGsIYg=; b=rGRXI/kyyE85EZYLZt20zTYqIhAI+U5C/XQDdbPrbzdJtUCq6hXoLpKH/uyfAUSsWhbz LXwFJzLr4yO1q3+i0oTIvY3uFtqDCkcpau3LEkrUre2/+ivyIrgD/8SIVNAWQgh/8IYK gu1PXZwMUc/k6+oWWdzhpxLOkakFNLcqLuJtztumpovOBdN/uQpCkHJ0rDF1nPUPtWe9 9oowxozR1jCjCDFDTK/2O1S+XEdWmvLkkgHslEtJqmOyHXyqr7kEaBbw632RfuxfLCUr UqhlUtNX4+tLR989y2uIpKmBjPvY40AiZrR3ILdQ0LCAC9ti0zqeTZFB4aM13TesgBZL lw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 31wu89u9j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Jul 2020 17:13:18 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E559710002A; Wed, 1 Jul 2020 17:13:17 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D50652BC7BE; Wed, 1 Jul 2020 17:13:17 +0200 (CEST) Received: from localhost (10.75.127.46) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 1 Jul 2020 17:13:17 +0200 From: Yannick Fertre To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode Date: Wed, 1 Jul 2020 17:13:16 +0200 Message-ID: <20200701151316.18524-1-yannick.fertre@st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG5NODE1.st.com (10.75.127.13) To SFHDAG6NODE1.st.com (10.75.127.16) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-01_08:2020-07-01,2020-07-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Antonio Borneo Current code only sends LP commands in command mode. Allows sending LP commands also in video mode by setting the proper flag in DSI_VID_MODE_CFG. Signed-off-by: Antonio Borneo Change-Id: Ib78fa37bcc7559ce63017acd6ee0bbf00c61a397 Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/153242 Reviewed-by: CITOOLS Reviewed-by: CIBUILD Reviewed-by: Yannick FERTRE Reviewed-by: Philippe CORNU Tested-by: Yannick FERTRE --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index d580b2aa4ce9..0cd43e7a69bb 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -367,6 +367,13 @@ static void dw_mipi_message_config(struct dw_mipi_dsi *dsi, dsi_write(dsi, DSI_LPCLK_CTRL, lpm ? 0 : PHY_TXREQUESTCLKHS); dsi_write(dsi, DSI_CMD_MODE_CFG, val); + + val = dsi_read(dsi, DSI_VID_MODE_CFG); + if (lpm) + val |= ENABLE_LOW_POWER_CMD; + else + val &= ~ENABLE_LOW_POWER_CMD; + dsi_write(dsi, DSI_VID_MODE_CFG, val); } static int dw_mipi_dsi_gen_pkt_hdr_write(struct dw_mipi_dsi *dsi, u32 hdr_val) -- 2.17.1