summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/hantro/rk3399_vpu_hw.c
AgeCommit message (Collapse)AuthorFilesLines
2021-06-17media: hantro: merge Rockchip platform driversAlex Bee1-222/+0
Merge the two Rockchip platform drivers into one as it was suggested at [1] and [2]. This will hopefully make it easier to add new variants (which are surely to come for Rockchip). Also rename from "rk3288" to "v(d/e)pu1" and "rk3399" to "v(d/e)pu2" where applicable, as this is the dicition the vendor uses and will also refelect the variants that get added later in this series. Rename from "rk3288" to "rockchip" if applicable to both hardware versions. [1] https://patchwork.kernel.org/project/linux-rockchip/patch/20210107134101.195426-6-paul.kocialkowski@bootlin.com/ [2] https://patchwork.kernel.org/project/linux-rockchip/patch/20210525152225.154302-5-knaerzche@gmail.com/ Signed-off-by: Alex Bee <knaerzche@gmail.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-07-19hantro: Remove unused bytesused argumentEzequiel Garcia1-4/+3
The driver doesn't need the bytesused argument. For decoders, the plane bytesused is known and therefore, buf_prepare is used to set it. For encoders, it's handled by the codec_ops.done hook. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-10-01media: hantro: Simplify macroblock macrosEzequiel Garcia1-6/+6
It seems all codecs are using a 16x16 size macroblock, and so it's possible to have just one set of macroblock macros. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-26media: hantro: Enable VP8 decoding on RK3328Jonas Karlman1-1/+1
RK3328 SoC has the same decoder IP block as RK3399, lets enable VP8 decoding on RK3328. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: hantro: Support RK3399 VP8 decodingJeffy Chen1-1/+21
Rockchip RK3399 SoC has the same Hantro G1 IP block as RK3288, but the registers are entirely different. In a similar fashion as MPEG-2 decoding, it's simpler to just add a separate implementation. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-22media: hantro: Add support for MPEG-2 decoding on RK3328Jonas Karlman1-0/+17
Add necessary bits to support MPEG2 decoding on RK3328. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-12media: hantro: allow arbitrary number of clocksPhilipp Zabel1-2/+6
Dynamically allocate clocks and move clock names out of struct hantro_variant. This lifts the four clock limit and allows to use ARRAY_SIZE() to fill .num_clocks to reduce the risk of mismatches. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-12media: hantro: make irq names configurablePhilipp Zabel1-2/+7
The i.MX8MQ bindings will use different IRQ names ("g1" instead of "vdpu", and "g2"), so make them configurable. This also allows to register more than two IRQs, which will be required for i.MX8MM support later (it will add "h1" instead of "vepu"). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-12media: rockchip/vpu: rename from rockchip to hantroPhilipp Zabel1-0/+177
Rename the driver and all relevant identifiers from Rockchip to Hantro, as other Hantro IP based VPU implementations can be supported by the same driver. The RK3288 decoder is Hantro G1 based, the encoder is Hantro H1. This patch just renames, no functional changes. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>