Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp612770imm; Thu, 5 Jul 2018 06:08:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpexfBs4mOiEZv7Pf2Lttuf4//o/hLnQXxsVAL+g+S089nnU4EJqIOry6qPnwqC6bbO/BEnV X-Received: by 2002:a63:6092:: with SMTP id u140-v6mr5519425pgb.433.1530796093476; Thu, 05 Jul 2018 06:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530796093; cv=none; d=google.com; s=arc-20160816; b=g490y93VIU80aarC/ra6Gj9SNONWcTiaD01rvNMJTPZtATSWDhJBJmw4gn5DxC2p/b eNq7gY75QnvWf5ltqR/O39tHaEwIR9blyxpy8w9+q+KecR3CTD3LM1yc+OP/7kvz5A78 KIc0frmU1L0cIv6xSbfvwWcmbGrfxLiRd63J66wu3PIF33WCfKCMoogiAaDbklTrxXAx eCAOMWo5NnWdRbWaE5lqFRrlZmr4Q6Ri7CgXnebcdSttnwyYOE5ibvJIG6eZVRLwxyMN mk1pMIkFptCE2CYtq13q2rzYGO31wRrYpgsIjLqDhEZKxtKk/c3JmrwE7+JAdWcTMdrT hBtg== 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=rLJrcqwr+U5qiHZwf9V1nV8FSGGmPF39OlgIgvisi0Y=; b=OSD4SFB1mVsXAoZhZKtiMDTSNLjsjM18g9cQqDjBan37IHzZWCXbht21ZAH2mVk9JX wXqHToO/vpk94qyyT9Hi3tTc7wJimkvuIZFTqBax3HuonDzmHGJBI0gW/4NAcbPE4Ka+ MTYafxUA50MA9TJLbCVZyvn7lm/OqyQJiX0IV6t5BfSS+oF3lYbgCij/JAcP5LCM8eGi ABfwD4/y1IvlykxTuJBFGPetYf45Pto+pA/ItLFgvctO4XqqU6aRrYMSuyXyN67dzgJP L+BS3t40C36DTZsHZ2u5su0wETO2V+3dM/iV4gHk0SfffgtfRHrqbkq3MBUhw5lmKotc o8lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W8h3Sbse; 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 t26-v6si5468665pgv.513.2018.07.05.06.07.59; Thu, 05 Jul 2018 06:08:13 -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=W8h3Sbse; 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 S1754649AbeGENGo (ORCPT + 99 others); Thu, 5 Jul 2018 09:06:44 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35681 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754512AbeGENFd (ORCPT ); Thu, 5 Jul 2018 09:05:33 -0400 Received: by mail-wr1-f65.google.com with SMTP id h40-v6so1134562wrh.2 for ; Thu, 05 Jul 2018 06:05: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=rLJrcqwr+U5qiHZwf9V1nV8FSGGmPF39OlgIgvisi0Y=; b=W8h3Sbseb4M64faQQYVpYCbdPFDK2sCzxH6W9HJ/1gIxHkW8YGwfAHAf8xPw3KoPwA SPdtQITGN7GqvSXfP5Z1YpcALRpd6Toea1eNjgAUWbELsfj1yIc3B1EtVOF9b5y3U7FT zFU7coTLaWYJTwNZqPbZ88O85maTjP3EZbsMI= 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=rLJrcqwr+U5qiHZwf9V1nV8FSGGmPF39OlgIgvisi0Y=; b=URrg5NAqupSpEqPMEwd37fIwmCupsEHv2G1rRjAPQYYeT/HPbFRcqDWl2GVOpbi0xS +UbqJR5cYxIgM5uNtLT35qjD7nSqkXDAOvVzjs9PySf9D2D4Bfezv39DLu+G4qD8Fd06 cGFydPTLEPx698o/838f6HQ47Jcsa4uVNYugGWUrtEpcHsh4r+DNVCelgRe9wzTsCSDV 0srThk5PvaK2af68X3CgsUn97m8YdeRG38u1dRnKIPly3J1Q04B2UTEj9DRvjUYKIK6j ENYGzEkkcydpLniOCqJGHWkwszIJ4LcBx7kA8HOjy9/TrfjGU3eQp7eFNmT4QcHlIjm0 QIuQ== X-Gm-Message-State: APt69E2O9QcPUv+GHLX+fc3u5gBM/NfffDAQGvZHHB30T/9IAvb4gT33 fv63JK3YA3Z8JQcTYFnWc0MkrYMGryI= X-Received: by 2002:adf:9f0f:: with SMTP id l15-v6mr4654445wrf.206.1530795932574; Thu, 05 Jul 2018 06:05:32 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 11-v6sm2109102wrw.67.2018.07.05.06.05.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 06:05: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 , Tomasz Figa , Alexandre Courbot , Stanimir Varbanov Subject: [PATCH v5 23/27] venus: vdec: a new function for output configuration Date: Thu, 5 Jul 2018 16:03:57 +0300 Message-Id: <20180705130401.24315-24-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180705130401.24315-1-stanimir.varbanov@linaro.org> References: <20180705130401.24315-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 | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index c98084f51e5e..11db3074d1a5 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) -- 2.14.1