From patchwork Tue Apr 24 12:44:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 134099 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2198726lji; Tue, 24 Apr 2018 05:53:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx49yUk2vYGDqDsHZkP3EWYIBcQNyiHo6VoVgpXmVxJdAst7NKIJw5nzRJ7ki1ktDLknJ7gSx X-Received: by 10.101.96.205 with SMTP id r13mr8729671pgv.22.1524574420172; Tue, 24 Apr 2018 05:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524574420; cv=none; d=google.com; s=arc-20160816; b=KP6gbFC0FK1s0zwxQYVyU+d/eUF/mYwO8fD3FzKHcccc9Bn7TtD6CFWcRcNaGlZR4L YN77hhR+Q5jRt3FnKfFNu7TzVun/vNiZhT71acoAlGp7SOhq3wv7iyonPGHedl8EZVB1 Ct2fPgQgqhN72QdHziLSsjfJKgHvpJjByadBLUn7iZsjSFy3sD3M7/vBZK1S3E91V+HP WSpHn0Rhym/dUj+OXLI7FdPLEb7hR22DWZ2FEcGDKbexpCwcnO2giZ4wwx/a1k4FvKSf EGLQYgUI4HSLYqMGOVs0EO1Arhzx0Y2O9ibjC+Zu3/9zx5IEI1wZFGFYh6Gzeyb66lYX nRHA== 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=qk30vsxFXw8OaVI7ewrkRlKK5nRwGCA970OKKcpSOck=; b=GWmu2CgdBTqdKDM50tOYjylMcb7oQCC/wDLCqUpHVt8az5ClQMOKjDX9gGf29/59TO iU3KnJbCwJUSAgUrlrO0byUoI3SB7fWI7RLzJl6X6NGcOcpy6l3A94i+gcKxhzn3/l0/ m5qrVy/dOS6xtbxODdb0Fs7m9o5onVMboCy2DXhc/ceOkj0P+c0t8BabHO7W0hI0gxJN RT/DU4HhqnmaoY9Y9E6YGg1FPnbXKhSmHV8X0CEWvmwDdT1A2V1fCZinxeP3HuqiOfpP v3a+SyllJMKpzju19HPphdW7GyynAjjl/aidWeL/pJFlHXMpXHTH/DROZq4gnr3x2Uqj tYzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EN5C5MUi; 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 d16-v6si2278649pli.176.2018.04.24.05.53.39; Tue, 24 Apr 2018 05:53:40 -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=EN5C5MUi; 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 S932116AbeDXMxi (ORCPT + 5 others); Tue, 24 Apr 2018 08:53:38 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:43960 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757836AbeDXMpS (ORCPT ); Tue, 24 Apr 2018 08:45:18 -0400 Received: by mail-wr0-f195.google.com with SMTP id v15-v6so31693408wrm.10 for ; Tue, 24 Apr 2018 05:45:18 -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=qk30vsxFXw8OaVI7ewrkRlKK5nRwGCA970OKKcpSOck=; b=EN5C5MUiAsf12wpgRSJuAqBAg/xSjoRXB4WQ7pmSvngAYQTVFScI2JsfS9wVOXN+O8 /DLlcSSBUgVWrVUQg769dk3Wo6yodHVrltd44JZ8w6e1Ya76cD6LQ+lweWtpq+b261VM 7IuH1UE7o5hCpRKUDo8fwiIODJNdP7wedC/Eg= 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=qk30vsxFXw8OaVI7ewrkRlKK5nRwGCA970OKKcpSOck=; b=nVYrS+X2HAkCVbzYfwyuOO97sBcEjs3pUd9YwukxRgInXoEnjMbFCCDCNjDGSOT57J zPc+MOxezG22zcn8r5iLnh1g4O4E3WRAY8wwEqW+ESCAiZ3Nr0ZRfrLeQ/xXVOGaFTe6 tn8X6R8xkf8akDl7eeh2RXIIVWqIaxgtFBcI2Pl6uPpLZeyc0mrWG+ta1O8T5ADs9or6 TDqfoRlF51jzWHXL7o9upBIMYSnc7Gq5u/JqNFONqcuTPEQxXSYchnNR7cD9+mAMsaC1 CtbNsqMIjNv2zh2rJMVsaXMGaCeF8bROM2aidUEXMc7aEP+xTyQUDndWla2ARiLTYN1P pI6Q== X-Gm-Message-State: ALQs6tACBOjhXOO/MGPDU3TtO/zoSbKKKXWznfE4kFJ3WdWfPqK2uSDQ An9co4Is8yaE0Xp4pQp2lfpzDw== X-Received: by 2002:adf:e791:: with SMTP id n17-v6mr17280376wrm.225.1524573917747; Tue, 24 Apr 2018 05:45:17 -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.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:17 -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 10/28] venus: vdec: call session_continue in insufficient event Date: Tue, 24 Apr 2018 15:44:18 +0300 Message-Id: <20180424124436.26955-11-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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Call session_continue for Venus 4xx version even when the event says that the buffer resources are not sufficient. Leaving a comment with more information about the workaround. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.14.1 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index c45452634e7e..91c7384ff9c8 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -873,6 +873,14 @@ static void vdec_event_notify(struct venus_inst *inst, u32 event, dev_dbg(dev, "event not sufficient resources (%ux%u)\n", data->width, data->height); + /* + * Workaround: Even that the firmware send and event for + * insufficient buffer resources it is safe to call + * session_continue because actually the event says that + * the number of capture buffers is lower. + */ + if (IS_V4(core)) + hfi_session_continue(inst); break; case HFI_EVENT_RELEASE_BUFFER_REFERENCE: venus_helper_release_buf_ref(inst, data->tag); From patchwork Tue Apr 24 12:44:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 134084 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2191026lji; Tue, 24 Apr 2018 05:46:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx492kyWyMFEa7uslrkG5b234XSHqbSVTtGCpfWuJjZv96CiApCVQn0X9KvfA1ZUTBVjoTRuh X-Received: by 2002:a17:902:290a:: with SMTP id g10-v6mr24848479plb.155.1524573964461; Tue, 24 Apr 2018 05:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524573964; cv=none; d=google.com; s=arc-20160816; b=eUn/26g+IN+7t8M/lEedc2okCBAX4oo3BAJ9WQTh00fTnrXlYZHoz8/0JCa4HBFyyD mTJrqXxtJqR9S5O9qrhiQu0wzsgQzS1AGj5R8G5oU1yxNItrJx2+eJ05i7TZT5LvXzpJ mvoPGVseam1zm/8TmVe39rZ+gDMbYLU2U6qq5Bj7I91NXERPtbEMHLgCNSc1x7hZKfSh bXZu7268KRY8kHgDPl63I+QO//pQbt/a/ozDJVCRVTfPvRAdue3EipVq0Vk8XVCBIk1o NqTnEtz+WQBTCcedWth5j6UfxGDe3Oj1vDY/9Aldm7u9HV+9YhDm8st8rhuXhIY4DhnR E/Aw== 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=TUnozsa+e5HRq8Hpc93rMbM2p5G9XbHs5hh5AcxrSWJE/prUc8gTZpws3yJpLADBW5 Oz8V+8h75DbhuLd2Lve6XNuRlErKznK7O8ynWlcaY2J9H99nQzLo1K6iqVH2BhgMdWef nWGBgdO10h2BR1/TQ84Y6T5VPbXA9rdeLeadL10F/P+nGV7GOWbmvI2T1XaedTFM0cV4 NHEkiLBN+yYIVswFAGB9xHHrg2TMInstr1V5dVBAbDTP1BZRAR0jgQbxtSaX8mElVrKk UJPBqAu30G91gx/8COPGQQdz7s+srMB0wL6x9oxWbMmY0f34BT8GA1ZjJ55L8SghxR3c tTig== 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-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 n86si13583346pfb.126.2018.04.24.05.46.04; Tue, 24 Apr 2018 05:46:04 -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=aGPi7t2f; 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 S1753182AbeDXMqB (ORCPT + 5 others); Tue, 24 Apr 2018 08:46:01 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36596 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757875AbeDXMpe (ORCPT ); Tue, 24 Apr 2018 08:45:34 -0400 Received: by mail-wr0-f193.google.com with SMTP id u18-v6so22545274wrg.3 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=oDz8m6wWP0qdyG+MUv5axGJoR02VgrWFvTCYGmqvLPHER4hHwpgpF75Ql7thBMwuzd mcDPuLlwrhXf1yFNoiHBwIELfnxQ5ylO4TRBYajYlldkzGpUdf/L/qHiGgs2H5J0dduP zdK1Y0/MmXhmBmUWsw9GWQiJVGPOvvzOMz/wfyYNkXzod7PV1iEHjukR811usUS12x5/ nmKK6gkf+iy9STTTUrcObiTAWrAj+iBAvQlUMWnLfdMcT4gTOgNBtX5zy3ClW1rz5Lgh sTF4vAfib6JYCfog5PHXy8iBC/+IDAFAvpbEfu3bg8doaNPQD4mC7vKWyAmiXx4AhKUt xE5g== X-Gm-Message-State: ALQs6tAiuTmxwAZ6qNl65QVRhtGv6+smRNVIgTZ5ivbdEeUK/31nAZUQ K4M5SA5xv+tV/SyL3LrhNqREuw== 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-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 | 35 ++++++++++++++++++-------------- 1 file changed, 20 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 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) From patchwork Tue Apr 24 12:44:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 134085 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2191474lji; Tue, 24 Apr 2018 05:46:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx483wdBDOUZgsoT8l7M1UEk/jSG4G446otlq0elP4A4d5gjkkc0pFr0PgZPViSsBCATyOHVB X-Received: by 2002:a17:902:6c07:: with SMTP id q7-v6mr25231244plk.67.1524573993762; Tue, 24 Apr 2018 05:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524573993; cv=none; d=google.com; s=arc-20160816; b=WpeMrsPOKCn6fZTpBihSE8KENeYzWhmEJtIhCz7LRT4PvrtirRAAs5zjDoD1tCg8kD +G/7qSJ9KU1jhSOGCmWBWCrwvy6vkHyliTRVVoyZ7j9JCtJ0kmP8qLsysqYe7RKMGqgu 2uyaIt1ohoDA4I6IgJc3OCLPUdWgRlpRxSM6DXcPK3saGTsXngzJ7KRZ51ornuE9NiRM WQHO9SUL7zszD26G0is5ekYrafJigg9uV1jaVNNr6yUlT2ErVlWAht6Dn0i9KBS2hB6J QABcNK574i9bwnUR3tWKY4ylJyZDYg++zHbreur9usYd0CFI44qex39Fz77VzREn72wH Xe9Q== 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=SL5VYQuNjldhxp9IE3yhq5XyEcu/W5Y/JUFKNQLsd00=; b=sRfrKcnx/f754KnpJWPlDSh0yMRhkJIK8tUuHgnSCBXkL+u03tT67dsLzUdOcPwUXU u/p08pwEyp5bhvhex1ujmQACfbtoeLpwITw4vneS2uNkOYOEXeyyMLcjZBJJFInya9Kb FjiGxI37h06evrCGrtR2xxE4YBHdApkknAAHHLWqasaLtU1R2+VIxoGLjsw8ra3Qvy63 PkA0OQT9SFR6jAcVy5TcRCTPCYcC1NjRxFut3X0fhsIdOAPsOaukoSdkNSfNe9ntYOQh 9bVErrcWlS7sioDPQ4rBOiuZL164xsdx6KHGLUdXzfyJpAfggY3VK4YG/LZxDiERo7uQ nCIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BNlNXyhi; 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 j2-v6si12816673pli.501.2018.04.24.05.46.33; Tue, 24 Apr 2018 05:46:33 -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=BNlNXyhi; 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 S1757907AbeDXMqb (ORCPT + 5 others); Tue, 24 Apr 2018 08:46:31 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:55599 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933026AbeDXMpi (ORCPT ); Tue, 24 Apr 2018 08:45:38 -0400 Received: by mail-wm0-f67.google.com with SMTP id a8so695476wmg.5 for ; Tue, 24 Apr 2018 05:45:38 -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=SL5VYQuNjldhxp9IE3yhq5XyEcu/W5Y/JUFKNQLsd00=; b=BNlNXyhiJCYygv3sdmAWDWjCS7wtqy74gKVQ1GOINV45mfaLLEPJDu6q9fQbnwFETx 9NTX/FplMqryBPGeJc3nMINKWTdnyRmgPH3kZw58D7Qfp1BnKORuood/xIF+Ajim0PuT h/v38WF01SQv9k5LDGU6UHNG+cuvTgcKRuMHQ= 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=SL5VYQuNjldhxp9IE3yhq5XyEcu/W5Y/JUFKNQLsd00=; b=MKZARW6NEwlTdHmqmZStFyKfUuAcYJSkUMdMYGOGIrANA+WQOmneOjAcpjmkI59Cy8 q2GyvLrfyY7mljU9k8aKBdd5b1PEoOh9cLZQ2L6VmUQKSxOzyntOcuL5pNP389L709xS ssYcKG8pYIx0FDgPvk9NCvkbD6ex26ZFfBrfTarkm/9TQ26XOShxsA3NgNfxUwwGyCW7 4tmx/q5YCg8WY7b2TzVBEMO7cXTL/6z2O7zzDsr/xycBSwCYPqFqJNWxsNeQNGfZ30Pf c4HMVA89YAnsoyxHHV9zmSc6QgqQwK6XlG4KwzFKJ2AxnemOpj0Qk6NZ2CWK6bDG5VPN 4uLA== X-Gm-Message-State: ALQs6tAX1y0j4bpYSNr9srQfQPlfuwbn6sbzZK+S5hrjyQjn9mAc1KQ+ RXEJzoey4qRyg9odd6TMliOZ3g== X-Received: by 10.28.174.80 with SMTP id x77mr3103019wme.64.1524573937412; Tue, 24 Apr 2018 05:45:37 -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.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:37 -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 28/28] venus: add HEVC codec support Date: Tue, 24 Apr 2018 15:44:36 +0300 Message-Id: <20180424124436.26955-29-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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This add HEVC codec support for venus versions 3xx and 4xx. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 3 +++ drivers/media/platform/qcom/venus/hfi.c | 2 ++ drivers/media/platform/qcom/venus/vdec.c | 4 ++++ drivers/media/platform/qcom/venus/venc.c | 4 ++++ 4 files changed, 13 insertions(+) -- 2.14.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 87dcf9973e6f..fecadba039cf 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -71,6 +71,9 @@ bool venus_helper_check_codec(struct venus_inst *inst, u32 v4l2_pixfmt) case V4L2_PIX_FMT_XVID: codec = HFI_VIDEO_CODEC_DIVX; break; + case V4L2_PIX_FMT_HEVC: + codec = HFI_VIDEO_CODEC_HEVC; + break; default: return false; } diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index 94ca27b0bb99..24207829982f 100644 --- a/drivers/media/platform/qcom/venus/hfi.c +++ b/drivers/media/platform/qcom/venus/hfi.c @@ -49,6 +49,8 @@ static u32 to_codec_type(u32 pixfmt) return HFI_VIDEO_CODEC_VP9; case V4L2_PIX_FMT_XVID: return HFI_VIDEO_CODEC_DIVX; + case V4L2_PIX_FMT_HEVC: + return HFI_VIDEO_CODEC_HEVC; default: return 0; } diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 7deee104ac56..a114f421edad 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -77,6 +77,10 @@ static const struct venus_format vdec_formats[] = { .pixfmt = V4L2_PIX_FMT_XVID, .num_planes = 1, .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, + }, { + .pixfmt = V4L2_PIX_FMT_HEVC, + .num_planes = 1, + .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, }, }; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index a703bce78abc..fdb76b69786f 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -59,6 +59,10 @@ static const struct venus_format venc_formats[] = { .pixfmt = V4L2_PIX_FMT_VP8, .num_planes = 1, .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, + }, { + .pixfmt = V4L2_PIX_FMT_HEVC, + .num_planes = 1, + .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, }, };