Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1289470pxy; Thu, 29 Apr 2021 04:00:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEMvqKuCOE4zqnp+Q+f481b8fDdIsJLPls2J4xWQPks5cX0JZpSdjzNrHIHl7ZxYJ0u3Wv X-Received: by 2002:a17:906:f8d9:: with SMTP id lh25mr15582562ejb.88.1619694029751; Thu, 29 Apr 2021 04:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619694029; cv=none; d=google.com; s=arc-20160816; b=r8tckNkRoHt7Ryu/BgVunGdwnKU1P22KndSBMw2bPIUnI2gjzzBi08jg0zV5I1tsFr g4lY3/8RqipkeYkni/s47NEOjq+s1wHsOvnV4RNaJD3ao4RgYrX8jiDesB4+CkU/+FBq pTsr40ZcIaNqtrzDvSedzMIwZr5EMKPhPEu2PY2N27jdukD79/Lq/xsWQBhTJD3FK2or P4Xt34jKWpO+3v+vE+e/WnIz8vFrvuPtAn9K+GvY887VKxVP6k6JooFpCe9wbMTT3K5l Ei/exumP7wBWmVAcH3tn6P6+WiUeCg+Xyr3l8tf3isVT+kTbbvjhUmexgUCfvaEm8Y/G kACA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yX68PnWt82JqqvaIeLqptsXuqqdgzkaoY2lNx9HH3fE=; b=tqAl3njhm5mJe4gxLeqysJ7tvUzY6BKVaD1ye5DCYbTPbEC6TWl5IyDwUUgKPquyF9 g8EmQOTqxVUZHmEP/2XUIPxXCfJde/OfPY5tuz3MK1ZrJa+f/qYlTkdZGearb32qSw++ bvpOuhextm8OtlLVNI7Fhz8ob8/4rT7dk4hdtboCjazeUMyOF/s0PQTQSpHHqTVRQuSX v1+czMqCEduVUe42G/RM08OpIIH3Uce+O6ch9W1pzZmxEyNM/omVlYfcxXknAarQUJCV 945EX42tDWeidgUxPbIlPXVYyJquAgUf1pScBlGF+unj3P1xd3XRE7JoDzfW/nytUFTU cgog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YnzwceP8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id gf2si3358809ejb.500.2021.04.29.04.00.06; Thu, 29 Apr 2021 04:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YnzwceP8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S240615AbhD2K7V (ORCPT + 99 others); Thu, 29 Apr 2021 06:59:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233114AbhD2K7M (ORCPT ); Thu, 29 Apr 2021 06:59:12 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3403BC061345 for ; Thu, 29 Apr 2021 03:58:24 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id t18so8841781wry.1 for ; Thu, 29 Apr 2021 03:58:24 -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 :mime-version:content-transfer-encoding; bh=yX68PnWt82JqqvaIeLqptsXuqqdgzkaoY2lNx9HH3fE=; b=YnzwceP8U0S+indgF5DyHzwNq2c7+3xad5HCdpCKnt9ggc3qbEePi6z1EFXJw8euGh NFrMIWqPIsbzGJRD38ByKvpOupj7Z1WYwU7/6mZQ4Y5izinBcVqtloOPrA69PGA0Grn+ nXejj9KUG8Sd2BuF0VPqQJiQ2SYDH1tS20jqgZ5nAwYv6fPNSO44jCUGxXhcGvw+3fUw qysIYirnk50gA/MrIaAwR+F69aXvKVae9x28EomHs6q6xCp5pXKU6EU/ZU41saoMkoGm AzLiZTUtsdoieqlqd2GGbaIWLwHo+IcwwlhmTBLKV602ZMe5aehkTnDbHJGQ1JkR+525 XMfQ== 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:mime-version:content-transfer-encoding; bh=yX68PnWt82JqqvaIeLqptsXuqqdgzkaoY2lNx9HH3fE=; b=Xm76OjI0gt59T0nIt9fgElE+GRvXK5YP2at7h6k7WJPMdizu1KEGeA7TLebdGrZP3s IXlQqZFwQUcCJL+KdMp49mnLmpje3hb9rYqos1NQWcpwgnd5aCLCWFt12dHPKQ/KgCEL 3S0PGsf2LA+wJ0Wu6oARX8azJvXB5GBikxCioFtzGJ3EConAQCtrjMFXmKOrqARkACut E8Qjpuyh2PhfUteoFODOP0bDSKxmA5fZLtLHhPDAC4VFkGD++FQOxeUxpMn9UkaUgHXH OtNbWCL0RO2zIObPvFaKowEY21AjODkLqLb4uXuloqpwWX08bWF/J6iUr3YGYqIXCv+Y 9h4w== X-Gm-Message-State: AOAM53098OlAewnzgol5iTbcSOVqr+/HFmkfxYL6pX0bu2YseJJnkYDM WNaAUxi3L7B0MwMGLHD7gbfYCg== X-Received: by 2002:a5d:60cd:: with SMTP id x13mr21575236wrt.377.1619693902996; Thu, 29 Apr 2021 03:58:22 -0700 (PDT) Received: from localhost.localdomain (hst-221-29.medicom.bg. [84.238.221.29]) by smtp.gmail.com with ESMTPSA id a9sm3372903wmj.1.2021.04.29.03.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 03:58:22 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-api@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Stanimir Varbanov Subject: [PATCH 3/3] venus: Add a handling of QC10C compressed format Date: Thu, 29 Apr 2021 13:58:15 +0300 Message-Id: <20210429105815.2790770-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429105815.2790770-1-stanimir.varbanov@linaro.org> References: <20210429105815.2790770-1-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds QC10C compressed pixel format in the Venus driver, and make it enumeratable from v4l2 clients. Note: The QC10C format shouldn't be possible to enumerate by the client if the decoded bitstream is not 10bits. This is not implemented in this patch yet. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 2 ++ drivers/media/platform/qcom/venus/vdec.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 3a0b07d237a5..58bf2e0654ce 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -563,6 +563,8 @@ static u32 to_hfi_raw_fmt(u32 v4l2_fmt) return HFI_COLOR_FORMAT_NV21; case V4L2_PIX_FMT_QC8C: return HFI_COLOR_FORMAT_NV12_UBWC; + case V4L2_PIX_FMT_QC10C: + return HFI_COLOR_FORMAT_YUV420_TP10_UBWC; default: break; } diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index d4cc51fc019c..7ad8cd66b8bc 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -35,6 +35,10 @@ static const struct venus_format vdec_formats[] = { .num_planes = 1, .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, }, { + .pixfmt = V4L2_PIX_FMT_QC10C, + .num_planes = 1, + .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, + },{ .pixfmt = V4L2_PIX_FMT_NV12, .num_planes = 1, .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, @@ -1508,7 +1512,7 @@ static const struct hfi_inst_ops vdec_hfi_ops = { static void vdec_inst_init(struct venus_inst *inst) { inst->hfi_codec = HFI_VIDEO_CODEC_H264; - inst->fmt_out = &vdec_formats[6]; + inst->fmt_out = &vdec_formats[8]; inst->fmt_cap = &vdec_formats[0]; inst->width = frame_width_min(inst); inst->height = ALIGN(frame_height_min(inst), 32); -- 2.25.1