From patchwork Fri Nov 15 22:33:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 179535 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp13126650ilf; Fri, 15 Nov 2019 14:34:24 -0800 (PST) X-Google-Smtp-Source: APXvYqwxF4jrNYHGzThdCI89q5ycba56s/yghbuKMYpmi0F3hac1RQNDBZUUIHaM/7Hgfggs51Ur X-Received: by 2002:a1c:f415:: with SMTP id z21mr17823878wma.140.1573857263970; Fri, 15 Nov 2019 14:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573857263; cv=none; d=google.com; s=arc-20160816; b=sOKqdzOmgM4UqHAZNXkPLPdRpvrSa/LraIMEPIQ5tSUZShs4sTUYUPBx9WDQMkIj/e d3eOIpJcVePQqtovRm3XyXb6aYb9WlJpn0AWbdAtgmANuk3ICVyTbG61SjwsrMK6ageM dyGJ8/cGeUTMJLQRdpJotGN/gX9jA7a01VYC3D4w7xVa3C7Z9EHZ2HN5nOqm5dlfJJz4 TyhY+CTKR169Ket34UT0Yw69k9ABvkVY1Z+0ypscaNX2srEeX1VgF/p1lU5sisnXtz3X 6EVNM/efejic1NWrOB1qhjzjg5WFV5vT/7tevvcSLxarJqiECVhgX6Np6WxIEC4IuLxA ZYLg== 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:dkim-signature; bh=r1ouRyNa+k6U3bqzEPdoAfpCVsnWSnRUjkxZ+vQnSI0=; b=MuyksDtk/2mdKYCJipYJ9gQIoNzDF8Dg2fVp6wUW7g+oUNUvIZeLzZQKD8vEJiNBkQ 43JhaUHcebr7nYkdF7KcGUm5NwZzarCPHxPBIZqY07brz/Xx475bfJAxl7R7n1imfaOO USpABls1kuR83bSO1t6YVnkwThqv/gIlob6/hO2KgcoWDUf4m+Fnh/+wlx+P6qKhYd1j R6m7XYnLwIq8tk6zw8pxW8AZOftnfle7pBmPgnAGP+4O0QvGryj2sNpJ+6onFZM6CeFm dgPNVXDZ/TZVuBLopGsv/StYtQOGu7aDJe2+5wsSkWneA6hUGx8FQXEpFF2XfBPHlD7u w+zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AkA2Dg+S; 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=pass (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 z31si7981710ede.236.2019.11.15.14.34.23; Fri, 15 Nov 2019 14:34:23 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=AkA2Dg+S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727494AbfKOWeW (ORCPT + 26 others); Fri, 15 Nov 2019 17:34:22 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41343 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727413AbfKOWeP (ORCPT ); Fri, 15 Nov 2019 17:34:15 -0500 Received: by mail-pl1-f194.google.com with SMTP id d29so5617389plj.8 for ; Fri, 15 Nov 2019 14:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r1ouRyNa+k6U3bqzEPdoAfpCVsnWSnRUjkxZ+vQnSI0=; b=AkA2Dg+SrHTn4/EJ8QynEGN7oPoQ/Aw5fRHMyXpEW6Y6keS6gO6VdGp+FDJ81HaCck LfkmYzBp8QrNwaymjk9ee0qPdxlC88qX2CcJuOT+KoHhzb0ptMpflS2O2yk9g1xcwj+i OsUJI152IuEDboSfUp+G5xjZAwG1t7A0XU/A7qB4I1ptcuIK1x3v8NMEcAQoZZq4bi4E Be+sv3Xu57IO52n36rJiyMgg2w2e6EQhjAwLZeheDCHSoe140YiXAwaGdpXT8hHFrlti FWcDYu761P26xKgxM27ycYqxbciEuu1T6zlil6sWl1pcyhuIHyDlPl4vUH/r7fLTJUmm 52MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r1ouRyNa+k6U3bqzEPdoAfpCVsnWSnRUjkxZ+vQnSI0=; b=qlaDrbIXBxG8J1105GRXaShN616NHlzaAMd/lzAL8XC2XW1OVX8btuMGWMRxCRMvMz W3DeqM8qtzGN6L/UfNirE5IAtYCLigwN9bVo56AHg+tGRoQ1EZsL/Bh/FLHhLVn31VLr NzU/zeRnOybLgvaTgrBwDT99etao7KrlnEMRcD8Ta1WkMwPS7PSyoHm1OLxXmEWgT1ET uWkkDEe1mUn5rBPrcJSUVrQagSrVM3Yl1/hbFKmfkoa3l0nI+9DaLqZzBYbh2HwRClGT dyIh8ljifrkCkH3sJSZk1Ai6Uzofl0pYj3InEusthVDNFPobhWTXIp2YGgfmU/UaAzqA zb8w== X-Gm-Message-State: APjAAAWD7G+OmUINkB6UOEiFojsaEWBM3L9Xoa4TCsXToFaxGEQgc0Qv tveiGwlztw6uiuCgD5ak41vRb0spSS4= X-Received: by 2002:a17:90a:9705:: with SMTP id x5mr22110495pjo.37.1573857254692; Fri, 15 Nov 2019 14:34:14 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id m15sm11699724pfh.19.2019.11.15.14.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 14:34:14 -0800 (PST) From: Mathieu Poirier To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [stable 4.19+][PATCH 19/20] media: ov5640: fix framerate update Date: Fri, 15 Nov 2019 15:33:55 -0700 Message-Id: <20191115223356.27675-19-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191115223356.27675-1-mathieu.poirier@linaro.org> References: <20191115223356.27675-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hugues Fruchet commit 0929983e49c81c1d413702cd9b83bb06c4a2555c upstream Changing framerate right before streamon had no effect, the new framerate value was taken into account only at next streamon, fix this. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Cc: stable # 4.19+ Signed-off-by: Mathieu Poirier --- drivers/media/i2c/ov5640.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index a3bbef682fb8..2023df14f828 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -2572,8 +2572,6 @@ static int ov5640_s_frame_interval(struct v4l2_subdev *sd, if (frame_rate < 0) frame_rate = OV5640_15_FPS; - sensor->current_fr = frame_rate; - sensor->frame_interval = fi->interval; mode = ov5640_find_mode(sensor, frame_rate, mode->hact, mode->vact, true); if (!mode) { @@ -2581,7 +2579,10 @@ static int ov5640_s_frame_interval(struct v4l2_subdev *sd, goto out; } - if (mode != sensor->current_mode) { + if (mode != sensor->current_mode || + frame_rate != sensor->current_fr) { + sensor->current_fr = frame_rate; + sensor->frame_interval = fi->interval; sensor->current_mode = mode; sensor->pending_mode_change = true; }