Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp447839pxj; Wed, 2 Jun 2021 03:15:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNAZFnbmASD7APkFd5oLI9ekGnpdO+h1EfLIh49Uhi/dyi5q0/rKBBm9bMYwvzhGG5LDyJ X-Received: by 2002:a50:cd58:: with SMTP id d24mr22381887edj.119.1622628904536; Wed, 02 Jun 2021 03:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622628904; cv=none; d=google.com; s=arc-20160816; b=yk5kKMnGA4JhBtxRgky8E2quNIrTVLIxCTcrCOu3DJqO//2iDnUq9l9EsE/5CotGbK a52UrQzLcX00LdC4TEpant6DlyrLj+qDwaWFQfx8pk73+KWUmElauoqbSKVKwTkp/IHQ 8hqCSD2MaPx6zLBWjVAsStGsc8gkTwn3qMHUdWLa4B8Btf7lei5ijHU0RvV2TN4wNQsU u0RDRaEXwHx8YLtm/3gQSciR97v+nGLqboMhypxO/i/DmzPSCjsDp99ZkkfhqSy1I/XC C7RYpZR5x+v/o/LuD75UDNndzBmANG/tTf+VSs3iHO8Lt9m914vKZYcgTCwoGLRTI+0W ESWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=FWzRnbfqVvfgcr0ooi3vW4RiJLyjwwJA8ILaGIqTI3Q=; b=hGimfGpZdAPSLFGUfc4jI5CDwSpxS52wQtCLI1ZIfEs0jLGy29j+UCBZzGoaQXnqOs wvpMlh4+5YRv6kMj4BAp37ZbguJ6UZmgrZEnZRkIu+rH8Bk3AKlLDN7l7aqkxhKK0JOJ pjszlkKlnWhVxD43m/XrzKI9MsYlSxaVh6xyocxFFiuuyRV+ST5aiWvX92GuaQMZ5BeX rNXcL7D7ZHVb7wobrxJTqf3U118WkKjX2ZMCkDI6v66VycoI0qaRlETFxfbclUV/Efgt aZViNT+m2mNtEHMTSYz2FsdfLZWGg9RmDFBqnHM4mGeISovWHKgM4Ch5/o7SYIQlpCC8 emMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=CLtcCRE1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si1560455edn.21.2021.06.02.03.14.42; Wed, 02 Jun 2021 03:15:04 -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=@xs4all.nl header.s=s2 header.b=CLtcCRE1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbhFBKBZ (ORCPT + 99 others); Wed, 2 Jun 2021 06:01:25 -0400 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:33475 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbhFBKBZ (ORCPT ); Wed, 2 Jun 2021 06:01:25 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id oNezlUEHIIpGyoNf3lPBjw; Wed, 02 Jun 2021 11:59:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1622627981; bh=FWzRnbfqVvfgcr0ooi3vW4RiJLyjwwJA8ILaGIqTI3Q=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=CLtcCRE1R3/NSScca0v4qXC2CqpStwOyQA9voG5JquNyBg62QYQtd0dye+bbpGnrc Qh+lNcAxc4MRD1I8kiTZ9ldFxCATbHELv6a8Hnk5gxO+OUhevZj4y/ZtmuThxcYYMR +slGq1SXqZOa+CEtzVGJVCcXfKDEeuBHKT/iN8LKDUbM2Z1G3rikDe7tF9fblPyYWX 2qM+DvdIU8U/y1aRiAUD8W8S9l+wmzPowh/JL7a54JL9l4761/kfZDbzVhkwRsmHrE fMZfS17GSfaAFc4ZfyaPiWmLHHUZWaWPEwzIB4vX+sh52x2tq8pRST10y0G5r6YMQ4 4JBjHvdJQLVvw== Subject: Re: [PATCH 2/3] venus: Add a handling of QC8C compressed format To: Stanimir Varbanov , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-api@vger.kernel.org Cc: Mauro Carvalho Chehab References: <20210429105815.2790770-1-stanimir.varbanov@linaro.org> <20210429105815.2790770-3-stanimir.varbanov@linaro.org> From: Hans Verkuil Message-ID: Date: Wed, 2 Jun 2021 11:59:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210429105815.2790770-3-stanimir.varbanov@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfKjA6GTJ/+QFuKZ3BFX6a3PWHnRPUSN6SwngD065rvxRykgTC48HDu4i3Er643lTGFixpzLY7OLrvy0Ykn/hPj0T+Eyx2GGeB9NzkPY7jijGlXBlvsNh MP8iJ9EAIRsTXrlSFI++QNR+cj+a+BeMqpjB7ouHr6gOm/XO7bXT+gM7JIbSxQ88nypUSOTFPmyyXV1RjKYDvcYx8d1x2Ykm8kryzZCHmjkN31+ApWK0eqP2 Gu54viWeQVgUdjFQI8ESUrzniK1p7nKu3ZdNATRpOM9lP1KIYDK+3HqWO+jhAluI6GD9LY9SssFUNtvZwqpZDCmvOmitbQz7WjxOSJYBNLheJ9p10ekG2hVl SIocdwNS9fTuvVz6eAq7gGEUkUJth48YjAdk+TAUAN6PZRiWKIc= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/04/2021 12:58, Stanimir Varbanov wrote: > This adds QC8C compressed pixel format in the Venus driver, and > make it enumeratable from v4l2 clients. enumeratable -> possible to discover (or possibly 'enumerable', but I prefer the phrase suggested above) Regards, Hans > > Signed-off-by: Stanimir Varbanov > --- > drivers/media/platform/qcom/venus/helpers.c | 2 ++ > drivers/media/platform/qcom/venus/vdec.c | 12 +++++++++++- > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c > index 9b8ff76e3c43..3a0b07d237a5 100644 > --- a/drivers/media/platform/qcom/venus/helpers.c > +++ b/drivers/media/platform/qcom/venus/helpers.c > @@ -561,6 +561,8 @@ static u32 to_hfi_raw_fmt(u32 v4l2_fmt) > return HFI_COLOR_FORMAT_NV12; > case V4L2_PIX_FMT_NV21: > return HFI_COLOR_FORMAT_NV21; > + case V4L2_PIX_FMT_QC8C: > + return HFI_COLOR_FORMAT_NV12_UBWC; > default: > break; > } > diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c > index 5e5584fc21e9..d4cc51fc019c 100644 > --- a/drivers/media/platform/qcom/venus/vdec.c > +++ b/drivers/media/platform/qcom/venus/vdec.c > @@ -31,6 +31,10 @@ > */ > static const struct venus_format vdec_formats[] = { > { > + .pixfmt = V4L2_PIX_FMT_QC8C, > + .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, > @@ -696,7 +700,13 @@ static int vdec_output_conf(struct venus_inst *inst) > inst->output2_buf_size = > venus_helper_get_framesz_raw(out2_fmt, width, height); > > - if (is_ubwc_fmt(out_fmt)) { > + if (is_ubwc_fmt(out_fmt) && is_ubwc_fmt(out2_fmt)) { > + inst->output2_buf_size = 0; > + inst->opb_buftype = HFI_BUFFER_OUTPUT; > + inst->opb_fmt = out_fmt; > + inst->dpb_buftype = 0; > + inst->dpb_fmt = 0; > + } else if (is_ubwc_fmt(out_fmt)) { > inst->opb_buftype = HFI_BUFFER_OUTPUT2; > inst->opb_fmt = out2_fmt; > inst->dpb_buftype = HFI_BUFFER_OUTPUT; >