Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3508036pxb; Wed, 13 Oct 2021 07:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuYqx9rE+sea2IIi1HCKRoppBvMv0t9ISGk5XrtozpRDPBA31PQXf6xtxWW85ricOgYnFk X-Received: by 2002:a17:90b:354:: with SMTP id fh20mr13900862pjb.188.1634135114242; Wed, 13 Oct 2021 07:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634135114; cv=none; d=google.com; s=arc-20160816; b=Ql944sZ7bDROfOgOZEvfROi0vnKVqSl/8IKF7kzFTmBX5IVHE1TQ/gyHd3NwrwA63V FFaKlKW5GZlkaDgIm5lr78+Itsj4OKQwnz3b0vOiG2KDTPNAdYL9rwd1C7gchrKlNIJA 4rzy6Uj67iHJANQ9k2OHhWHibTByL5Tbb/m6qtE8IhRAyOIeVAYZlpiUIwYh1rluzlZG fHQA/lRzU4vM7y3wuGhW/COWayfUb6qYLkFxRaeXdJeQF9XJkci3/4pZ5b7Ic1fZxgyc rkse5ldNYl7POi8oQhJmqSvtablg4uLgKnuVOY7bTcE2DNZvb7U2rv/Vfx1nHwFDRKsj Zmzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7w/SpwqUg1NtXlESs19PovhWHJiT5rNlJWgKAzuzlAE=; b=efO8MM6KfZPAtDETPUHc9do8JtZYNJfT33YdsIFs9aPTgR7RnMEzx/QqgcL2amb6mm OlQsxpF8WsH2X9oqCt6Bt3y0x3rqo12QM0QwacNIMhLDAlG/0UhxI2fVu9VS505E2g/n 9IqjC7UinQJ9ULM0vg/wEPwpIT1a78MtpMPQs9SFc9Nzgkq5Qfw30aNiQuYdwUYcuIC+ V/3WDHjrtdbVIkWTtVIztd3wVbhqlIB/GSeefpgjz/5yb4Ml2tYpYDuiy98GGT0Wwrly 2V+/BMQKiHdi1Dax65BFPMqN2Bd5n/04DE6yPyfGjnoPeI0cqhPXCcaDUO6ggCEOOwvZ ruCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20210112.gappssmtp.com header.s=20210112 header.b="NXN3/6op"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p10si7769299pjr.142.2021.10.13.07.24.59; Wed, 13 Oct 2021 07:25:14 -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=@vanguardiasur-com-ar.20210112.gappssmtp.com header.s=20210112 header.b="NXN3/6op"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237036AbhJMOZ3 (ORCPT + 99 others); Wed, 13 Oct 2021 10:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235899AbhJMOZW (ORCPT ); Wed, 13 Oct 2021 10:25:22 -0400 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 270A4C061746 for ; Wed, 13 Oct 2021 07:23:17 -0700 (PDT) Received: by mail-ua1-x92e.google.com with SMTP id f3so4821355uap.6 for ; Wed, 13 Oct 2021 07:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7w/SpwqUg1NtXlESs19PovhWHJiT5rNlJWgKAzuzlAE=; b=NXN3/6opbxMONUbmwhMTGJ45Wx47wxNTSTy8tiZ9DEIwTDESJrVNdX3Ebsqu+YcY6M D0gmdJ0nCNdGbmaNxXCMbvk3Kk1gkte52sQG2mM9czGZejuGOUgWpz60bd7Rs7OLIicG a3I8ARXHglmgKNd+4AB/JAQi4+1GPYohAzugS953pzmSHoOKXqjbmsTHEenoc4XJr91J cCPmlhJaFaMZD3T5b3CoV8/bu3jWISwQhGhRc5zi4dBudCBs+efvkphULFwtNhrgA2Jx muPKfNAzyCGOmCyvzG0tTgYeBcMycflCLzXfCHRm9SsMsGbjvwLB7sFlDqJAZ6EdMk92 dAuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7w/SpwqUg1NtXlESs19PovhWHJiT5rNlJWgKAzuzlAE=; b=gbVpIJKylup8WBP09aOrZrcRqFggNYHggr5Q39kBAQV/SznnQ18UvEO1IvvQ84jqpS Vbgrs/oCoipUYorlH15VYgVTjm24J+GC7z1vR3lclD8soM/EAPogEV7qeA8nzxSATZSy PuWLJQbHkjbuO6IudOfej4YrPODxJV2z3suaLeba4RnyWdkAfNTSLa2E4qWavWEtcFDk vkGVc9Iua2nhlYpceRu3NsvvO3HkSqG46sSF5dSdoQ4eN5Z4o0Bf2zRJmYME6Dew4b42 90PhR2scRxM9a2RJdf6uGfmmFV+BGxXOa5gAuivcx4/6Kq8XedtxeZA62DXAeZNt5i3Q d5Ew== X-Gm-Message-State: AOAM533uuOG9SzFH8h4QgnAYEgTCWPPrdo4R+AOyLCsm2XJNgFqNsAsF lU10VbkEyx4Cb0QoJhdDcS/E9A== X-Received: by 2002:a67:d189:: with SMTP id w9mr38724521vsi.55.1634134996280; Wed, 13 Oct 2021 07:23:16 -0700 (PDT) Received: from fedora ([196.32.91.248]) by smtp.gmail.com with ESMTPSA id q26sm6243875vkn.40.2021.10.13.07.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 07:23:15 -0700 (PDT) Date: Wed, 13 Oct 2021 11:23:11 -0300 From: Ezequiel Garcia To: Chen-Yu Tsai Cc: Mauro Carvalho Chehab , 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 , stable@vger.kernel.org Subject: Re: [PATCH 1/2] media: rkvdec: Do not override sizeimage for output format Message-ID: References: <20211008100423.739462-1-wenst@chromium.org> <20211008100423.739462-2-wenst@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211008100423.739462-2-wenst@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chen-Yu, On Fri, Oct 08, 2021 at 06:04:22PM +0800, Chen-Yu Tsai wrote: > The rkvdec H.264 decoder currently overrides sizeimage for the output > format. This causes issues when userspace requires and requests a larger > buffer, but ends up with one of insufficient size. > > Instead, only provide a default size if none was requested. This fixes > the video_decode_accelerator_tests from Chromium failing on the first > frame due to insufficient buffer space. It also aligns the behavior > of the rkvdec driver with the Hantro and Cedrus drivers. > > Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver") > Cc: > Signed-off-by: Chen-Yu Tsai Reviewed-by: Ezequiel Garcia Thanks for taking care of this! Ezequiel > --- > drivers/staging/media/rkvdec/rkvdec-h264.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c > index 76e97cbe2512..951e19231da2 100644 > --- a/drivers/staging/media/rkvdec/rkvdec-h264.c > +++ b/drivers/staging/media/rkvdec/rkvdec-h264.c > @@ -1015,8 +1015,9 @@ static int rkvdec_h264_adjust_fmt(struct rkvdec_ctx *ctx, > struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp; > > fmt->num_planes = 1; > - fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height * > - RKVDEC_H264_MAX_DEPTH_IN_BYTES; > + if (!fmt->plane_fmt[0].sizeimage) > + fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height * > + RKVDEC_H264_MAX_DEPTH_IN_BYTES; > return 0; > } > > -- > 2.33.0.882.g93a45727a2-goog >