From patchwork Wed Jun 13 15:07:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 138492 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp850920lji; Wed, 13 Jun 2018 08:11:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL6wk2qKAtAY04BHD2awt4rrG3o+Sdhxw6/QSzPTh8xbY6SljOe6pWWGmIb5aw6LMjBBA2i X-Received: by 2002:a63:6d0:: with SMTP id 199-v6mr4368550pgg.338.1528902695810; Wed, 13 Jun 2018 08:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902695; cv=none; d=google.com; s=arc-20160816; b=IXRTz+C7A6+DS1Zq4e7IIj6zgn5oTdzLBc15WQQ9uq5Hriecya/7vb6SUSpIn5EPZ8 XerwdIg65peQ38snZMBYTcSU57SlegcZdmCLP36jH4q2erDlJEBMxkgcyBIEJPMMNMuK J3uJaJ0DvBbzjTMx3ZIbHwfn11iiV9VdvyS+g/sQGEEmiao/LIUQXdyM5sX0aYL2SJlA WkJ7HT0lH3g6cOMQMwI0LbwfIvJvJZ7WHREi8wpjUzA1Dk9r4Ia29SNYlyL0Z88pwAnv 30DuM8ABeRd/kpoLm9y/ZBeL5TxxHiQ4/B16M3q5LdysCCvM55dCfFabGjJ4S5jp5wZT a8jQ== 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=0nhKxdCOw37kKVgSprpQsFMGs84elFtpX09ZZT6Wn24=; b=tqSwkNC4HRdZoZOXIqk+wqCgYWNI1sIO8FyhNiByr2QmacdRTLjeveUNTgXVFzq1C3 0/dh85/y+dzoPGUYseiGC+CLJjvBoxzep4iTPiGFvvsdtFxNUMDwfJQlqdMhKwmVySBZ QzAcDO7YYDiDEyiiX8P/H+gBce6Ynek8zGoykiNzTAGSSV7zgeG5SGNyb7ol8Oc3Q2FB ds6pbtZ8NweI3pr55gCBHT1EhRW3m0sBXrX0HzEb5050V0qZyG7hQgMHfBfRo4gwaC1f M3PirM/BZ1De9lqeCPe3I/NCSY8CVk9/9chHySjlXD10SMp79cugGzuIq4vP+7h1keYQ ZarQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bc6Vc+K7; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 g7-v6si3003690plt.149.2018.06.13.08.11.35; Wed, 13 Jun 2018 08:11:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=bc6Vc+K7; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 S936022AbeFMPLc (ORCPT + 4 others); Wed, 13 Jun 2018 11:11:32 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35942 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936051AbeFMPJk (ORCPT ); Wed, 13 Jun 2018 11:09:40 -0400 Received: by mail-wm0-f65.google.com with SMTP id v131-v6so6114436wma.1 for ; Wed, 13 Jun 2018 08:09:40 -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=bc6Vc+K7NDABYOCuuC83CwKHPsRdm0cY2lubJEApqZ+FlP8y/peI/zqnmZfbumzopI zPjEr5wMsZX+ujKbvJB81zM+e5xfLvpLxYtcG1ItT+Xhks7RAfacxUft5bVadL1IccW4 P3Ii0F7YINxGg3IGc+3kc0dwY5oQBI23spfhU= 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=gJtdHvMlKCE1rzRkhPC6ueZ98noWS05Z4f2N/IY2cDfjLtCHdX5e7iGWitbUHQHxdw CW8PZvOqTqYf6XqiaujzBPvqLLjrxQNhAJs6a2Mns9Fami5zAf2dv9jex7xsks1t8qQX +HJYdf4BU219RsEHs+CL2qGhhMn3EcQIwdaxYa5W9TYpIWXUA/AXuksJwKY5GG4sZ+Wg ti2CEvYCp54h2nedcO2+DKNDPjU4PX0RMKVQ0VuejJ9Wlrf5uHgjx8ks8ngvi1nI9UAu edJsbMfwOYPnwA3q5m8E7/8AGSe2iUVBP4p7ynNhmraLNjVRM9U6YXCyrNyK8ECBXjSb 84hw== X-Gm-Message-State: APt69E1tkQJm4kM6LW0kM75m8/Omi5huUJ8OCJF95JkRQIVwORR+pnf6 2Ap5LgDV/B3HZH5ChnHTm1spdaFpIOE= X-Received: by 2002:a1c:9c4c:: with SMTP id f73-v6mr3633958wme.141.1528902579372; Wed, 13 Jun 2018 08:09:39 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id e13-v6sm2886548wrm.45.2018.06.13.08.09.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 08:09:38 -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 v3 23/27] venus: vdec: a new function for output configuration Date: Wed, 13 Jun 2018 18:07:57 +0300 Message-Id: <20180613150801.11702-24-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180613150801.11702-1-stanimir.varbanov@linaro.org> References: <20180613150801.11702-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 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)