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, }, };