summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/hantro
AgeCommit message (Collapse)AuthorFilesLines
2019-06-24media: hantro: Use vb2_get_bufferEzequiel Garcia1-3/+5
Use the newly introduced vb2_get_buffer API and avoid accessing buffers in the queue directly. 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-06-21media: hantro: remove an unnecessary NULL checkDan Carpenter1-1/+1
Thus the address of "&ctx->dev->variant->codec_ops[codec_mode]" can't possibly be NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> [hverkuil-cisco@xs4all.nl: rebased after rockchip/vpu -> hantro rename] 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 Zabel4-8/+19
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: add support for separate control blockPhilipp Zabel1-0/+2
On i.MX8MQ/MM a separate control block contains registers for per-core resets, clock gating, and fuse register control. 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: add support for named register rangesPhilipp Zabel2-8/+24
Add support for multiple register ranges with SoC specific names. 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 Zabel4-30/+40
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: hantro: add PM runtime resume callbackPhilipp Zabel2-0/+15
It seems that on i.MX8MQ the power domain controller does not propagate resets to the VPU cores on resume. Add a callback to allow implementing manual reset of the VPU cores after ungating the power domain. 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: print video device name in addition to device nodePhilipp Zabel1-1/+2
It can be helpful to know which video device was registered at which device node. 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 Zabel20-0/+4672
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>