Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp592076imm; Fri, 14 Sep 2018 03:23:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZcxhM+o5rvRYzITPLYVqQxVNDvCAZYlGw9/X4da5xa+6A8kv20R6pH227mHCo7RcygoWi6 X-Received: by 2002:a17:902:aa49:: with SMTP id c9-v6mr11308150plr.195.1536920592142; Fri, 14 Sep 2018 03:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536920592; cv=none; d=google.com; s=arc-20160816; b=T35RQ05oxC4uVuo9Z9NySrMlb3qVpZjb9386gXwZUiQGYNUx03+vwimpbB3qEDoZBr /A77vxDOaLBz1XWzj9orcixAAFlDvWWgs153ucP9yfVHirDR8C5/RRP57wMV7paoeiZo 2aBKYjBu8BoI6Ru/s50bPfGkb6oTOnBI9pJolilCUjCrDAy4DMp72wBFuHMQem7lCRnz MGXROfGZJw3+BjGZHADn8d7RWfeRj8pxWLmFrmkpAlW2ul2IWEnzMACyRGfqGwCnRIgd DYu7wRahlMA2336UpaFja8QG5E5gRhYw15GTyxjh8gtHpTL7sKhext0+dnOQWFQp+f4X 6q7Q== 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 :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=LJQlL84xkbabD82SuJIUEfjgYX7wSeHvw0T+FxyIHKg=; b=r9SQmK8mnjiSq7sXCgBDP7vvhm7Uux3tAhN7JQZBGtcAbG5mkI7smUIXofrieIIxLH dd71cF+oaQjBtEcQR3eRif70mc2e0WMs/jNTAy/VCXQkdbfPs2Q11QvVwkfJWFm5aXMv r3tzq+8hL1E5ruxe3As9PmhVHtjdGoeKWKT+emg0drvwIlnMwFYEi3iK3Kul2Dk4f9RN HFWkJMm3CRfq0/GFZawZLLcHsHX/sORsG+ZJMDcoqFlUWSo60FQRCOGdj0hj7Xqskq8Q JYgVRTnIwypJQjcP+ThnMIqZDsb5DYw+Szvo6u8uisYUCkltYVthbYcMnlv997i9ow9b hnfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="b0ao/kpm"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19-v6si6852836pgy.577.2018.09.14.03.22.56; Fri, 14 Sep 2018 03:23:12 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="b0ao/kpm"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728007AbeINPgm (ORCPT + 99 others); Fri, 14 Sep 2018 11:36:42 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:34274 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726966AbeINPgm (ORCPT ); Fri, 14 Sep 2018 11:36:42 -0400 Received: from avalon.localnet (unknown [IPv6:2a02:a03f:44f6:3500:d929:375b:d608:66c7]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E8D73CE; Fri, 14 Sep 2018 12:22:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1536920571; bh=UdmXSn/cn3Bq5WHqTQOIJ1ZnyGpkd1dqMoobhUmnu08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b0ao/kpmOHtKg4Czj1naDMmQcuvUO7G+OTFOz+iA0UTb6S2z6SVeZ5bp9AeWtmN4M Lp+WcYwVofGd5A4DWOwEW/INtKlkOxCECnMapIn7EhqN3ezOsV7MFvNPOq05F9CPx6 FGiwAjV46mzeyiPDGDy/ZQUiQZZP/9FccbTrRZV4= From: Laurent Pinchart To: Kieran Bingham Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] media: vsp1: Remove artificial pixel limitation Date: Fri, 14 Sep 2018 13:23:04 +0300 Message-ID: <3874771.GdJIGdZf8f@avalon> Organization: Ideas on Board Oy In-Reply-To: <20180831144044.31713-2-kieran.bingham+renesas@ideasonboard.com> References: <20180831144044.31713-1-kieran.bingham+renesas@ideasonboard.com> <20180831144044.31713-2-kieran.bingham+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kieran, Thank you for the patch. On Friday, 31 August 2018 17:40:39 EEST Kieran Bingham wrote: > The VSP1 has a minimum width and height of a single pixel, with the > exception of pixel formats with sub-sampling. > > Remove the artificial minimum width and minimum height limitation, and > instead clamp the minimum dimensions based upon the sub-sampling > parameter of that dimension. > > Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart and applied to my tree. > --- > drivers/media/platform/vsp1/vsp1_video.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/media/platform/vsp1/vsp1_video.c > b/drivers/media/platform/vsp1/vsp1_video.c index 81d47a09d7bc..e78eadd0295b > 100644 > --- a/drivers/media/platform/vsp1/vsp1_video.c > +++ b/drivers/media/platform/vsp1/vsp1_video.c > @@ -38,9 +38,7 @@ > #define VSP1_VIDEO_DEF_WIDTH 1024 > #define VSP1_VIDEO_DEF_HEIGHT 768 > > -#define VSP1_VIDEO_MIN_WIDTH 2U > #define VSP1_VIDEO_MAX_WIDTH 8190U > -#define VSP1_VIDEO_MIN_HEIGHT 2U > #define VSP1_VIDEO_MAX_HEIGHT 8190U > > /* > --------------------------------------------------------------------------- > -- @@ -136,9 +134,8 @@ static int __vsp1_video_try_format(struct vsp1_video > *video, height = round_down(height, info->vsub); > > /* Clamp the width and height. */ > - pix->width = clamp(width, VSP1_VIDEO_MIN_WIDTH, VSP1_VIDEO_MAX_WIDTH); > - pix->height = clamp(height, VSP1_VIDEO_MIN_HEIGHT, > - VSP1_VIDEO_MAX_HEIGHT); > + pix->width = clamp(width, info->hsub, VSP1_VIDEO_MAX_WIDTH); > + pix->height = clamp(height, info->vsub, VSP1_VIDEO_MAX_HEIGHT); > > /* > * Compute and clamp the stride and image size. While not documented in -- Regards, Laurent Pinchart