From patchwork Tue May 28 08:27:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 165250 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp8168962ili; Tue, 28 May 2019 01:28:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrug/BKEMWUMaw7vnb+EuCikDMOrETMI99USlRI6AV0AA5FZKmUPxdOZ5MIy3pjAHfB5FF X-Received: by 2002:a63:2d6:: with SMTP id 205mr130617527pgc.114.1559032119896; Tue, 28 May 2019 01:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559032119; cv=none; d=google.com; s=arc-20160816; b=AKoqkAA4ONgSuDo5vbFTReJ50oSc7PImxIN0XnyhZx/avvn3dY/8LWlaLtDEOKVlxV NsbMLXOq9302M/d1bcRslQKP0KjL60J1sBUclES9PruhOEJd7NcJAULQ40HNL0TYe1yu t3Jlb4P9f27EnkmpMPRmEmQFJ3IcGllOJZBMNTBOcME5gK4WMnK4/1EIimbatEl+5u3Q hm7sLTxn9FHrgyTAvXhHX9n+/MxFTFAOTHk04Eu5Vc6AxqaurE29pFgaYAQfFasJWTaN kk/0OlH6LFEQW4UJGg/WDHqrNRhVUcK8Shka937qUpkMl+3m/2mcd9/lhx4aeAjl9A1Y Uv3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=qLYPduCEFF7/t5rCp3xYcjHy4JzYG1bkVWjhiNUQdDU=; b=wC8IzBNp4CilsjIVrxwK+1niHjhzi7Ya2xNDuOMgmaZVRZEQUzBv4MbSmNm0mVqM7x HMyL75eesUYZWwzzndXbsnsxXLUYvxvvlDtL7oiplJQBH2189ogaTg+E8S8AsimweepD Q4LMNBe8S7r9C3ydz9II5zd7gfFp3b2XPF0eLin3m38mVog8tub7wQyD59jQ1etxcPQO mZwQgCHCXf98qGK/YLz0gvXSWRx8DiSFgFRGx2Bn2CImrcITyBYJ/JrhH8YfB3d/qhH2 y+F0hoTm7mo0e13l2J1lImTDoV5PxtcYjUFbNflZ45wrmgwjooGUULaLh84dGcg7jWqj Wlyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id f127si15973839pfa.221.2019.05.28.01.28.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2019 01:28:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 685EB89CB5; Tue, 28 May 2019 08:28:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62EA089CA4 for ; Tue, 28 May 2019 08:28:33 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4S8SUtV036730; Tue, 28 May 2019 03:28:30 -0500 Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4S8SUQP008684 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 May 2019 03:28:30 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 28 May 2019 03:28:29 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 28 May 2019 03:28:29 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x4S8Rxuf125039; Tue, 28 May 2019 03:28:27 -0500 From: Tomi Valkeinen To: , Andrzej Hajda , Laurent Pinchart , Lucas Stach , Andrey Gusakov , Philipp Zabel , Andrey Smirnov , Peter Ujfalusi , Jyri Sarha , Benoit Parrot Subject: [PATCHv4 11/24] drm/bridge: tc358767: disable only video stream in tc_stream_disable Date: Tue, 28 May 2019 11:27:34 +0300 Message-ID: <20190528082747.3631-12-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190528082747.3631-1-tomi.valkeinen@ti.com> References: <20190528082747.3631-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559032110; bh=SedRjre2xTL1u2YwW9+kMyaMm6yrXa2oF99ONnZ7j+8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=y6VEsHclFKHxDX0qQrZwvFEXK12ECUBxTV0P9AQX2QRvD3mYi5LpU2MOlesbOapzx dfb1F9Q9SSW3TLa+EC/fs7inkJGTeW4qPd5dCoUHkSLI1qSoIPx0yDOOsAiLdK+cFg ermbHJrDbXux9WM9p4Q4O0Z3VYBxhaohFz2c8fyE= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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 2323a22656e8..f004db06dee9 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); + val &= ~VID_EN; + tc_write(DP0CTL, val); tc_pxl_pll_dis(tc);