Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2464959pxj; Sat, 19 Jun 2021 13:11:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysFJ7bwVcDDXVcyZQ/kcmDTEch+wg/Yo8hig5WKd57XsNgB3YUm0tZOtNmlmqhtD8D6a1T X-Received: by 2002:a17:907:9620:: with SMTP id gb32mr16923490ejc.127.1624133503554; Sat, 19 Jun 2021 13:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624133503; cv=none; d=google.com; s=arc-20160816; b=CZimuDvfSz7++unO335jIvc7Ba2l4O4KyrEQVTEnHZ95mLNEOE2HwF9GYfX+7PV6aw g+nIcOQgjsaZu6K28Kb5E++zTmb8aXO6jR05qfXPDkp4zqWk4Mz2S8N2qWi/gB1ZiPg+ gTfwrnKjkeZVPXn9mKnF7fmpS/xGHuwfnRFLAb7VjAkE4cIZaIb0g0FMxT0ItWS3+1V+ 8Cm1hrtMTc2CjIoWmMzhdL9gf+s35OdcPZHK4s8WzALZfNpEFOAxH2tEGur4ufC2I9Qn i2SL6PkduYEqTWR3eKc9K5QCkX9pha0HX6RsN+0TQ7GJslTfsH2QjGy7PBt33RAIt8UF 4mKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=Q/juTnKCxiBQQdyEvtKPoStE1ioIgeHfyaGfZObCiA0=; b=nIc1qwpS4i8QIKb1dLMzHIWgT1mUchwA04QsmDqfkt0lESsCFatjjlukNyzAAnX+na iuA+4ln4dXhCKn/rnUU/7KLio3aX3IDVmzxXK82f3Rp7rasFgtV1YsNAjLae4AHpJTVd Fub3wlAvpiABM0TCfz50yzqLKOnYLxM2xScZ8Lj1sebM/bJkzpzH3z3hAxBBP1Bvz3i3 yjDtKhh2mqidYhPEK5AVVSDV/GKuDovtLZYNvY7dNyzOYwhMcuanu1hAVPsiJ5STwZNZ Vqi12CzR9KeeiYv9ekPBS5DK3ayHF7HT3qCCR1oXrK2iU2zVPKOVEwNC7AORmZ4S1Lek g3vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=PkwR1nRX; 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 d21si5895642eds.188.2021.06.19.13.11.20; Sat, 19 Jun 2021 13:11:43 -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=@mg.codeaurora.org header.s=smtp header.b=PkwR1nRX; 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 S233700AbhFSFyz (ORCPT + 99 others); Sat, 19 Jun 2021 01:54:55 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:61053 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231952AbhFSFyy (ORCPT ); Sat, 19 Jun 2021 01:54:54 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1624081964; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=Q/juTnKCxiBQQdyEvtKPoStE1ioIgeHfyaGfZObCiA0=; b=PkwR1nRX3GpWHfgqJ0TMqA6Zr9v4dlQXvirWX9jlzTBCwlkJPdE/n8hFesH0Thv3EjkKyfaX Pgf090F3T7pQIIldPIYfwepvzoPvUX1tbE/jUaKmp8Oo6YBV6dn7H3hXYJ858+G7X6nkgsWK /KktbHVt77WtY6JrpR8m63woaw4= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 60cd862b51f29e6bae2a4dcb (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sat, 19 Jun 2021 05:52:43 GMT Sender: vgarodia=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 67CC7C433F1; Sat, 19 Jun 2021 05:52:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: vgarodia) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9061CC433D3; Sat, 19 Jun 2021 05:52:41 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sat, 19 Jun 2021 11:22:41 +0530 From: vgarodia@codeaurora.org To: Bryan O'Donoghue Cc: mansur@codeaurora.org, Stanimir Varbanov , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dikshita@codeaurora.org Subject: Re: [PATCH] venus: helper: do not set constrained format for UBWC In-Reply-To: <28ab2706-2a0c-e9d6-c02c-8ede6fa01efb@linaro.org> References: <1622195288-18541-1-git-send-email-mansur@codeaurora.org> <17aaec56-bfad-63a6-b1c4-7562dedb3137@linaro.org> <28ab2706-2a0c-e9d6-c02c-8ede6fa01efb@linaro.org> Message-ID: <05db22230b573c47376c95b624dcf23c@codeaurora.org> X-Sender: vgarodia@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bryan, On 2021-06-14 17:26, Bryan O'Donoghue wrote: > On 14/06/2021 07:25, mansur@codeaurora.org wrote: >> On 2021-06-02 15:23, Stanimir Varbanov wrote: >>> Mansur, could you answer to Bryan's comments? >>> >>>> On 5/28/21 8:23 PM, Bryan O'Donoghue wrote: >>>>> On 28/05/2021 10:48, Mansur Alisha Shaik wrote: >>>>>> Do not set constrained format explicitly for UBWC >>>>>> >>>>>> Signed-off-by: Mansur Alisha Shaik >>>>> >>>>> Could you give a little bit more detail on why, what the side >>>>> effects are ? >>>>> >>     Sorry for late response, by default for NV12_UBWC is 128x32 >> > > Right so we have > > pconstraint.plane_format[0].stride_multiples = 128; > pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32; > > and > > pconstraint.plane_format[1].stride_multiples = 128; > pconstraint.plane_format[1].min_plane_buffer_height_multiple = 16; > > and your patch says if opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC then the > we shouldn't do hfi_session_set_property() > > I'm sure that's a fix that works but, I wonder would it be possible to > fix this routine to continue to do hfi_session_set_property() with > updated parameters for opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC ? Venus hardware would always go with alignments as 128x32 for WxH irrespective of color formats. It happened so (historically) that for NV12 (linear) format, usecase started demanding for alignments as 256(interlace) and 512(HEIF), and hence NV12 was defaulted to align as 512x512 in firmware. This was done to avoid carrying multiple alignments for different usecases, since aligning with 512x512 would also align it with 128x32 and 256x256 as well. For UBWC, there is no need to override the default alignment of 128x32, hence the api was added to override default alignments for applicable formats, in this case NV12(Linear). > Could you drill down into the detail in the commit log a little bit > maybe giving a description of why returning for opb_fmt == > HFI_COLOR_FORMAT_NV12_UBWC is the right thing to-do instead of adding > a new case to the routine for HFI_COLOR_FORMAT_NV12_UBWC and calling > hfi_session_set_property() ? Above details should provide info on the need to set this only for NV12 (linear) and skip for NV12 (UBWC). > Its more for my own education on this topic :) but, also helps > somebody else reading the log to understand what the fix is, why it is > done this way. > >>>>> Should this be a Fixes: ? >>>>> >>     without this fix on V6, firmware throws below SFR >>     qcom-venus aa00000.video-codec: SFR message from FW: >> QC_IMAGE_VERSION_STRING=video-firmware.1.0-df9cb37cf8e507a4468265658702247652351a49 >>     Err_Fatal - >> /local/mnt/workspace/pkg/builds/dynamic_timely/tree2/vendor/qcom/proprietary/video-firmware-noship/venus_proc/venus/decoders/common/src/video_decoder.c:6644:2fef3 >>     which result in playback happens through Software codec. > OK, I think I can answer my own question here. > > Technically no since 6XX isn't in the long-term-support kernel but, > I'd suggest adding a "Fixes" anyway, so that other users know to apply > this patch to their trees. > > Fixes: bc28936bbba9 ("media: venus: helpers, hfi, vdec: Set actual > plane constraints to FW") Yes, it should go as "Fixes" tag to above patch which we made for 6xx recently. Thanks, Vikash