Received: by 10.192.165.148 with SMTP id m20csp4732506imm; Tue, 24 Apr 2018 07:34:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx48TyPcueYOdTJlMlxhbW22FbVP/PocYQaKzJjptJKlNF6jT3KYiTjVZJi1GYnagQ9sF029v X-Received: by 2002:a17:902:b68e:: with SMTP id c14-v6mr25170540pls.286.1524580484092; Tue, 24 Apr 2018 07:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524580484; cv=none; d=google.com; s=arc-20160816; b=nE00yOGRvJV/Ug23WoBunMxIXt9R9dBHgKIliep3ASHGTP3xukHEVx1RLTeb1dC413 DDlhca7i4s/7+vNftWu3E6YoeFGWJrrp63kLKVV/P4FzLkeVZiWYm5EofEfl+mDlNhvv cQc30TOxQGrqAvbeyNOUuW8cNwBxG5Itm85g7Aq3X2RP3UHA7XZyRblukumpsawFRNaM tuRrEDxIMZA7DWiedtlgBen9nH0CQLbnyfCA4FxhU9NzsqyZ03GVQm+O4t4kfFFjPqh3 sJi4w7ZCZnc0zQVmAH+aQIdj3dqo4XummJH632kE8H1NwZekPXZdtSUeM7NFPvj2FWPO ySbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=UolRG5OvAvAIOuK0bz7bLwswjFzqGxFCL6c8QvZu3g8=; b=cArUZ7Jea+U26I2YM3/MXgms9KgebJ6RURtC9OOZZfNQwwmU41LcYOGPOK9Eh7yQlJ hreZBCh1iK1tTokeN91a4A2uVRxn8ziF4IfGBaLTAD9/3QGT7wNn2mvkNBtf3AkySgPz 7eX7lkyadJqo2si853YHveHBieMFF7XNt1GO46MhFQzXNx/vOXai6bR1g2dHCMq+U5z/ OMEaSsljJVr+HfK0/xL8A8RPnT2fcHM1Oiqhi8ZDPh5a8H/vptKlojbQd568pCoE5jGt thOLpLTK2XNjH17u4npR12T4a1DqiLUz9vzSFyBU/DnSOtgqAyUE9uR2Y7Ob1u+SOuxh mdsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aGPi7t2f; 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 o18si13919264pfa.346.2018.04.24.07.34.29; Tue, 24 Apr 2018 07:34:44 -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=aGPi7t2f; 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 S1757196AbeDXMqE (ORCPT + 99 others); Tue, 24 Apr 2018 08:46:04 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38456 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757874AbeDXMpe (ORCPT ); Tue, 24 Apr 2018 08:45:34 -0400 Received: by mail-wr0-f194.google.com with SMTP id h3-v6so49831456wrh.5 for ; Tue, 24 Apr 2018 05:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UolRG5OvAvAIOuK0bz7bLwswjFzqGxFCL6c8QvZu3g8=; b=aGPi7t2faDEcV5ALSzPvlpcgiRKW8KzTYqJuQHsv+9dIirW40HFE/dVpq+vzcDPmJC OdvfV6ChXYY6CGJXfLJkBsRlW9VH2ra6fjosz26Q4kWDXCAhCMgRUOwUAjwzmfq5ghfp lm8RJWGMf47Kzo4ZXgFYsGJgFVkine32zs+Kc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UolRG5OvAvAIOuK0bz7bLwswjFzqGxFCL6c8QvZu3g8=; b=Ywr2wFUNQ9iH5SvU7wJhyCcEKl2XLQktgRJ/rQ+uSpyW2A4xDhHQMzJ/+NftYk9Qtw ADVcS3B+8NyfIWvfDfXI+MRJt8sjnNjhCDJE1yMOe/AAqmoX9KQgj0ne7/9IOb7si56w zQBwTlO3Lf0bla9pXvxW5eRoiMTIv7HeGVhVQrhNWpvIlTboc7W1qB2IIldgq+DljKGc pPFkRC1ExrIh4yh9j3iOMdMFuHZdfrgNOiwtBbA+R/ofBh1A1PbP1QAfZexv6LiiTt3M dTsyHVW/X7ytUDhelSQ1EArWuiZGcpRdbzYU0IpR7R8vQWgdX3glPux5ii+7zQC3eP85 jipA== X-Gm-Message-State: ALQs6tDoKHCFXX5Iw3kBeRNM+xb4nXET6aCxGXc5jtVqmAGtBIWZDqSX tA/r7ceBJoOpidL3XGeEXGyvQQ== X-Received: by 2002:adf:bd89:: with SMTP id l9-v6mr18704739wrh.234.1524573933031; Tue, 24 Apr 2018 05:45:33 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n49-v6sm22666013wrn.50.2018.04.24.05.45.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:32 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Stanimir Varbanov Subject: [PATCH 24/28] venus: vdec: new function for output configuration Date: Tue, 24 Apr 2018 15:44:32 +0300 Message-Id: <20180424124436.26955-25-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180424124436.26955-1-stanimir.varbanov@linaro.org> References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make a new function vdec_output_conf() for decoder output configuration. vdec_output_conf() will set properties via HFI interface related to the output configuration, and keep vdec_set_properties() which will set properties related to decoding parameters. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 35 ++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 6ed9b7c4bd6e..ced3330c396a 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -545,6 +545,23 @@ static const struct v4l2_ioctl_ops vdec_ioctl_ops = { static int vdec_set_properties(struct venus_inst *inst) { struct vdec_controls *ctr = &inst->controls.dec; + struct hfi_enable en = { .enable = 1 }; + u32 ptype; + int ret; + + if (ctr->post_loop_deb_mode) { + ptype = HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER; + en.enable = 1; + ret = hfi_session_set_property(inst, ptype, &en); + if (ret) + return ret; + } + + return 0; +} + +static int vdec_output_conf(struct venus_inst *inst) +{ struct venus_core *core = inst->core; struct hfi_enable en = { .enable = 1 }; u32 ptype; @@ -569,14 +586,6 @@ static int vdec_set_properties(struct venus_inst *inst) if (ret) return ret; - if (ctr->post_loop_deb_mode) { - ptype = HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER; - en.enable = 1; - ret = hfi_session_set_property(inst, ptype, &en); - if (ret) - return ret; - } - return 0; } @@ -724,7 +733,6 @@ static int vdec_verify_conf(struct venus_inst *inst) static int vdec_start_streaming(struct vb2_queue *q, unsigned int count) { struct venus_inst *inst = vb2_get_drv_priv(q); - struct venus_core *core = inst->core; int ret; mutex_lock(&inst->lock); @@ -753,12 +761,9 @@ static int vdec_start_streaming(struct vb2_queue *q, unsigned int count) if (ret) goto deinit_sess; - if (core->res->hfi_version == HFI_VERSION_3XX) { - ret = venus_helper_set_bufsize(inst, inst->output_buf_size, - HFI_BUFFER_OUTPUT); - if (ret) - goto deinit_sess; - } + ret = vdec_output_conf(inst); + if (ret) + goto deinit_sess; ret = vdec_verify_conf(inst); if (ret) -- 2.14.1