Received: by 10.192.165.148 with SMTP id m20csp4732903imm; Tue, 24 Apr 2018 07:35:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/14gVWm1BP7F6PHgBkpqE9NJK/DrpL+GIQJDGpovp9Jj5utfNR5+jEO+k/SCc98KUWLcHg X-Received: by 10.101.91.74 with SMTP id y10mr13146024pgr.243.1524580504853; Tue, 24 Apr 2018 07:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524580504; cv=none; d=google.com; s=arc-20160816; b=QXoXnU3mTHif7/annxfS9v/XK3huM/szVjowcyTvsVoWFtHwUTjTCF7qPNhJ4L00bd 9VWYwJr/B/RF+slfyU/4mWTLvOrHcCVq66rDaljPK5xtPDitB1uXS/hnV8oK+UE48kPl 9nnn5TEw8sx5W+NwsuAysgpTNOZcuV34wJ1lbs2+oELPm/GRbxcmEvrPAUwgm5UkW0+2 KAg9Qfx1Cq8DD2cQ2sk41AY+dHDcCy9jJoLaWi4OwTRh3PV6Acgyl8zWs2B/cNqyiJgM QA975aRz0FbJcMtNqBeX7mg6jjgq0NiY9OoKh0joqXUr3kvfKcnSgABQH8Ytm8fSa7Nq 4JyQ== 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=xIjI5eVm7i9hMz69RaSZ1RrZ4Z7gDKVgvE0lCnDW/t9wx3VgwmTc2ME/BhPCTLxfPm WYu7j+p2Pl539+E1J11l4UWsMbaaBHqNmWovNFt+259W6rzInkCfjH0Q7O6ZgnSMUhX5 NwYpSoDRodXiEsoRjpxnpmEVjodZz7OnuGLFt51YmHHgxEN9K2SdytdbONXsIOowsgzJ vSEaFecmE7vifLtoATEX2Xtm7dcm4ni1bPcWtCqxmp9ltXhEwMgzQNMeJeGXUlmJ0o3i Xu2HkFQvcNiin56p+/g90JKAh2Nwsk2gTXQmmZ/UuyUHbiZAtjgakmYOdFXRmr44U7Pb TNDw== 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-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 s2si13543075pfb.39.2018.04.24.07.34.47; Tue, 24 Apr 2018 07:35:04 -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=BNlNXyhi; 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 S933093AbeDXMqk (ORCPT + 99 others); Tue, 24 Apr 2018 08:46:40 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:52389 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933018AbeDXMpi (ORCPT ); Tue, 24 Apr 2018 08:45:38 -0400 Received: by mail-wm0-f67.google.com with SMTP id w195so692296wmw.2 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=huShdS1QogPBa/6EcWMsaFDLlESKDplsX4+P3cNuDitskFFsKbdyFEcEPZ+tz4LYHe PlPS/Q36tRaJ2Z4D1GC6vE6LWbFuPmTQbn2reU4fwFoiVo5pVIUBC1o32vFKHoIfK6MC 8qU1KXiyw4kYnJqiJUKIONFvKALmBL7rPEDu798heJ+XKR3vH8nBbT+RB8dasrob35gP B/zGN2xfuiPVEKFEGZygv14yjcJK6fV7wROVrbFunniRlW7bB4WjI5at5bpPwSXLdIkr PHqqA7RwiIy8f2BSMoKXwewqCxlA0e33HeyUVbRiiyMR/eVTrfvqcaDczJgc43514G+A 5hhw== X-Gm-Message-State: ALQs6tAGzZh07HS6GGLOIyneuA0aJxictHQPePcs9RGW1KMYRS1OoTMT /GyQ4Gcjwlno5kcrxHVKA4u+RA== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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, }, }; -- 2.14.1