From patchwork Fri Jun 22 15:33:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todor Tomov X-Patchwork-Id: 139703 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1022897lji; Fri, 22 Jun 2018 08:40:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK487w8AhrxQMGMISPmDahUMB1luzRUGO2THhvUapB4tWTK8rEo7R7GKy8LVfQo8vTrp54Z X-Received: by 2002:a17:902:bd42:: with SMTP id b2-v6mr2223997plx.23.1529682046888; Fri, 22 Jun 2018 08:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529682046; cv=none; d=google.com; s=arc-20160816; b=rl5nYXUH8j06BWmp6/ErSVss2beSRu8VHTAxJ/S2Dgll2a+BJ75fQ22uCQI+Y2qK9k bGA81FqjOhNTNPxDL85kGXgnMVtmn8/w6pKoh1gvFR723oPiOkaAz3WfqnoaxQ7LGBWd GQq7YoceysqJFADtAMR/hkrjr+pJk+RduBnl0cE95z8qwKAwjXwlBLf7Y6HCqyXXOXJG qS1LHr7IM4Dw1Nzkt9gxg0QG9e9O0OS1A/JIxgMtQ5Irs87yHcLxRJGTcx8LZOM8lfVd STmpxAkebm+J+clbBJvxs/UIHwQws2b7HkPPwhoaFVKqGzbV4QSxQaqJclQJog+r+kNQ QUjQ== 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=qRSEhLhxJs3daUwJihmPmXeJqX/OzPasZLrk713r1LVoQQ3ytMFgJkKc61f3YkoJOC n/ykCRxpsGZllLwO8RyT3+bWzOxZNht13/8IGhBECP+4MX9r7y9HZ+/LGXBnq84Yrqsi v5PvOkv6EjX/Ll43qJgGGQFm8bAbqtF+Vv6iro5vL9xiYUsZDLWxXsteCmbIC4OlW9aX bQFbd+cKVm1i75tlO4bRcro3gej1t6DWId4omWVNAmZCLA9mYhcHaPuGHPjfjy6uWV0h OTo3vI/XTny5axkDXByODdoyP+yKDywFWS3OEXAr/yzw9jX20G6AirTvTLOvVOlldTV5 PfLg== 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 i2-v6si6577016pgo.289.2018.06.22.08.40.46; Fri, 22 Jun 2018 08:40:46 -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 S934315AbeFVPjp (ORCPT + 31 others); Fri, 22 Jun 2018 11:39:45 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:46400 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933974AbeFVPeE (ORCPT ); Fri, 22 Jun 2018 11:34:04 -0400 Received: from mms-0439.qualcomm.mm-sol.com (unknown [37.157.136.206]) by extserv.mm-sol.com (Postfix) with ESMTPSA id 57DA44F889; Fri, 22 Jun 2018 18:33:59 +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 13/32] media: camss: vfe: Do not disable CAMIF when clearing its status Date: Fri, 22 Jun 2018 18:33:22 +0300 Message-Id: <1529681621-9682-14-git-send-email-todor.tomov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529681621-9682-1-git-send-email-todor.tomov@linaro.org> References: <1529681621-9682-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); }