Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5488904ybp; Tue, 8 Oct 2019 03:45:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMgV/TCpX2kIcwXs133I7mxwD6XWRbJnFlortbyZSWd9kMZaTQOeYTwjDufVEpvzVBJ7d0 X-Received: by 2002:a50:a0e2:: with SMTP id 89mr32787328edo.118.1570531536507; Tue, 08 Oct 2019 03:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570531536; cv=none; d=google.com; s=arc-20160816; b=pVs8wkgyDqcBQ0n9J5tU+ZPnIVWDytFj/cYVE5zB4S7UYo7bSQP4p9m27RPCSsS4dH VxikKMXI3VzuZs7PuRlGcHV4zRh5VCkwbLA4oHWSn9vdTKkQ5bbcZjFtWd7g5zNAhDP2 zkBb0hFv+pjLKRMuUtI5Giu/iOIJgkfnd4mTiumpEKj6jEc96Rqc40HJ1l01upICoRBk 7WH4lznZCxbqFCtMLtipnOTx+A2h1nU6vdbtgAWyzrpd0jJCeZGJv8SuSIzOkMDjbgpE f2W93bc1Sqg40FKAZJe82sQBUcWj0lFVcPiLa5TNirdL8snGpz+a5yij2gyHYnY/h0bW LZkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GlbSEHsat/uhnrc6ji92FO04rhx1+BWt+c9sCRWvAxU=; b=qyR9TKF6ypAVqdZcv9YxJpMXiIvUMSq4HyjQuBEHQMm7Vg3iFHRMr9bL3wze+jrpsx ZNTnbMuJqxEzEcX5XoWNDOMGhC5UUHVuAKAfGqkbE6mQYLEot/Q18DJQ15PASEBaSB6U 6HyJ9N9L+jMEUhkCwVaQByQWHRgyJYFHOJhcf+V2Ne3vUwrDhHsjaxXjfLvoMda6xALk yIl3w7HP+zIBfKAseJmrZ2yBsmTmevEDCIqvzxZQ5PqHDA4GdCR8/S6t0byy3+ayfYYc c8LD6hJhh/DF38veMckKNKhhFn2zCxYaYs/11+VHNgSycwZUF4/tZZffg3gpWkJd/j6p 43XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Nz5DCDDh; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w11si8413707eji.160.2019.10.08.03.45.12; Tue, 08 Oct 2019 03:45:36 -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 header.i=@chromium.org header.s=google header.b=Nz5DCDDh; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730316AbfJHKmZ (ORCPT + 99 others); Tue, 8 Oct 2019 06:42:25 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:43516 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729876AbfJHKmZ (ORCPT ); Tue, 8 Oct 2019 06:42:25 -0400 Received: by mail-ed1-f65.google.com with SMTP id r9so15165405edl.10 for ; Tue, 08 Oct 2019 03:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GlbSEHsat/uhnrc6ji92FO04rhx1+BWt+c9sCRWvAxU=; b=Nz5DCDDhGBHxplALcQZGaCTG5mV3Z4jpVK314QjWtvnqS7b/x79n6UlR6EKH0pSuUQ Ta/sGeucBtoOKc+GGpsFuh0ci0OIaG75nGDsmjab/9c8JpYDC99GMBB80ipOn3+cbiHW Dl8tvsmwndue4YZ60xP4Q3cHJpGZlDwOeSr0s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GlbSEHsat/uhnrc6ji92FO04rhx1+BWt+c9sCRWvAxU=; b=WWDHrtIaEQq63e3P4aSFUc87Fm0muk+pfHXS/dSdb90Q2YRleQXuYXl76gdnM+U0J6 IkElDYEB1WpWg+nVFbMkssirQWxFpwQ5OQ0ZCum2k98TodGqcuYeMjWv3UYKB8XUIUlj jBbkGcLZVCr00JkVRNSysKWxYppjdW1reFn4RRTnelmQRUVYUDma6MVN/qCJ5fHO1zxr 5Wq3G4hC7rAiQRNenuzW3evIuOjGIuJEyV3Bxl8T++GDmcafL4jgexRsTVNKJEnSs0WR FaMkDLlrZch2zgfJ90y1uLzcIpEnRNdNX3b/zDNwzCb+VmOryESbjQZPuBsTiPgRn9BE hkNg== X-Gm-Message-State: APjAAAURqhzvK7qVnJT3q7dfrIuHjexMkuLAlyPgGg3qJ8aXkStn0iFU l9R/Zmo2XHs5x1A0KCEwr1qobR88RA+jwA== X-Received: by 2002:a50:cd1a:: with SMTP id z26mr32597649edi.75.1570531343157; Tue, 08 Oct 2019 03:42:23 -0700 (PDT) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com. [209.85.221.51]) by smtp.gmail.com with ESMTPSA id 36sm4002246edz.92.2019.10.08.03.42.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Oct 2019 03:42:21 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id n14so18754821wrw.9 for ; Tue, 08 Oct 2019 03:42:20 -0700 (PDT) X-Received: by 2002:a5d:4b47:: with SMTP id w7mr20090970wrs.7.1570531340404; Tue, 08 Oct 2019 03:42:20 -0700 (PDT) MIME-Version: 1.0 References: <20191007174505.10681-1-ezequiel@collabora.com> <20191007174505.10681-3-ezequiel@collabora.com> In-Reply-To: From: Tomasz Figa Date: Tue, 8 Oct 2019 19:42:09 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 for 5.4 2/4] media: hantro: Fix H264 max frmsize supported on RK3288 To: Jonas Karlman Cc: Ezequiel Garcia , Linux Media Mailing List , "kernel@collabora.com" , Nicolas Dufresne , "open list:ARM/Rockchip SoC..." , Heiko Stuebner , Philipp Zabel , Boris Brezillon , Alexandre Courbot , "fbuergisser@chromium.org" , Linux Kernel Mailing List , Douglas Anderson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 8, 2019 at 3:31 PM Jonas Karlman wrote: > > On 2019-10-08 07:27, Tomasz Figa wrote: > > Hi Ezequiel, Jonas, > > > > On Tue, Oct 8, 2019 at 2:46 AM Ezequiel Garcia wrote: > >> From: Jonas Karlman > >> > >> TRM specify supported image size 48x48 to 4096x2304 at step size 16 pixels, > >> change frmsize max_width/max_height to match TRM. > >> > >> Fixes: 760327930e10 ("media: hantro: Enable H264 decoding on rk3288") > >> Signed-off-by: Jonas Karlman > >> --- > >> v2: > >> * No changes. > >> > >> drivers/staging/media/hantro/rk3288_vpu_hw.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/staging/media/hantro/rk3288_vpu_hw.c b/drivers/staging/media/hantro/rk3288_vpu_hw.c > >> index 6bfcc47d1e58..ebb017b8a334 100644 > >> --- a/drivers/staging/media/hantro/rk3288_vpu_hw.c > >> +++ b/drivers/staging/media/hantro/rk3288_vpu_hw.c > >> @@ -67,10 +67,10 @@ static const struct hantro_fmt rk3288_vpu_dec_fmts[] = { > >> .max_depth = 2, > >> .frmsize = { > >> .min_width = 48, > >> - .max_width = 3840, > >> + .max_width = 4096, > >> .step_width = H264_MB_DIM, > >> .min_height = 48, > >> - .max_height = 2160, > >> + .max_height = 2304, > > This doesn't match the datasheet I have, which is RK3288 Datasheet Rev > > 1.4 and which has the values as in current code. What's the one you > > got the values from? > > The RK3288 TRM vcodec chapter from [1], unknown revision and date, lists 48x48 to 4096x2304 step size 16 pixels under 25.5.1 H.264 decoder. > > I can also confirm that one of my test samples (PUPPIES BATH IN 4K) is 4096x2304 and can be decoded after this patch. > However the decoding speed is not optimal at 400Mhz, if I recall correctly you need to set the VPU1 clock to 600Mhz for 4K decoding on RK3288. > > I am not sure if I should include a v2 of this patch in my v2 series, as-is this patch do not apply on master (H264_MB_DIM has changed to MB_DIM in master). > > [1] http://www.t-firefly.com/download/firefly-rk3288/docs/TRM/rk3288-chapter-25-video-encoder-decoder-unit-(vcodec).pdf I checked the RK3288 TRM V1.1 too and it refers to 3840x2160@24fps as the maximum. As for performance, we've actually been getting around 33 fps at 400 MHz with 3840x2160 on our devices (the old RK3288 Asus Chromebook Flip). I guess we might want to check that with Hantro. Best regards, Tomasz