From patchwork Fri Nov 24 09:34:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 119565 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1955443qgn; Fri, 24 Nov 2017 01:34:09 -0800 (PST) X-Google-Smtp-Source: AGs4zMbwNtFSy/pVclzbj0eTL0InrSbYajNQ/NDV1VI2btZwEacX7h+DGhtdKqHRLJZNIkH6iPnb X-Received: by 10.99.0.86 with SMTP id 83mr27362641pga.326.1511516049649; Fri, 24 Nov 2017 01:34:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511516049; cv=none; d=google.com; s=arc-20160816; b=0f+Beqp14/FQlGzeVIs2Gil9dTu8FVy//edLApCl3keel93E0ZPzxcfmVkjhWpY2j8 e0tTu8SfNLUzrqHzs5Toc4L2j9swHWwM9Oh0e3OD9LCbpIWizl8NGp2NbIog/182SROd BV/m4PNxmHO0AD7k8X4mKJlwiV6R0PobcWMNmwptAb2Dkgk0V3v6XLPKuyXI+os7coKE TXA/NkBcfdDfsUH9Zr+i7mAPZpq6vol4oCMASyAmI+lCJJAUR1DI27SEQLBi9rKKwIVp s3LZxoGeVhSOgrLc/i4mk3v2EWHljWM8Wzie40h5N2GvY3oS0sV83bxaN2aw3mwWzgT5 c+MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=MP5CIr6ru7YNS4q+mUriW0KyLB5EQj2dNg7NMXi49Is=; b=o2nMF1FTHBC5xW+q6T5siYOfD4JiU0Hkq9pVo5ocIehuFMcX03jM8ygdJM+35jfSAC 7TVrii6ijJEaG4tUI664lCp5/fNGYJuHQ1+o2viXn97AdErwDt4ESQFySckA85oLWwxF NzVNatxBPR1Ax3JLfwIrL7QdX5VD0LcoSXByen+2K7oPy1443x0HdKWlawZw7D2bCNM1 U3xwoT2/KR2g6h92a2O5w1n3jT0QBlm+u1ZfTcb4ID09RiUl34r8drIq06imj5y1t/4b Emcl2NYU97ger9zho+GY248ezunKlzme3VqlFMJYftJKZQQW781OcIw41CeRU7iv25sF AxqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MqtKaqsk; 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 u86si19793425pfg.173.2017.11.24.01.34.09; Fri, 24 Nov 2017 01:34:09 -0800 (PST) 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=MqtKaqsk; 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 S1752824AbdKXJeI (ORCPT + 10 others); Fri, 24 Nov 2017 04:34:08 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37052 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752399AbdKXJeF (ORCPT ); Fri, 24 Nov 2017 04:34:05 -0500 Received: by mail-wm0-f67.google.com with SMTP id v186so21184792wma.2 for ; Fri, 24 Nov 2017 01:34:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=JSpEwV8BznX8oRqZVc2iRN+wISsZI8BuupcZKfRKVJs=; b=MqtKaqskn1Z2wnV6U3ohl7DRrl8kVHqbPXOoiMnnMxxms4qQXyZrpDCON3NbALn/RO g7dn+nqhGS9kHt4FpZnp/MJWYL0whQ57hYefoPmto4No60EyTLsGPB/8GH/ZwzUMXQji StcZj8FeCOPhRQNfAOfBC15+FcYzGnci3PWRY= 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; bh=JSpEwV8BznX8oRqZVc2iRN+wISsZI8BuupcZKfRKVJs=; b=IHHY6SiZORm0T8wjBUQY4tNTfAfij+eG3yP0BEkBYfafyVALsnPaZoWPnj1Is8eFH3 Nsf472d9caluk3GLv2C0Q/KKGeXZcAyWpDrtKWud2TS84XrNua5V14Vkm20mh3l/5h6j RdlyH1RyKQhx672la+pbztcHcaxEdI99+gF6G0pmleMJphF9XyGjaSrJa8Q7/qmto/Vc DuMFoBV0eq9tT62p+1Ebl3aiN6dsJGemmSjWunL9YqmiIRfL97qyQ19doWeq2v0kYXeg mUryt212t1/vVoKeD80mEnkaeWvleWlxD4pfZ8hvPDE6pVhH8m6oi7HE1yjQpRIjvtiV oK+A== X-Gm-Message-State: AJaThX6tSJJMByBuQXY4kDC7HVmBSiSspdYq7eNL75hz6LnYhzZb5hjS jqXHtIwFxaNyLuuQXSpJ+nOZ8Q== X-Received: by 10.28.174.78 with SMTP id x75mr10458453wme.27.1511516044561; Fri, 24 Nov 2017 01:34:04 -0800 (PST) Received: from localhost.localdomain (LFbn-TOU-1-178-83.w86-201.abo.wanadoo.fr. [86.201.28.83]) by smtp.gmail.com with ESMTPSA id r3sm8922051wmg.31.2017.11.24.01.34.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Nov 2017 01:34:04 -0800 (PST) From: Loic Poulain To: stanimir.varbanov@linaro.org, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, Loic Poulain Subject: [PATCH 1/2] media: venus: venc: configure entropy mode Date: Fri, 24 Nov 2017 10:34:01 +0100 Message-Id: <1511516042-11415-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org H264 entropy mode can be selected via V4L2 API but is eventually not applied. Configure encoder with selected mode, CALVC (def) or CABAC. Note that hw/firmware also expects a CABAC model configuration which currently doesn't have existing V4L2 API control. For now, use model_0 which seems always supported and so the default one. Signed-off-by: Loic Poulain --- drivers/media/platform/qcom/venus/venc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.7.4 -- 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 Reviewed-by: Stanimir Varbanov diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 6f123a3..d5d824e 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -641,6 +641,7 @@ static int venc_set_properties(struct venus_inst *inst) if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264) { struct hfi_h264_vui_timing_info info; + struct hfi_h264_entropy_control entropy; ptype = HFI_PROPERTY_PARAM_VENC_H264_VUI_TIMING_INFO; info.enable = 1; @@ -650,6 +651,16 @@ static int venc_set_properties(struct venus_inst *inst) ret = hfi_session_set_property(inst, ptype, &info); if (ret) return ret; + + ptype = HFI_PROPERTY_PARAM_VENC_H264_ENTROPY_CONTROL; + entropy.entropy_mode = venc_v4l2_to_hfi( + V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE, + ctr->h264_entropy_mode); + entropy.cabac_model = HFI_H264_CABAC_MODEL_0; + + ret = hfi_session_set_property(inst, ptype, &entropy); + if (ret) + return ret; } ptype = HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD;