From patchwork Wed Jun 27 15:27:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 140339 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1026148ljj; Wed, 27 Jun 2018 08:29:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJzNmt97WG6SrYJ4DNC7Lz0yE7fkq/SQmEa8412eUBB8eYAv19aYPej/VMinuvS6mtmWxOB X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr6752090plu.22.1530113390586; Wed, 27 Jun 2018 08:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530113390; cv=none; d=google.com; s=arc-20160816; b=EF6DMQkHs51t/ApMf3mLHURsscUwTyshT0n1y0cJA7BN2Kj80cEjzhlOH3Yg+8AIlV yzzonYV9+MyDcSSe5cDLubJXajjrNzc+g2InGYEn9rCUnncIBl/jBqlO9Yr5/1JtEaZV FFYdFsDvJDwiEaLSgxy0HmfLql5V/x/i+LrJxEsxtMjS42dZoTstCKEpNHtZwB6hjSNq hOq28+MJDMRbKl2l5FyPkn1uwq+qE1j9j8hkDgoCvtzWLUnDgiHNqUMYHANFhP/rp05i /TQYEotGIG4XUjVG7ZmkTs3rTgI/knUTsXu96RRKHpSCfG5dHSlyntd2cGCwwU8CGo5C dYXw== 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=Vnct2M1/1aGBekj/HoFLFUb0IxaxK8+1a+e6mJr08tc=; b=mKu6wlUT/JYjTPji1y6dWH3/FBJ6aw18G7EOcRB0C1SWlm3XgwtJuRLIht/NWBdMXA C2eCuMlKIahh1wwKkpzSAD9DiGyOrX5DCVmMH3lQEy5xg3JxvLIs8TJotCNpD9vSJ40g fjOvEIkD9Sil1YYwIOVTgkxCln4cdbkbHwOaB/Sloe8J6kGE46jr2ZLw8NYBldlR8Z0h KsWSctHux23yGVuL6TPT1TcpNuTCiauns26Si1KoTPNSSj+GUcfhGeKXDfzFM31r2dgs ldSsb7KfEKePS2dnWgC+kNg4qxJYh5+14hyQeLtnW+RyaSanUABAhpQwLwnbinjFmMVX 8iXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UpWC2btW; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (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 b8-v6si4191721plm.202.2018.06.27.08.29.50; Wed, 27 Jun 2018 08:29:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UpWC2btW; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934130AbeF0P3s (ORCPT + 13 others); Wed, 27 Jun 2018 11:29:48 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35261 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965269AbeF0P20 (ORCPT ); Wed, 27 Jun 2018 11:28:26 -0400 Received: by mail-wm0-f66.google.com with SMTP id z137-v6so5987497wmc.0 for ; Wed, 27 Jun 2018 08:28:25 -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=0nhKxdCOw37kKVgSprpQsFMGs84elFtpX09ZZT6Wn24=; b=UpWC2btWqm7fyWLNH2uGCWcqGVwikWwwYbWpIBKU4T2UpHHCrEk0EqBvmZo8WhBzJX qnxB+4J8UeQ+LQHXMlxokOz+n8mZ31rDOd7L1A8HvBHhecafE6keHvqOFu6lz8mWNi/c 4wbBUZ5pIZ5AlZYfMy1KlJ3csdmsFlFpqPObM= 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=0nhKxdCOw37kKVgSprpQsFMGs84elFtpX09ZZT6Wn24=; b=kLoJWM0MtvQYyYrKVlBNj9/Yfa2ocn6ro3OpzbRYYONz6fnHjyL8U4HeIqzcLRYmzx IpBSSMFhZzuEZKMDh2Mu1ln7ikr25KrQ27V5cLdi+/2PBMSYtVcyidZ/yfaHy6wl9NWH PvAtk0MiPmB6/DGIX3R1a3MxLhjlcgZSBBV7zO5N0+KZThZFg87W/cgjr5aDtJS8TtCs XJFpUwzJmra/2+dCBiUle4bS02qOwCUYa8cLaCxbpOA/OM5IUaVBZGcURIvuPcZOvplK g64wVj0RddS5baUw1xi17mezi2x5xM9mx56v0Lh+RXaBZ7tUZM9z+1Ctmy2COilMwg5B 4cgQ== X-Gm-Message-State: APt69E0f0bHFhIi60B2QcA0R4PMaY6STeHA92oZ40ZMHs5X7bL3y4k9D fpM3btbABISCOPuVK5iXK3Cqtw== X-Received: by 2002:a1c:aa12:: with SMTP id t18-v6mr5219819wme.54.1530113305305; Wed, 27 Jun 2018 08:28:25 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id o203-v6sm2916075wmd.30.2018.06.27.08.28.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 08:28:24 -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 , Tomasz Figa , Stanimir Varbanov Subject: [PATCH v4 23/27] venus: vdec: a new function for output configuration Date: Wed, 27 Jun 2018 18:27:21 +0300 Message-Id: <20180627152725.9783-24-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180627152725.9783-1-stanimir.varbanov@linaro.org> References: <20180627152725.9783-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 55213a8d55a3..4d3f1cd7ed1d 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -545,6 +545,22 @@ 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; + 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 +585,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 +732,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 +760,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)