WSL2-Linux-Kernel/drivers/media
AngeloGioacchino Del Regno 7404d09455 media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment
[ Upstream commit ab14c99c03 ]

The mdp_ipi_comm structure defines a command that is either
PROCESS (start processing) or DEINIT (destroy instance); we
are using this one to send PROCESS or DEINIT commands from Linux
to an MDP instance through a VPU write but, while the first wants
us to stay 4-bytes aligned, the VPU instead requires an 8-bytes
data alignment.

Keeping in mind that these commands are executed immediately
after sending them (hence not chained with others before the
VPU/MDP "actually" start executing), it is fine to simply add
a padding of 4 bytes to this structure: this keeps the same
performance as before, as we're still stack-allocating it,
while avoiding hackery inside of mtk-vpu to ensure alignment
bringing a definitely bigger performance impact.

Fixes: c8eb2d7e82 ("[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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:23:28 +02:00
..
cec media: cec-adap.c: fix is_configuring state 2022-06-09 10:22:38 +02:00
common media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach() 2022-01-27 11:04:42 +01:00
dvb-core media: dmxdev: fix UAF when dvb_register_device() fails 2022-01-27 11:03:14 +01:00
dvb-frontends media: dib8000: Fix a memleak in dib8000_init() 2022-01-27 11:03:29 +01:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:13:30 +01:00
i2c media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR() 2022-06-09 10:22:59 +02:00
mc media: mc-device.c: use DEVICE_ATTR_RO() helper macro 2021-08-04 14:43:50 +02:00
mmc
pci media: tw686x: Fix memory leak in tw686x_video_init 2022-08-17 14:23:24 +02:00
platform media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment 2022-08-17 14:23:28 +02:00
radio media: si470x-i2c: fix possible memory leak in si470x_i2c_probe() 2022-01-27 11:03:20 +01:00
rc media: ir_toy: prevent device from hanging during transmit 2022-07-12 16:34:52 +02:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 19:16:27 +01:00
test-drivers media: vidtv: Check for null return of vzalloc 2022-04-08 14:23:20 +02:00
tuners media: msi001: fix possible null-ptr-deref in msi001_probe() 2022-01-27 11:03:36 +01:00
usb media: hdpvr: fix error value returns in hdpvr_read 2022-08-17 14:23:23 +02:00
v4l2-core media: v4l2-mem2mem: prevent pollerr when last_buffer_dequeued is set 2022-08-17 14:23:23 +02:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2022-01-27 11:05:20 +01:00
Makefile