Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5673337imm; Mon, 23 Jul 2018 04:09:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfbpXZZYKze/umAaiWFlq6RKMRUT39A67EgEpvT8MBM6U56vR0+Nc52f9xamO2if6axNBmG X-Received: by 2002:a63:943:: with SMTP id 64-v6mr11624891pgj.368.1532344172589; Mon, 23 Jul 2018 04:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532344172; cv=none; d=google.com; s=arc-20160816; b=0Oi9tWj9VILw3qS7YDgHv2JYpCrhoyU7ln5sj/oUarLM0dybg3OYU/CytTD3yERiXF HoFhp1AtxFPN/wroesAK73CAiAYOBbnDOKCelXhcfwwgZ32zhhyjVqZIGiPDy4ZGgq/a z1jImOLJC494C6eYi8cJSch8lb3AZWIflJsJ5ZYsZJDrUh3vM772aZb6BABXk/cQFi0c 4SM8E17J+wG+IXZQB5ijQ9S7XpFGQ0NOwQjBeizqgpPAWhyjeYMQqmLC6ziidxkVcFAZ UTSQihrEAg+9sOazuDdjyr8zKi4Re6fzaCM7aOHJkiJ0sCPqqkwt6aOaRyJ/MHKsfI2F LUnA== 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=ngOlP3sbV6Q7LsgC2k0GbQxGn1OSzz92Zql5T4kzHN9O4aCycsKX6CR/IrecaTPKlv Wbg562kbqtk+4IkYydyJQi/l/6rPsU6JAhQ4F0ty1eXR+N99FND33yWcjssCkM17EQ4C KAdimgu28aFmM39Rnz0woHQxgvIUfy7MA24pcKKg871hXFAspbTdPwqIoGfiLpie/M6h HGdxWND0upQPUuAzF2bXZ+Sow16WNFshQFpg8si3GGAR5J1DIj6oR0N6yK1FehVoGrps ZVWPUzGDEUzlET2+4n7HfqejCL2rOZMNxe8mBSpTUqNf058W4+QfUqOq8L1nOoswmw4v 4KvQ== 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 n72-v6si8719294pfk.14.2018.07.23.04.09.17; Mon, 23 Jul 2018 04:09:32 -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 S2388397AbeGWMHc (ORCPT + 99 others); Mon, 23 Jul 2018 08:07:32 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:39960 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388104AbeGWMEq (ORCPT ); Mon, 23 Jul 2018 08:04:46 -0400 Received: from mms-0439.qualcomm.mm-sol.com (unknown [37.157.136.206]) by extserv.mm-sol.com (Postfix) with ESMTPSA id 93A2ECD5D; Mon, 23 Jul 2018 14:04:02 +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 v3 14/35] media: camss: vfe: Do not disable CAMIF when clearing its status Date: Mon, 23 Jul 2018 14:02:31 +0300 Message-Id: <1532343772-27382-15-git-send-email-todor.tomov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532343772-27382-1-git-send-email-todor.tomov@linaro.org> References: <1532343772-27382-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(-) 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); } -- 2.7.4