Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2204851pxb; Fri, 8 Oct 2021 03:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW0cnv7AFd7Cl/aSfDkfnDgudxglY1AePkQE2dEPOe6yf+q8n/wmFSsqbSIYc2Che7g2yJ X-Received: by 2002:a17:907:9908:: with SMTP id ka8mr3270449ejc.164.1633687811580; Fri, 08 Oct 2021 03:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633687811; cv=none; d=google.com; s=arc-20160816; b=B77HamQ4F9HsR+LpRGO0CzH0LqycyGClEuWj9gMKKsXvAQ5iFtuppgjfDFGOxqBnKr IbAnkdRdo4jUBmD6v4K7FZUtEm02AdAgiqQaX/2S/6zF4+UDZ/AWhKG61Zz8KOErpC9x 8GqZNDeQb3ZBePXHl1d8gLUrdyqBvNeK33VIzZStaFL5SfLAPAI1aaWx3D5cSlWtigbU x8Nw74N/n/18oHV93agSZaqLtQ/DL2yelWM9RXXv8sKI4lYy+B25jaK7IahqJxY6u0eZ CL7CVDIXrjO9ZJHril//V8fSV42dPrX+VsYrXCOEtd6mAvx8RdEKvQMV1Kjiy4g23svJ 32cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OzoTpc5FXnHcSloTlGi/7AXCgf7dBEC1jkxAe77KXeE=; b=ReafMjNBTnXqpo7haqA05REZBSDyL2zudLxyMJ+FQg0lMyKgw9bbM7P5cxjaOy8ZDk YsIyg98Xfj1ISqJIgsUVHM9LdGSZljzy1JKVyyTzDs1fZ9rN6fbiTtdDWvaMS1HMPcTv 0e+WqZdKqiLllDpAmC+wXC7Syp2F/wNqjAVhUAgUmUc0gccOfiZ52c6MEYWubtczTa57 6qbSMxiJrPvWe/uoOgCPvhpXuRVoFHhp5NOtdZ21z2Xv9drcekfjybriDOMTDyaOaEwI 6jUkDIrw/VXYQFIYOpAixaNplkWWdalQEp7nryBjK8Juh/oqp9Xr1lUTyzPId0p6CM7L ovPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LpauymSN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si2973597ejd.538.2021.10.08.03.09.47; Fri, 08 Oct 2021 03:10:11 -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=@chromium.org header.s=google header.b=LpauymSN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239390AbhJHKID (ORCPT + 99 others); Fri, 8 Oct 2021 06:08:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238955AbhJHKIC (ORCPT ); Fri, 8 Oct 2021 06:08:02 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C05DCC061755 for ; Fri, 8 Oct 2021 03:06:07 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id oa12-20020a17090b1bcc00b0019f715462a8so7400285pjb.3 for ; Fri, 08 Oct 2021 03:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OzoTpc5FXnHcSloTlGi/7AXCgf7dBEC1jkxAe77KXeE=; b=LpauymSNX9w1tBNgyes0/5NF8kSaIGg2a8v9QUXm3LfmX6BZi2lrszHYLztN3+N9IQ Y6qkh4YrIAzDiF4g9Tr8AKSLLK/UP94QF5qqqZWmTKRwS60+cdl4GdvAzoWSNlScmDbg gK9gsL5va9SYEExcIy1UcpTF84Ay4Kx0pzZrg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OzoTpc5FXnHcSloTlGi/7AXCgf7dBEC1jkxAe77KXeE=; b=5rCnJt52k4ecm+0m08eQJMVn2dM/BwyrB1MEJHYplCESMS1tPQYXzxOQ2ujXqnHHqm 3uYVqOvjb1v6Dz31EpRP5ecY7yaqniRFe+PcNy0YlpZZw7YoNHmdhPfU3/wKq7pH8A58 +4STjO+fIKvNbDtF5DleiUdzaFT8qHbKMJ3AugJL1YQWQ0Y+U0MBPMOuVtig5JRwXDOC WUSws6eTMEO2qiEIVVyBw15a53hklhjOAiOzA+p3n1R6HhNHpFJ/jMlUJgSGB+40Cdw4 IpKA20sTrspW75egslFTjOMYe33O97yCXHthicJsN6maKmbPDQ3c+NKL4NQsLQ40Zj9v /tyw== X-Gm-Message-State: AOAM531K/G7lOhyc9sywmnwnXWrnHKyCjePGFIiI9zMvxlxrRQENIL5P a6gEqqQUZO09fYj6syYHVow14g== X-Received: by 2002:a17:902:7ec8:b0:13b:9d7a:6396 with SMTP id p8-20020a1709027ec800b0013b9d7a6396mr8603898plb.86.1633687567030; Fri, 08 Oct 2021 03:06:07 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:ad8d:f936:2048:d735]) by smtp.gmail.com with ESMTPSA id a7sm2082255pfn.150.2021.10.08.03.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 03:06:06 -0700 (PDT) From: Chen-Yu Tsai To: Ezequiel Garcia , Mauro Carvalho Chehab Cc: Chen-Yu Tsai , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Andrzej Pietrasiewicz Subject: [PATCH 0/2] media: rkvdec: Align decoder behavior with Hantro and Cedrus Date: Fri, 8 Oct 2021 18:04:21 +0800 Message-Id: <20211008100423.739462-1-wenst@chromium.org> X-Mailer: git-send-email 2.33.0.882.g93a45727a2-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everyone, While working on the rkvdec H.264 decoder for ChromeOS, I noticed some behavioral differences compared to Hantro and Cedrus: 1. The driver always overrides the sizeimage setting given by userspace for the output format. This results in insufficient buffer space when running the ChromeOS video_decode_accelerator_tests test program, likely due to a small initial resolution followed by dynamic resolution change. 2. Doesn't support dynamic resolution change. This small series fixes both and aligns the behavior with the other two stateless decoder drivers. This was tested on the downstream ChromeOS 5.10 kernel with ChromeOS. Also compiled tested on mainline but I don't have any other RK3399 devices set up to test video stuff, so testing would be very much appreciated. Also, I'm not sure if user applications are required to check the value of sizeimage upon S_FMT return. If the value is different or too small, what can the application do besides fail? AFAICT it can't split the data of one frame (or slice) between different buffers. Andrzej, I believe the second patch would conflict with your VP9 series. Regards ChenYu Chen-Yu Tsai (2): media: rkvdec: Do not override sizeimage for output format media: rkvdec: Support dynamic resolution changes drivers/staging/media/rkvdec/rkvdec-h264.c | 5 +-- drivers/staging/media/rkvdec/rkvdec.c | 40 +++++++++++----------- 2 files changed, 23 insertions(+), 22 deletions(-) -- 2.33.0.882.g93a45727a2-goog