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: 10359493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F149B601BE for ; Tue, 24 Apr 2018 12:46:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E174C28DB0 for ; Tue, 24 Apr 2018 12:46:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D48A528DB4; Tue, 24 Apr 2018 12:46:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 575A128DB0 for ; Tue, 24 Apr 2018 12:46:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757907AbeDXMqb (ORCPT ); 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-Google-Smtp-Source: AB8JxZr8SowfNrwdcSEyeg9KxRwy82hW6ykDUlBE+WOTlTLA5IzZ20Z1mUYH7bowlDqTBLH1aZh4yg== 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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, }, };