Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4981065imm; Tue, 9 Oct 2018 08:02:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV62S0St5orWzhwOihA9e8L1uleeh+wCwqnvrsv0OEcyasUfxemRlY7SHXJiG/pWmasOmFnUO X-Received: by 2002:a17:902:744c:: with SMTP id e12-v6mr29211204plt.186.1539097335044; Tue, 09 Oct 2018 08:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539097335; cv=none; d=google.com; s=arc-20160816; b=O9+emVkCyNnAIJRet2Z315hl5StmYaM6lD3bgEQUWDZ8YYT8I6cje8bawLWhMeNnPV 7aJ8oL6AtRtm+jL7Yrbwu0NAWcRB2VEesiEhu85APkos0uc/0Iu9hyjgJVPfHCJfwgsC xX/32jnBpU9nIO5LSbJysBj/KI3i398fgSj4akUXvf8MrdNEkWe3CiPxLafLuav2fjXp ydGF1N5Z+zxudMiqHS/HRjoVZLbFpjj5G7hvokmOFE2zYwKTvliGSOTovJlKEun4cCuZ bVi/DQiOQeFblqjmMyDGr7jkqa6ez3dSI/Z89SiRUzX4gNUH6WX4S7ylo8NROJyl26ZF RX3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=SKj0ZuycNvOvT4s4ibetnrVfziqaGTZUcC3TCC0KSPU=; b=fQB+jwtH0KfBBxgVtPpRq6kBNaPhquC6+3WHyZezJW/cCVvddvz5euD40F+VQUsP51 1zvUtPG5WTNKYswkOpT7B9yPEFAuz8Dji2gzVER5BsIRwRCJffzoZQLo6hNSepGAkk/m P61+9Rx4fE9kfnmEE8tmimeAd6sgt+z9qZsa0UR+evmANjAWOpH6Y8uI+5IY/hYocqFY QXYOugVLcd76aOfX/MP5l1oYIjmrwTjMJb3B6/4rMRJxbP1Chm+k99aWm5NKIbvO7DiX f0CtCaMQN4CPyx3JVUVWDlrDVepe6X1eF+ed8fXnUp4fPlU7VLEldoxBu/OuzAxlVaR9 j1uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YsF59rb4; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l70-v6si20744794pga.498.2018.10.09.08.01.56; Tue, 09 Oct 2018 08:02:15 -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=@linaro.org header.s=google header.b=YsF59rb4; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727042AbeJIWRV (ORCPT + 99 others); Tue, 9 Oct 2018 18:17:21 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55976 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbeJIWRU (ORCPT ); Tue, 9 Oct 2018 18:17:20 -0400 Received: by mail-wm1-f66.google.com with SMTP id 206-v6so2214795wmb.5 for ; Tue, 09 Oct 2018 08:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SKj0ZuycNvOvT4s4ibetnrVfziqaGTZUcC3TCC0KSPU=; b=YsF59rb4Otvvuwskl0D2pk88qOvRQJO4vIidUsxYWmZRM9CdlwxQWxeyd7P9d+Vr2K O4EXUwesCk2+v7sBZUAJXw8SyrmDKrRgmP8bapAXbM/dfYTNUkups46lfAFIk7AA90Xm La1TMIMaGD2aT+rQZaBLwfpePJIbIBY7gAiCU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SKj0ZuycNvOvT4s4ibetnrVfziqaGTZUcC3TCC0KSPU=; b=BKokFZh+QALFs1RWp/ynKFDz/U4Pkn5791NHtmUac7Z9Tb9uunUUssZHaDmtqi/GBb tK0Kj8OikRPUDrtVng/RAPK+kMLlCnjV+bgne75bkThRijhRlHGmvuB7ci4FVyUwAL/1 c6tQMxeS9Ae9uP1VmWhFtGiWuh1ZR4QT3uAyEQ9qrIy7TGdt6IAIh0fZCpibltW8AcUa P/8Yk051uVmBibiuYOc+j28YRrR4Q/tpZMmzzkJx48/gMgOkoE4SoWQoBzM5VgeZSJMh OMQ/7K/xQOad/PHYtEdmzyPsb1o3Al2u1cwBMj88yxwkTBEuoqpXG4BXCxT0J8YBJEjn mKCQ== X-Gm-Message-State: ABuFfohJ79Uig8TmsuS0N9n/nay8UmlLUmsKATS5pU/k7eS0uTzY98/o nSRbV2bRqGLju8ByMOSwgsgxzA== X-Received: by 2002:a1c:a9ce:: with SMTP id s197-v6mr2193122wme.82.1539097199395; Tue, 09 Oct 2018 07:59:59 -0700 (PDT) Received: from [192.168.27.209] ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id 143-v6sm17799936wmv.6.2018.10.09.07.59.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 07:59:58 -0700 (PDT) Subject: Re: [PATCH] media: venus: handle peak bitrate set property To: Malathi Gottam , stanimir.varbanov@linaro.org, hverkuil@xs4all.nl, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, acourbot@chromium.org, vgarodia@codeaurora.org References: <1539071483-1371-1-git-send-email-mgottam@codeaurora.org> From: Stanimir Varbanov Message-ID: <274a112a-604c-82b4-130a-c3718abcf141@linaro.org> Date: Tue, 9 Oct 2018 17:59:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1539071483-1371-1-git-send-email-mgottam@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Malathi, Thanks for the patch! On 10/09/2018 10:51 AM, Malathi Gottam wrote: > Max bitrate property is not supported for venus version 4xx. > Add a version check for the same. I'd like to avoid version checks in this layer of the driver. Could just black-list this property in pkt_session_set_property_4xx? Hint, see HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE in the same function. > > Signed-off-by: Malathi Gottam > --- > drivers/media/platform/qcom/venus/venc.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c > index ef11495..3f50cd0 100644 > --- a/drivers/media/platform/qcom/venus/venc.c > +++ b/drivers/media/platform/qcom/venus/venc.c > @@ -757,18 +757,20 @@ static int venc_set_properties(struct venus_inst *inst) > if (ret) > return ret; > > - if (!ctr->bitrate_peak) > - bitrate *= 2; > - else > - bitrate = ctr->bitrate_peak; > + if (!IS_V4(inst->core)) { > + if (!ctr->bitrate_peak) > + bitrate *= 2; > + else > + bitrate = ctr->bitrate_peak; > > - ptype = HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE; > - brate.bitrate = bitrate; > - brate.layer_id = 0; > + ptype = HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE; > + brate.bitrate = bitrate; > + brate.layer_id = 0; > > - ret = hfi_session_set_property(inst, ptype, &brate); > - if (ret) > - return ret; > + ret = hfi_session_set_property(inst, ptype, &brate); > + if (ret) > + return ret; > + } > > if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264) { > profile = venc_v4l2_to_hfi(V4L2_CID_MPEG_VIDEO_H264_PROFILE, > -- regards, Stan