mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Detlev Casanova <detlev.casanova@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: Detlev Casanova <detlev.casanova@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, kernel@collabora.com
Subject: [PATCH v2 00/12] media: rkvdec: Add support for VDPU381 and VDPU383
Date: Fri,  8 Aug 2025 16:03:22 -0400	[thread overview]
Message-ID: <20250808200340.156393-1-detlev.casanova@collabora.com> (raw)

These variants are found respectively in the RK3588 and RK3576 SoCs.
This patch only adds support for H264 and H265 in both variants.

As there is a considerable part of the code that can be shared with the
already supported rkvdec decoder driver, the support for these variants
is added here rather than writing a new driver.

This patch set uses the newly introduced hevc_ext_sps_[ls]t_rps v4l2
controls for HEVC [1].
Therefore, a patched version of userpace tools is needed for HEVC
support (added for GStreamer[2] and in an early stage for FFmpeg[3]).

This patch set also depends on the preparation patch set sent earlier [4]
as well as the iommu restore fix [5] (already merged in linux-media) and
Nicolas Frattaroli's bitmap patch [6] to support setting registers that
uses upper 16 bits as masks.

[1]: https://lore.kernel.org/all/20250807194327.69900-1-detlev.casanova@collabora.com/
[2]: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9355
[3]: https://gitlab.collabora.com/detlev/ffmpeg
[4]: https://lore.kernel.org/all/20250623160722.55938-1-detlev.casanova@collabora.com/
[5]: https://lore.kernel.org/all/20250508-rkvdec-iommu-reset-v1-1-c46b6efa6e9b@collabora.com/
[6]: https://lore.kernel.org/all/20250623-byeword-update-v2-1-cf1fc08a2e1f@collabora.com/

Changes since v1:
 - Add parsing of the short and long term ref frame sets from the new v4l2
   controls
 - Add RPS cache to avoid parsing the same data again
 - Fix HEVC pixel formats selection
 - Fix multiple indentation errors

Detlev Casanova (12):
  media: rkvdec: Switch to using structs instead of writel
  media: rkvdec: Move cabac table to its own source file
  media: rkvdec: Use structs to represent the HW RPS
  media: rkvdec: Move h264 functions to common file
  media: rkvdec: Add per variant configuration
  media: rkvdec: Add RCB and SRAM support
  media: rkvdec: Support per-variant interrupt handler
  media: rkvdec: Enable all clocks without naming them
  media: rkvdec: Add H264 support for the VDPU381 variant
  media: rkvdec: Add H264 support for the VDPU383 variant
  media: rkvdec: Add HEVC support for the VDPU381 variant
  media: rkvdec: Add HEVC support for the VDPU383 variant

 .../media/platform/rockchip/rkvdec/Kconfig    |    1 +
 .../media/platform/rockchip/rkvdec/Makefile   |   13 +-
 .../platform/rockchip/rkvdec/rkvdec-cabac.c   | 3944 +++++++++++++++++
 .../rockchip/rkvdec/rkvdec-h264-common.c      |  253 ++
 .../rockchip/rkvdec/rkvdec-h264-common.h      |   81 +
 .../platform/rockchip/rkvdec/rkvdec-h264.c    |  891 +---
 .../rockchip/rkvdec/rkvdec-hevc-common.c      |  511 +++
 .../rockchip/rkvdec/rkvdec-hevc-common.h      |  101 +
 .../platform/rockchip/rkvdec/rkvdec-rcb.c     |  174 +
 .../platform/rockchip/rkvdec/rkvdec-rcb.h     |   29 +
 .../platform/rockchip/rkvdec/rkvdec-regs.h    |  567 ++-
 .../rockchip/rkvdec/rkvdec-vdpu381-h264.c     |  469 ++
 .../rockchip/rkvdec/rkvdec-vdpu381-hevc.c     |  596 +++
 .../rockchip/rkvdec/rkvdec-vdpu381-regs.h     |  427 ++
 .../rockchip/rkvdec/rkvdec-vdpu383-h264.c     |  582 +++
 .../rockchip/rkvdec/rkvdec-vdpu383-hevc.c     |  688 +++
 .../rockchip/rkvdec/rkvdec-vdpu383-regs.h     |  284 ++
 .../platform/rockchip/rkvdec/rkvdec-vp9.c     |  230 +-
 .../media/platform/rockchip/rkvdec/rkvdec.c   |  569 ++-
 .../media/platform/rockchip/rkvdec/rkvdec.h   |   39 +
 20 files changed, 9260 insertions(+), 1189 deletions(-)
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-cabac.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-h264-common.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-h264-common.h
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.h
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-rcb.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-rcb.h
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu381-h264.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu381-hevc.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu381-regs.h
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-h264.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-hevc.c
 create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-regs.h

-- 
2.50.1


             reply	other threads:[~2025-08-08 20:03 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08 20:03 Detlev Casanova [this message]
2025-08-08 20:03 ` [PATCH v2 01/12] media: rkvdec: Switch to using structs instead of writel Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 02/12] media: rkvdec: Move cabac table to its own source file Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 03/12] media: rkvdec: Use structs to represent the HW RPS Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 04/12] media: rkvdec: Move h264 functions to common file Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 05/12] media: rkvdec: Add per variant configuration Detlev Casanova
2025-08-11  6:13   ` Krzysztof Kozlowski
2025-08-11 13:52     ` Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 06/12] media: rkvdec: Add RCB and SRAM support Detlev Casanova
2025-08-11  6:13   ` Krzysztof Kozlowski
2025-08-11 13:54     ` Detlev Casanova
2025-08-11 14:01       ` Krzysztof Kozlowski
2025-08-11 18:44         ` Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 07/12] media: rkvdec: Support per-variant interrupt handler Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 08/12] media: rkvdec: Enable all clocks without naming them Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 09/12] media: rkvdec: Add H264 support for the VDPU381 variant Detlev Casanova
2025-08-12 17:07   ` Dmitry Osipenko
2025-09-20 15:00   ` Diederik de Haas
2025-09-20 16:15     ` Jonas Karlman
2025-09-20 18:06       ` Diederik de Haas
2025-08-08 20:03 ` [PATCH v2 10/12] media: rkvdec: Add H264 support for the VDPU383 variant Detlev Casanova
2025-08-09 11:53   ` kernel test robot
2025-08-11 18:28   ` Nicolas Dufresne
2025-08-08 20:03 ` [PATCH v2 11/12] media: rkvdec: Add HEVC support for the VDPU381 variant Detlev Casanova
2025-08-09 13:17   ` kernel test robot
2025-09-20 15:07   ` Diederik de Haas
2025-09-20 16:23     ` Jonas Karlman
2025-09-22 14:19       ` Nicolas Dufresne
2025-09-29 12:47     ` Detlev Casanova
2025-08-08 20:03 ` [PATCH v2 12/12] media: rkvdec: Add HEVC support for the VDPU383 variant Detlev Casanova
2025-08-11  9:56 ` [PATCH v2 00/12] media: rkvdec: Add support for VDPU381 and VDPU383 Heiko Stübner
2025-08-11 16:33   ` Detlev Casanova
2025-08-12  7:20 ` Piotr Oniszczuk
2025-09-17 17:34 ` Diederik de Haas
2025-09-18 13:31   ` 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=20250808200340.156393-1-detlev.casanova@collabora.com \
    --to=detlev.casanova@collabora.com \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    /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®