Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp718740ybt; Wed, 17 Jun 2020 12:05:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy62+NlHXq1Y42uHs03D0n7I1PZ9B7YoOBGUpwO9sD4Z2EYp/YDUEMWeFVlaRx078tCYgXz X-Received: by 2002:a17:906:1c8e:: with SMTP id g14mr617875ejh.136.1592420748802; Wed, 17 Jun 2020 12:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592420748; cv=none; d=google.com; s=arc-20160816; b=iEpShAb/HSMoxqqctq8co2Kpkt8XddK7IrLNogDGVHdDNrMutftZJkdfYvocY6FJJ3 bs4G7JYa3rV5n1KUg/56w5k/rNoXeDySel+TBJ1Jlty7iKc+6rs3laW+0j5aI2a9/XkR px/tO4Kz+bDW6WR7tP4TYFadWZV/IoQIc/zAGkxGVyUQHTOiHQ6KFtcgcFiVupgLYW/t Bz+wqcXRJrsZyNWF8CIjxokC/kq/J57hVaV8SkyoL8sOVj2WxEngtC1v+a6mdetN0emW hkhXREGvdwSVD0LlFMeGf32UF+JLiYSswEh3ZXlulc+xz5BXruzP/MbS4MGvLmMXm/xv cNaw== 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 :message-id:date:subject:cc:to:from; bh=K6iIvYFWgnVNMuwZX7R0mlCq/XoeL/13JHy4jjWzMtk=; b=dWH1e1dFtviEvXPPjxmuU/kYtRXy5xdUS+GeKaFVzFrvr/C8D6Irjp0Y7gB/6NN1Lm QwV4xU86WilRtgkYiuUpCdmOFTcUmbOKuuIQ3S9dfKTskNj5E1n+Ly2DXqETZIwSw/Mv w6uXjc+MDFPN+8ZCbyGoWw2o8xzSqa/tMHXS0Tz8blhcX8Mc6+Cm3D7Hli3YTS01HN6H o4y9ydtWMeeYPfUiUO35jq8iPWXxkMvQgDT7c+3uYhlF3L1yKnsGvGgkfHZ4JWQbXqE9 +DyXAbhA3C8NsuCq4ks+lht2sZov08V4IfyniYvU2PI1ri3irM22SXySiFxsqNGbzGrd lNLw== ARC-Authentication-Results: i=1; mx.google.com; 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k25si485209ejk.678.2020.06.17.12.05.25; Wed, 17 Jun 2020 12:05:48 -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; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726966AbgFQSIR (ORCPT + 99 others); Wed, 17 Jun 2020 14:08:17 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:36134 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726861AbgFQSIQ (ORCPT ); Wed, 17 Jun 2020 14:08:16 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id 34AEA2A3CFA From: Helen Koike To: linux-media@vger.kernel.org Cc: mchehab@kernel.org, dafna.hirschfeld@collabora.com, linux-kernel@vger.kernel.org, tfiga@google.com, hans.verkuil@cisco.com, kernel@collabora.com, Helen Koike Subject: [PATCH] media: staging: rkisp1: rsz: fix resolution limitation on sink pad Date: Wed, 17 Jun 2020 15:08:01 -0300 Message-Id: <20200617180801.158331-1-helen.koike@collabora.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 d049374413dcf..0d41f43b5339f 100644 --- a/drivers/staging/media/rkisp1/rkisp1-resizer.c +++ b/drivers/staging/media/rkisp1/rkisp1-resizer.c @@ -553,11 +553,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.26.0