Re: [PATCHv3 11/23] drm/bridge: tc358767: disable only video stream in tc_stream_disable

2019-05-20 Thread Andrzej Hajda
On 03.05.2019 14:29, Tomi Valkeinen wrote:
> Currently the code writes 0 to DP0CTL in tc_stream_disable(), which
> disables the whole DP link instead of just the video stream. We always
> disable the link and the stream together from tc_bridge_disable(), so
> this doesn't cause any issues.
>
> Nevertheless, fix this by only clearing VID_EN in tc_stream_disable to
> stop the video stream while keeping the link enabled.
>
> Signed-off-by: Tomi Valkeinen 
Reviewed-by: Andrzej Hajda 

 --
Regards
Andrzej
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCHv3 11/23] drm/bridge: tc358767: disable only video stream in tc_stream_disable

2019-05-03 Thread Tomi Valkeinen
Currently the code writes 0 to DP0CTL in tc_stream_disable(), which
disables the whole DP link instead of just the video stream. We always
disable the link and the stream together from tc_bridge_disable(), so
this doesn't cause any issues.

Nevertheless, fix this by only clearing VID_EN in tc_stream_disable to
stop the video stream while keeping the link enabled.

Signed-off-by: Tomi Valkeinen 
---
 drivers/gpu/drm/bridge/tc358767.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/tc358767.c 
b/drivers/gpu/drm/bridge/tc358767.c
index b22f5fe7ccfd..86e2e16c5a90 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1076,10 +1076,13 @@ static int tc_stream_enable(struct tc_data *tc)
 static int tc_stream_disable(struct tc_data *tc)
 {
int ret;
+   u32 val;
 
dev_dbg(tc->dev, "disable video stream\n");
 
-   tc_write(DP0CTL, 0);
+   tc_read(DP0CTL, );
+   val &= ~VID_EN;
+   tc_write(DP0CTL, val);
 
tc_pxl_pll_dis(tc);
 
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel