From patchwork Thu May 4 08:00:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 89957 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp133038vqo; Thu, 4 May 2023 01:03:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6l/ru1xL2eG1Z/gEcI75KtLEycB4g/sgXL4OG7gY1dHiI0C0/dG4Fu07/2iQDC3i9KyUT0 X-Received: by 2002:a17:90a:602:b0:24d:d377:d1 with SMTP id j2-20020a17090a060200b0024dd37700d1mr1333949pjj.45.1683187419987; Thu, 04 May 2023 01:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683187419; cv=none; d=google.com; s=arc-20160816; b=EUmRgp4nXBBVYpAPja3SnsC4wXZf+S36omddj+RcdEdyo+Fz0uwiX6/K+5NWBXEWGi tfddf/I4EVw7+5sCYdUHP3ekwTe3RGJTjGjt3NEvH3gzVUeY49CjJEik45zM7Fd7ai/T Uds+lvxrFUh0Bxl4ykz1dirgrgpImB9iZHbwYGaLQz9nXsoPxxWOC0w1oxWMpR/b4k6q fisbh+rh+e+iqoDEhbas23phQQIV22s+Tesu1DICB4znUbmGzndrEyGyg1NgMgipwCHI M4fbG8nGB0wSgvgwW6TAVfgwXWAnJU1ICSLZnHYJoYaGawLVXoCcqkbBYWHA5ElPnysq V0mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=C1wrHdE9iKrmB/WxNypIy4J2UJNGNaaQcU0qAUemPII=; b=qRVEF2TbONpaZMa3rGOGAFFmXHZgFMA8o23LK3tACTu2cw5dOjtqxKNTrhokSOwD2V 8TMfj0mi995sTB02+tol2+kopRlK30ca6/Uvde2N094Mamx5nMPQ6jadiGL9nfluBDin 5tmRMsK0LvNn0VIfezDDyBjVB/jtMvsXCbE8RSbdCxuicLqNwDUDA4TYcx3+QfywAOdB xz/eQB0pzRHm1HFQdsYO2oHllFfuzgc5wTST+XLMT4bs9DbMnMsPfwHQTMWGyIwf8OJs SgMgSnYncyGpZ8csxemgtGwMTQ9zL9yfo2JurUXy4j8dwjfOBFv3sYtEJaiTSup/79E5 LvWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WDHW2yNA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l66-20020a633e45000000b005250c24fa2esi2904239pga.428.2023.05.04.01.03.25; Thu, 04 May 2023 01:03:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WDHW2yNA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbjEDIBt (ORCPT + 99 others); Thu, 4 May 2023 04:01:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbjEDIBe (ORCPT ); Thu, 4 May 2023 04:01:34 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E9D53C19 for ; Thu, 4 May 2023 01:01:32 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2ac78bb48eeso2064061fa.1 for ; Thu, 04 May 2023 01:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683187290; x=1685779290; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=C1wrHdE9iKrmB/WxNypIy4J2UJNGNaaQcU0qAUemPII=; b=WDHW2yNAhW01kMfJX7yGsyy6Gm+EE6cCAyf/9TIZh/Xbpz6NeleG58b44v9i/qahSH EAs8+5YKk3uDuzqKIaNKUciaZ7kbWStZMrVSsK3t1IMJ86+PZGfrqNfJ8Ha/uP2O6CoE 3kVdb/6t4Mhaq0ippPDLk+I7PXd5NfJ6AzHy5jvkgSk5gC0+3zsOY44DlPi0W0BjGf7B gsCAoWrwF+kqT5H2mroGxqsnJ4Y+HI1WYWBCJD6c34ATI3Drqx4KscXdGSqn+iO0MK3b TEnwILA4FXpR5Dr5pyNomkfuYmBShqEbSjsmqUbjiFATvdZE/VGg51cWp1R/HAKIKyrw 8z7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683187290; x=1685779290; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C1wrHdE9iKrmB/WxNypIy4J2UJNGNaaQcU0qAUemPII=; b=kfA9LZigX+ljTHOOvRQP/LYONxuwRgIWdPMkeJHNrMoXxTMb2uswF01W2mxbBqeLLw tkNMElEZI/qGe3R2ClXENzin2k62J/vQX4or9gYsfFfCvHR0oZMyCc6ANUT2+e+G3I5Z 4dr9vyrKOp5usj8HjYQ5nRi+2mCsKv/z2jKlwig9rRiVKec9U26MjPLpboQ9O/UBTTyo a/L3xJI5RI9Lsec1DWh1GXzgl3h73D7eyaoS0VqlXMl1S5EZrSOAkH2knHoVFu5B9aV9 k7db8XwlDCccTxn0PEUDUXEYT/vfOpZuVyDk6CYA/8dEx9+N2fO4mzg8jzjYCMtq9vzp qwog== X-Gm-Message-State: AC+VfDzUVWt0S9dmhuNx5bTAWDcGLf6eprOhdve25fTh7KISq7Hbbiv/ XHVuuppa2jeDkkL0x96k6cM3ow== X-Received: by 2002:a05:651c:201:b0:2a8:e4d3:11e2 with SMTP id y1-20020a05651c020100b002a8e4d311e2mr711499ljn.39.1683187290499; Thu, 04 May 2023 01:01:30 -0700 (PDT) Received: from [192.168.1.101] (abyl248.neoplus.adsl.tpnet.pl. [83.9.31.248]) by smtp.gmail.com with ESMTPSA id n26-20020ac2491a000000b004edc512515fsm917165lfi.47.2023.05.04.01.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 01:01:30 -0700 (PDT) From: Konrad Dybcio Date: Thu, 04 May 2023 10:00:59 +0200 Subject: [PATCH v2 03/18] media: venus: Remap bufreq fields on HFI6XX MIME-Version: 1.0 Message-Id: <20230228-topic-venus-v2-3-d95d14949c79@linaro.org> References: <20230228-topic-venus-v2-0-d95d14949c79@linaro.org> In-Reply-To: <20230228-topic-venus-v2-0-d95d14949c79@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , Bryan O'Donoghue , Mansur Alisha Shaik , Jonathan Marek , Hans Verkuil , Dikshita Agarwal Cc: Mauro Carvalho Chehab , Stanimir Varbanov , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Marijn Suijten , Konrad Dybcio , Vikash Garodia , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1683187284; l=1455; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Y7O3kXJUMALOc0Q0JhoHuikwOvvLDtLGeWfKw337F/E=; b=jCZB3nnLtzrwBc/9nUK3HW69Wl7+UodaZZct6VGWvDO/jIlFm2QK2OjGO7+uIAfMRHFqyHcBt DsDW6iF+tIQDZ5vspOGLVJfq/1AzMQT9Pm7VLtQPpb7Nd3CdmnqIeSo X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764949932206345079?= X-GMAIL-MSGID: =?utf-8?q?1764949932206345079?= Similarly to HFI4XX, the fields are remapped on 6XX as well. Fix it. Cc: stable@vger.kernel.org # v5.12+ Fixes: 7ed9e0b3393c ("media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations") Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/hfi_helper.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index 105792a68060..e0c8f15644df 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -1170,11 +1170,14 @@ struct hfi_buffer_display_hold_count_actual { /* HFI 4XX reorder the fields, use these macros */ #define HFI_BUFREQ_HOLD_COUNT(bufreq, ver) \ - ((ver) == HFI_VERSION_4XX ? 0 : (bufreq)->hold_count) + ((ver) == HFI_VERSION_4XX || (ver) == HFI_VERSION_6XX \ + ? 0 : (bufreq)->hold_count) #define HFI_BUFREQ_COUNT_MIN(bufreq, ver) \ - ((ver) == HFI_VERSION_4XX ? (bufreq)->hold_count : (bufreq)->count_min) + ((ver) == HFI_VERSION_4XX || (ver) == HFI_VERSION_6XX \ + ? (bufreq)->hold_count : (bufreq)->count_min) #define HFI_BUFREQ_COUNT_MIN_HOST(bufreq, ver) \ - ((ver) == HFI_VERSION_4XX ? (bufreq)->count_min : 0) + ((ver) == HFI_VERSION_4XX || (ver) == HFI_VERSION_6XX \ + ? (bufreq)->count_min : 0) struct hfi_buffer_requirements { u32 type;