From patchwork Fri Sep 14 14:26:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10600821 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F022933 for ; Fri, 14 Sep 2018 14:26:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5782E2B852 for ; Fri, 14 Sep 2018 14:26:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 491972B857; Fri, 14 Sep 2018 14:26:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8C8E2B84F for ; Fri, 14 Sep 2018 14:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727944AbeINTlm (ORCPT ); Fri, 14 Sep 2018 15:41:42 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:36668 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726908AbeINTlm (ORCPT ); Fri, 14 Sep 2018 15:41:42 -0400 Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C7A87CE; Fri, 14 Sep 2018 16:26:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1536935216; bh=7MfsDesTjVez73NwLIuRR/scBqN5BqWU1jj1aRqEU1s=; h=From:To:Cc:Subject:Date:From; b=DtSqydizGTEE0a5ViZSj3ItuWqziSa/K8puCn0/G77hj5UvqHwo96fG7PvdMznQWg IG/gSPFurJ5vQlEFVa7lRgjaDAiJkmri7peMmcD74OKj/wsoCDrt0nrWh10cfnILRD h6LcLHsz9tmNPSq6jlgHy3QP4+151CO0RWcBCr4U= From: Kieran Bingham To: Laurent Pinchart , mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham , Kieran Bingham Subject: [PATCH v2 1/2] media: vsp1: Document max_width restriction on SRU Date: Fri, 14 Sep 2018 15:26:51 +0100 Message-Id: <20180914142652.30484-1-kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.17.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The SRU is currently restricted to 256 pixels as part of the current partition algorithm. Document that the actual capability of this component is 288 pixels, but don't increase the implementation. The extended partition algorithm may later choose to utilise a larger input to support overlapping partitions which will improve the quality of the output images. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- drivers/media/platform/vsp1/vsp1_sru.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/vsp1/vsp1_sru.c b/drivers/media/platform/vsp1/vsp1_sru.c index d216707f64c9..19f91eb81134 100644 --- a/drivers/media/platform/vsp1/vsp1_sru.c +++ b/drivers/media/platform/vsp1/vsp1_sru.c @@ -314,6 +314,11 @@ static unsigned int sru_max_width(struct vsp1_entity *entity, output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, SRU_PAD_SOURCE); + /* + * The maximum input width of the SRU is 288 input pixels, but 32 + * pixels are reserved to support overlapping partition windows when + * scaling. + */ if (input->width != output->width) return 512; else From patchwork Fri Sep 14 14:26:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10600825 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 725BB13AD for ; Fri, 14 Sep 2018 14:27:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56F192B84F for ; Fri, 14 Sep 2018 14:27:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AE2A2B857; Fri, 14 Sep 2018 14:27:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD1432B84F for ; Fri, 14 Sep 2018 14:27:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbeINTln (ORCPT ); Fri, 14 Sep 2018 15:41:43 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:36676 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727628AbeINTln (ORCPT ); Fri, 14 Sep 2018 15:41:43 -0400 Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4E906B91; Fri, 14 Sep 2018 16:26:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1536935216; bh=EmhaZQSNCJXPbO457Siv39Ut3dbpHKuL0RExoSK48sc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZXF/CEvTKzQtJ/wHgWzbgrlmo1AQJAHQpF0SFf/nf+81FHSBIa720pd99X5/VKuCG ciHyNGUC8VuKYFNZ3vYMyJTjR3KP3/5z37XTBvd2mVa4MyFq/SXYwnjFnFeM6A3xoX rFZScsUAATT1Q3djDp69OnH585vFQxmX/8UjgZLE= From: Kieran Bingham To: Laurent Pinchart , mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham , Kieran Bingham Subject: [PATCH v2 2/2] media: vsp1: Document max_width restriction on UDS Date: Fri, 14 Sep 2018 15:26:52 +0100 Message-Id: <20180914142652.30484-2-kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180914142652.30484-1-kieran.bingham+renesas@ideasonboard.com> References: <20180914142652.30484-1-kieran.bingham+renesas@ideasonboard.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The UDS is currently restricted based on a partition size of 256 pixels. Document the actual restrictions, but don't increase the implementation. The extended partition algorithm may later choose to utilise a larger partition size to support overlapping partitions which will improve the quality of the output images. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- drivers/media/platform/vsp1/vsp1_uds.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/platform/vsp1/vsp1_uds.c b/drivers/media/platform/vsp1/vsp1_uds.c index 75c613050151..e8340de85813 100644 --- a/drivers/media/platform/vsp1/vsp1_uds.c +++ b/drivers/media/platform/vsp1/vsp1_uds.c @@ -342,6 +342,14 @@ static unsigned int uds_max_width(struct vsp1_entity *entity, UDS_PAD_SOURCE); hscale = output->width / input->width; + /* + * The maximum width of the UDS is 304 pixels. These are input pixels + * in the event of up-scaling, and output pixels in the event of + * downscaling. + * + * To support overlapping parition windows we clamp at units of 256 and + * the remaining pixels are reserved. + */ if (hscale <= 2) return 256; else if (hscale <= 4)