media: platform: drop vb2_ops_wait_prepare/finishSince commit 88785982a19d ("media: vb2: use lock if wait_prepare/finishare NULL") it is no longer needed to set the wait_prepare/finishvb2_ops cal
media: platform: drop vb2_ops_wait_prepare/finishSince commit 88785982a19d ("media: vb2: use lock if wait_prepare/finishare NULL") it is no longer needed to set the wait_prepare/finishvb2_ops callbacks as long as the lock field in vb2_queue is set.Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,we can safely drop these callbacks.This simplifies the code and this is a step towards the goal of deletingthese callbacks.Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> # for meson-ge2dAcked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
show more ...
media: Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implement forpla
media: Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implement forplatform drivers.Convert all platform drivers below drivers/media to use .remove(), withthe eventual goal to drop struct platform_driver::remove_new(). As.remove() and .remove_new() have the same prototypes, conversion is doneby just changing the structure member name in the driver initializer.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: mediatek: vcodec: avoid -Wcast-function-type-strict warningThe ipi handler here tries hard to maintain const-ness of its argument,but by doing that causes a warning about function type cast
media: mediatek: vcodec: avoid -Wcast-function-type-strict warningThe ipi handler here tries hard to maintain const-ness of its argument,but by doing that causes a warning about function type casts:drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c:38:32: error: cast from 'mtk_vcodec_ipi_handler' (aka 'void (*)(void *, unsigned int, void *)') to 'ipi_handler_t' (aka 'void (*)(const void *, unsigned int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 38 | ipi_handler_t handler_const = (ipi_handler_t)handler; | ^~~~~~~~~~~~~~~~~~~~~~Remove the hack and just use a non-const argument.Fixes: bf1d556ad4e0 ("media: mtk-vcodec: abstract firmware interface")Signed-off-by: Arnd Bergmann <arnd@arndb.de>Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: Explicitly include correct DT includesThe DT of_device.h and of_platform.h date back to the separateof_platform_bus_type before it as merged into the regular platform bus.As part of that m
media: Explicitly include correct DT includesThe DT of_device.h and of_platform.h date back to the separateof_platform_bus_type before it as merged into the regular platform bus.As part of that merge prepping Arm DT support 13 years ago, they"temporarily" include each other. They also include platform_device.hand of.h. As a result, there's a pretty much random mix of those includefiles used throughout the tree. In order to detangle these headers andreplace the implicit includes with struct declarations, users need toexplicitly include the correct includes.Signed-off-by: Rob Herring <robh@kernel.org>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: platform: mdp: mark OF related data as maybe unusedThe driver can be compile tested with !CONFIG_OF making certain dataunused: drivers/media/platform/mediatek/mdp/mtk_mdp_core.c:31:34: e
media: platform: mdp: mark OF related data as maybe unusedThe driver can be compile tested with !CONFIG_OF making certain dataunused: drivers/media/platform/mediatek/mdp/mtk_mdp_core.c:31:34: error: ‘mtk_mdp_comp_dt_ids’ defined but not used [-Werror=unused-const-variable=]Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
media: mtk_mdp_core: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do
media: mtk_mdp_core: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do error handling byreturning an error code. However the value returned is (mostly) ignoredand this typically results in resource leaks. To improve here there is aquest to make the remove callback return void. In the first step of thisquest all drivers are converted to .remove_new() which already returnsvoid.Trivially convert this driver from always returning zero in the removecallback to the void returning variant.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: Switch to use dev_err_probe() helperIn the probe path, dev_err() can be replaced with dev_err_probe()which will check if error code is -EPROBE_DEFER.Reviewed-by: Sean Young <sean@mess.org
media: Switch to use dev_err_probe() helperIn the probe path, dev_err() can be replaced with dev_err_probe()which will check if error code is -EPROBE_DEFER.Reviewed-by: Sean Young <sean@mess.org>Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignmentThe mdp_ipi_comm structure defines a command that is eitherPROCESS (start processing) or DEINIT (destroy instance); weare using this
media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignmentThe mdp_ipi_comm structure defines a command that is eitherPROCESS (start processing) or DEINIT (destroy instance); weare using this one to send PROCESS or DEINIT commands from Linuxto an MDP instance through a VPU write but, while the first wantsus to stay 4-bytes aligned, the VPU instead requires an 8-bytesdata alignment.Keeping in mind that these commands are executed immediatelyafter sending them (hence not chained with others before theVPU/MDP "actually" start executing), it is fine to simply adda padding of 4 bytes to this structure: this keeps the sameperformance as before, as we're still stack-allocating it,while avoiding hackery inside of mtk-vpu to ensure alignmentbringing a definitely bigger performance impact.Fixes: c8eb2d7e8202 ("[media] media: Add Mediatek MDP Driver")Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>Reviewed-by: Houlong Wei <houlong.wei@mediatek.com>Reviewed-by: Irui Wang <irui.wang@mediatek.com>Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
media: platform: rename mediatek/mtk-jpeg/ to mediatek/jpeg/As the end goal is to have platform drivers split by vendor,rename mediatek/mtk-jpeg/ to mediatek/jpeg/.Requested-by: AngeloGioacchino
media: platform: rename mediatek/mtk-jpeg/ to mediatek/jpeg/As the end goal is to have platform drivers split by vendor,rename mediatek/mtk-jpeg/ to mediatek/jpeg/.Requested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>