mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>,
	mchehab@kernel.org, hans.verkuil@cisco.com
Cc: Maxime Jourdan <mjourdan@baylibre.com>,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v3 5/5] media: meson: vdec: add VP9 decoder support
Date: Thu, 6 Feb 2020 09:08:03 +0100	[thread overview]
Message-ID: <49e6168b-ffed-6011-3b1f-455224d3130b@baylibre.com> (raw)
In-Reply-To: <a4efcb4e1591ac9cf305742d34337335b6ff7f29.camel@ndufresne.ca>

On 03/02/2020 04:11, Nicolas Dufresne wrote:
> Hi Neil,
> 
> Le jeudi 16 janvier 2020 à 14:34 +0100, Neil Armstrong a écrit :
>> From: Maxime Jourdan <mjourdan@baylibre.com>
>>
>> This adds VP9 decoding for the Amlogic GXL, G12A & SM1 SoCs, using
>> the commong "HEVC" HW decoder.
>>
>> For G12A & SM1, it uses the IOMMU support from the firmware.
>>
>> For 10bit decoding, the firmware can only decode in the proprietary
>> Amlogic Framebuffer Compression format, but can output in 8bit NV12
>> buffer while writing the decoded frame.
>>
>> Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>  drivers/staging/media/meson/vdec/Makefile     |    2 +-
>>  drivers/staging/media/meson/vdec/codec_vp9.c  | 2139 +++++++++++++++++
>>  drivers/staging/media/meson/vdec/codec_vp9.h  |   13 +
>>  drivers/staging/media/meson/vdec/hevc_regs.h  |    7 +
>>  drivers/staging/media/meson/vdec/vdec.c       |    5 +
>>  .../staging/media/meson/vdec/vdec_helpers.c   |    4 +
>>  .../staging/media/meson/vdec/vdec_platform.c  |   38 +
>>  7 files changed, 2207 insertions(+), 1 deletion(-)
>>  create mode 100644 drivers/staging/media/meson/vdec/codec_vp9.c
>>  create mode 100644 drivers/staging/media/meson/vdec/codec_vp9.h
>>

[...]

>> diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
>> index e9356a46828f..72a833b1cebd 100644
>> --- a/drivers/staging/media/meson/vdec/vdec_platform.c
>> +++ b/drivers/staging/media/meson/vdec/vdec_platform.c
>> @@ -8,8 +8,10 @@
>>  #include "vdec.h"
>>  
>>  #include "vdec_1.h"
>> +#include "vdec_hevc.h"
>>  #include "codec_mpeg12.h"
>>  #include "codec_h264.h"
>> +#include "codec_vp9.h"
>>  
>>  static const struct amvdec_format vdec_formats_gxbb[] = {
>>  	{
>> @@ -51,6 +53,18 @@ static const struct amvdec_format vdec_formats_gxbb[] = {
>>  
>>  static const struct amvdec_format vdec_formats_gxl[] = {
>>  	{
>> +		.pixfmt = V4L2_PIX_FMT_VP9,
>> +		.min_buffers = 16,
>> +		.max_buffers = 24,
>> +		.max_width = 3840,
>> +		.max_height = 2160,
>> +		.vdec_ops = &vdec_hevc_ops,
>> +		.codec_ops = &codec_vp9_ops,
>> +		.firmware_path = "meson/vdec/gxl_vp9.bin",
> 
> Is there a pull request pending for this firmware ? I could not test as
> this firmware was missing. Note that it could be nice to remove the
> format from the enumeration in that case, as it's very confusing
> initially.

It has been merged yesterday, sorry for the delay.

With maxime's patch, we tested it using ffmpeg master, mpv master with drm-prime
rendering. We have a buildroot repo with the changed needed :

https://gitlab.com/baylibre/amlogic/atv/buildroot-yukawa

I will respin a v4 with the small fix from maxime.

Neil


> 
>> +		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> +		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> +			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> +	}, {
>>  		.pixfmt = V4L2_PIX_FMT_H264,
>>  		.min_buffers = 2,
>>  		.max_buffers = 24,
>> @@ -127,6 +141,18 @@ static const struct amvdec_format vdec_formats_gxm[] = {
>>  
>>  static const struct amvdec_format vdec_formats_g12a[] = {
>>  	{
>> +		.pixfmt = V4L2_PIX_FMT_VP9,
>> +		.min_buffers = 16,
>> +		.max_buffers = 24,
>> +		.max_width = 3840,
>> +		.max_height = 2160,
>> +		.vdec_ops = &vdec_hevc_ops,
>> +		.codec_ops = &codec_vp9_ops,
>> +		.firmware_path = "meson/vdec/g12a_vp9.bin",
>> +		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> +		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> +			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> +	}, {
>>  		.pixfmt = V4L2_PIX_FMT_H264,
>>  		.min_buffers = 2,
>>  		.max_buffers = 24,
>> @@ -165,6 +191,18 @@ static const struct amvdec_format vdec_formats_g12a[] = {
>>  
>>  static const struct amvdec_format vdec_formats_sm1[] = {
>>  	{
>> +		.pixfmt = V4L2_PIX_FMT_VP9,
>> +		.min_buffers = 16,
>> +		.max_buffers = 24,
>> +		.max_width = 3840,
>> +		.max_height = 2160,
>> +		.vdec_ops = &vdec_hevc_ops,
>> +		.codec_ops = &codec_vp9_ops,
>> +		.firmware_path = "meson/vdec/g12a_vp9.bin",
>> +		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> +		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> +			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> +	}, {
>>  		.pixfmt = V4L2_PIX_FMT_H264,
>>  		.min_buffers = 2,
>>  		.max_buffers = 24,
> 


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2020-02-06  8:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 13:34 [PATCH v3 0/5] media: meson: vdec: Add VP9 decoding support Neil Armstrong
2020-01-16 13:34 ` [PATCH v3 1/5] media: meson: vdec: align stride on 32 bytes Neil Armstrong
2020-01-16 13:34 ` [PATCH v3 2/5] media: meson: vdec: add helpers for lossless framebuffer compression buffers Neil Armstrong
2020-01-16 13:34 ` [PATCH v3 3/5] media: meson: vdec: add common HEVC decoder support Neil Armstrong
2020-01-16 13:34 ` [PATCH v3 4/5] media: meson: vdec: add VP9 input support Neil Armstrong
2020-01-24 11:18   ` Maxime Jourdan
2020-01-16 13:34 ` [PATCH v3 5/5] media: meson: vdec: add VP9 decoder support Neil Armstrong
2020-02-03  3:11   ` Nicolas Dufresne
2020-02-06  8:08     ` Neil Armstrong [this message]
2020-02-08 21:19       ` Nicolas Dufresne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49e6168b-ffed-6011-3b1f-455224d3130b@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mjourdan@baylibre.com \
    --cc=nicolas@ndufresne.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®