From patchwork Thu Jul 5 13:32:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todor Tomov X-Patchwork-Id: 141169 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1953845ljj; Thu, 5 Jul 2018 06:39:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfBgHp8XeiU6InHQu90vo+Wgyn2ryWL8qSZlu47Q4JjNQCkBzZcNe3jmpB1pqy1SvWOq9iL X-Received: by 2002:a62:8d7:: with SMTP id 84-v6mr6501950pfi.172.1530797943477; Thu, 05 Jul 2018 06:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530797943; cv=none; d=google.com; s=arc-20160816; b=AoA/Xo2U7XOXRG5CtcoojMoIZjvynmghQbPw5BF1Hnh6BYZYHTZYqOFpafWYI9AMTj ONb6+6JegGh5jCwCKqToKg6WP/fwDyayMz/2CdFwagFxCKO2+RIiofthBhag83Q1VOiG dCX+soVCsyvN1u+tPaUinGgmNrNi0CSEZqddOhq31e903UqZDTYIyBwBv0A8i79kkSFa RMO4sfej2GQ6uRXZa8XXuFSFpBq1RgR5qdPLwSJom8ZGmGWx0w1Rea9typp0YscxgXTO Y8bYrK253SdmBGecNkhVZ7hedA4gif1PiMI3rHjirtN31ehKSf7cnHyxDgfgPmr8mqux uKRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Nr9dJpx3chH7JY3AApnp5bnByld35KnqRxHxOVzXHxk=; b=MCdXe8Dhc7pqWZzb6RbndapfyfvAH2KON0AjD98+ehDq2Qhx/jLaXuP5EGTZKtX7nL dUDHv/aWh6htDkFVxzmplaCksXFLGGORgiBNsFwuCcM3Rpv0ePCO1lkmsaFaE4cYe+nh O5kUJhcqYNfp+mwoZwDzK52xTOrmFIthxMtZe+XySpdiDid1cs5B1221zZaTKAtpC5wh LKWF49Ng3vRpfqd6JXSB8plrCmRjO+fiu+QogDsD79IRLARJwexLTNVoaAIHv9SNbLC7 kuWTKkIjhRDHbZGhXVIWbUPnaJoOotOdZIuq518BXWWpVzv1Q5QeDPU/XRmcpwgLM7yA B8MA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4-v6si5408049pge.173.2018.07.05.06.39.03; Thu, 05 Jul 2018 06:39:03 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754486AbeGENjA (ORCPT + 31 others); Thu, 5 Jul 2018 09:39:00 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:41332 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753764AbeGENdW (ORCPT ); Thu, 5 Jul 2018 09:33:22 -0400 Received: from mms-0439.qualcomm.mm-sol.com (unknown [37.157.136.206]) by extserv.mm-sol.com (Postfix) with ESMTPSA id 49D51CD55; Thu, 5 Jul 2018 16:33:17 +0300 (EEST) From: Todor Tomov To: mchehab@kernel.org, sakari.ailus@linux.intel.com, hans.verkuil@cisco.com, laurent.pinchart+renesas@ideasonboard.com, linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Todor Tomov Subject: [PATCH v2 13/34] media: camss: vfe: Do not disable CAMIF when clearing its status Date: Thu, 5 Jul 2018 16:32:44 +0300 Message-Id: <1530797585-8555-14-git-send-email-todor.tomov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530797585-8555-1-git-send-email-todor.tomov@linaro.org> References: <1530797585-8555-1-git-send-email-todor.tomov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use "no change" value when clearing CAMIF status and make sure this is done before configuring the new command. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss/camss-vfe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c index 77167f1..15a1a01 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -156,6 +156,7 @@ #define VFE_0_CAMIF_CMD 0x2f4 #define VFE_0_CAMIF_CMD_DISABLE_FRAME_BOUNDARY 0 #define VFE_0_CAMIF_CMD_ENABLE_FRAME_BOUNDARY 1 +#define VFE_0_CAMIF_CMD_NO_CHANGE 3 #define VFE_0_CAMIF_CMD_CLEAR_CAMIF_STATUS (1 << 2) #define VFE_0_CAMIF_CFG 0x2f8 #define VFE_0_CAMIF_CFG_VFE_OUTPUT_EN (1 << 6) @@ -1021,8 +1022,10 @@ static void vfe_set_camif_cfg(struct vfe_device *vfe, struct vfe_line *line) static void vfe_set_camif_cmd(struct vfe_device *vfe, u32 cmd) { - writel_relaxed(VFE_0_CAMIF_CMD_CLEAR_CAMIF_STATUS, + writel_relaxed(VFE_0_CAMIF_CMD_CLEAR_CAMIF_STATUS | + VFE_0_CAMIF_CMD_NO_CHANGE, vfe->base + VFE_0_CAMIF_CMD); + wmb(); writel_relaxed(cmd, vfe->base + VFE_0_CAMIF_CMD); }