* [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode
@ 2020-07-01 15:13 Yannick Fertre
2020-07-01 22:37 ` kernel test robot
0 siblings, 1 reply; 4+ messages in thread
From: Yannick Fertre @ 2020-07-01 15:13 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard, David Airlie,
Daniel Vetter, Maxime Coquelin, Alexandre Torgue, dri-devel,
linux-stm32, linux-arm-kernel, linux-kernel
From: Antonio Borneo <antonio.borneo@st.com>
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 <antonio.borneo@st.com>
Change-Id: Ib78fa37bcc7559ce63017acd6ee0bbf00c61a397
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/153242
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
Reviewed-by: Yannick FERTRE <yannick.fertre@st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@st.com>
Tested-by: Yannick FERTRE <yannick.fertre@st.com>
---
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode
2020-07-01 15:13 [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode Yannick Fertre
@ 2020-07-01 22:37 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-07-01 22:37 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard, David Airlie,
Daniel Vetter, Maxime Coquelin, Alexandre Torgue, dri-devel,
linux-stm32, linux-arm-kernel
Cc: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2522 bytes --]
Hi Yannick,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8-rc3 next-20200701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yannick-Fertre/drm-bridge-synopsys-dsi-allows-LP-commands-in-video-mode/20200701-231547
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7c30b859a947535f2213277e827d7ac7dcff9c84
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c: In function 'dw_mipi_message_config':
>> drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:374:10: error: 'ENABLE_LOW_POWER_CMD' undeclared (first use in this function); did you mean 'ENABLE_LOW_POWER_MASK'?
374 | val |= ENABLE_LOW_POWER_CMD;
| ^~~~~~~~~~~~~~~~~~~~
| ENABLE_LOW_POWER_MASK
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:374:10: note: each undeclared identifier is reported only once for each function it appears in
vim +374 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
357
358 static void dw_mipi_message_config(struct dw_mipi_dsi *dsi,
359 const struct mipi_dsi_msg *msg)
360 {
361 bool lpm = msg->flags & MIPI_DSI_MSG_USE_LPM;
362 u32 val = 0;
363
364 if (msg->flags & MIPI_DSI_MSG_REQ_ACK)
365 val |= ACK_RQST_EN;
366 if (lpm)
367 val |= CMD_MODE_ALL_LP;
368
369 dsi_write(dsi, DSI_LPCLK_CTRL, lpm ? 0 : PHY_TXREQUESTCLKHS);
370 dsi_write(dsi, DSI_CMD_MODE_CFG, val);
371
372 val = dsi_read(dsi, DSI_VID_MODE_CFG);
373 if (lpm)
> 374 val |= ENABLE_LOW_POWER_CMD;
375 else
376 val &= ~ENABLE_LOW_POWER_CMD;
377 dsi_write(dsi, DSI_VID_MODE_CFG, val);
378 }
379
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 73542 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode
2020-07-01 14:52 Yannick Fertre
@ 2020-07-01 15:09 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2020-07-01 15:09 UTC (permalink / raw)
To: Yannick Fertre
Cc: Alexandre Torgue, David Airlie, Philippe Cornu, dri-devel,
linux-kernel, Maxime Coquelin, Daniel Vetter, linux-stm32,
linux-arm-kernel, Benjamin Gaignard
Hi Yannick.
On Wed, Jul 01, 2020 at 04:52:58PM +0200, Yannick Fertre wrote:
> From: Antonio Borneo <antonio.borneo@st.com>
>
> 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 <antonio.borneo@st.com>
> Change-Id: Ib78fa37bcc7559ce63017acd6ee0bbf00c61a397
Change-Id is not used in kernel patches to my best knowledge.
> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/153242
> Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
> Reviewed-by: CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
Reviews by humans, not machines..
> Reviewed-by: Yannick FERTRE <yannick.fertre@st.com>
> Reviewed-by: Philippe CORNU <philippe.cornu@st.com>
> Tested-by: Yannick FERTRE <yannick.fertre@st.com>
> ---
> 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);
> }
We have following code:
static void dw_mipi_dsi_set_mode(struct dw_mipi_dsi *dsi,
unsigned long mode_flags)
{
dsi_write(dsi, DSI_PWR_UP, RESET);
if (mode_flags & MIPI_DSI_MODE_VIDEO) {
dsi_write(dsi, DSI_MODE_CFG, ENABLE_VIDEO_MODE);
dw_mipi_dsi_video_mode_config(dsi);
dsi_write(dsi, DSI_LPCLK_CTRL, PHY_TXREQUESTCLKHS);
} else {
dsi_write(dsi, DSI_MODE_CFG, ENABLE_CMD_MODE);
}
dsi_write(dsi, DSI_PWR_UP, POWERUP);
}
Here DSI_MODE_CFG is used to set vidoe mode or not.
But the code snip above checks DSI_VID_MODE_CFG.
It looks inconsistent.
I do not know the HW - and just stumbled over this.
Sam
>
> static int dw_mipi_dsi_gen_pkt_hdr_write(struct dw_mipi_dsi *dsi, u32 hdr_val)
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode
@ 2020-07-01 14:52 Yannick Fertre
2020-07-01 15:09 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Yannick Fertre @ 2020-07-01 14:52 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard, David Airlie,
Daniel Vetter, Maxime Coquelin, Alexandre Torgue, dri-devel,
linux-stm32, linux-arm-kernel, linux-kernel
From: Antonio Borneo <antonio.borneo@st.com>
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 <antonio.borneo@st.com>
Change-Id: Ib78fa37bcc7559ce63017acd6ee0bbf00c61a397
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/153242
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
Reviewed-by: Yannick FERTRE <yannick.fertre@st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@st.com>
Tested-by: Yannick FERTRE <yannick.fertre@st.com>
---
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-01 22:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 15:13 [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode Yannick Fertre
2020-07-01 22:37 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2020-07-01 14:52 Yannick Fertre
2020-07-01 15:09 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).