Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2637866pxa; Mon, 17 Aug 2020 15:08:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYM50/ZZvTS01QAXA4MXsMuwQnCU/mcmRnLf/uYW09H7tKmO+2JwVBR7P/ARG863+vO1Rt X-Received: by 2002:aa7:d3d9:: with SMTP id o25mr17443457edr.362.1597702090950; Mon, 17 Aug 2020 15:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702090; cv=none; d=google.com; s=arc-20160816; b=YszVom7wseGC/BcgHKxomNixK/xEl+lf1IrV1CWRWqNf06UUlrK8//dtneLUtpEuhX A3Bha65ilflrcau34hw+twh88703QLalf60v8nedYOKXsyFpqFnj+itvcWc76Mm0m4dm 7MqDTGIb7KGaxkQ2WjsukBetvkl5jgDF8bq4/O9UnaZHzaHL1gB9QKIimCI8nN7ShEo7 uI/c0Rbd+osc2pchX9fh4oxckqveLdEvQMmIGA1Sg4Fveq2lVW2lCWTVLRpDkObEuXbi o2O++Gln/68U4gE75VCAc5SDaOZSCkUWbOZBxWgcOx1rRoM8q9tjygDegaIy3+PFGFsp CPPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DR9gCfLJlFNP6L2gX0K/lALIkNiNuvfYSt+oezXIs+4=; b=mKNxYKPA9l9i51sfl+NYjmSML0eXDeLD87gdMEMg2NhpNFbbHyydjBItS0r20ZITgB jAd+fpJCLMs6ZIt0vHKl6iZEbFmijOw0BZrE+PXPPqPx8lfnWWcznAiD7t+5uSonPZNF VSNR9oyYVOVLq6JV5yj237pITQCoqxx30jEoQvtbA5VEtlTMHDxx/AzyuuaFMeXijQaJ H7cuJx0lr99Byew9SqyEEaTzAnMWIdrSznPqKvuzJGNombiC21U5/WC3JEmOv96OvSOC ovvg8ppfPMsVmgAVUR9/a3RAt4MLVHNeqqBetbsne8AqpQc3O8F/Hs4ptUXaMnxK0YM3 KRrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xc26Zgkx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si11521701eds.212.2020.08.17.15.07.47; Mon, 17 Aug 2020 15:08:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xc26Zgkx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731182AbgHQQUc (ORCPT + 99 others); Mon, 17 Aug 2020 12:20:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:33382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387715AbgHQPtP (ORCPT ); Mon, 17 Aug 2020 11:49:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E66F12065D; Mon, 17 Aug 2020 15:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679354; bh=eJzhV828l0lyuFGWUIxUci3R86wS4vKN6IOxaozEuQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xc26ZgkxA0vaswpJwBTG14R+fn1LwTeEMz+ma44rGEku/VAN9RvuL6SfhaIYs9Y3c LWs2r9On6HQArNOOSuOaMK62ql/6RAKAnWSiLroC68cvSavmhijjGuOu8sdDDfRWtS FTmnLa2ua2mkYKyWTvdrd58Fgju5JrTI6F37HTRA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helen Koike , Tomasz Figa , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.7 182/393] media: staging: rkisp1: rsz: fix resolution limitation on sink pad Date: Mon, 17 Aug 2020 17:13:52 +0200 Message-Id: <20200817143828.450039805@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Helen Koike [ Upstream commit 906dceb48dfa1e7c99c32e6b25878d47023e916b ] Resizer sink pad is limited by what the ISP can generate. The configurations describes what the resizer can produce. This was tested on a Scarlet device with ChromiumOs, where the selfpath receives 2592x1944 and produces 1600x1200 (which isn't possible without this fix). Fixes: 56e3b29f9f6b2 ("media: staging: rkisp1: add streaming paths") Signed-off-by: Helen Koike Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/rkisp1/rkisp1-resizer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/rkisp1/rkisp1-resizer.c b/drivers/staging/media/rkisp1/rkisp1-resizer.c index 8b1c0cc5ea3f1..26d785d985257 100644 --- a/drivers/staging/media/rkisp1/rkisp1-resizer.c +++ b/drivers/staging/media/rkisp1/rkisp1-resizer.c @@ -543,11 +543,11 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, src_fmt->code = sink_fmt->code; sink_fmt->width = clamp_t(u32, format->width, - rsz->config->min_rsz_width, - rsz->config->max_rsz_width); + RKISP1_ISP_MIN_WIDTH, + RKISP1_ISP_MAX_WIDTH); sink_fmt->height = clamp_t(u32, format->height, - rsz->config->min_rsz_height, - rsz->config->max_rsz_height); + RKISP1_ISP_MIN_HEIGHT, + RKISP1_ISP_MAX_HEIGHT); *format = *sink_fmt; -- 2.25.1