When the clients are 32 bits while the kernel is 64 bits,
we need to translate the memory address before accessing.
The previous commit was refreshed by ddk update.
Change-Id: I7f47ab94da258e9d170613252aae9b396623cf48
Signed-off-by: Randy Li <randy.li@rock-chips.com>
user_atom.atom_number can be indirectly controlled by user-space,
hence leading to a potential exploitation
of the Spectre variant 1 vulnerability.
This issue was detected with the help of Smatch:
drivers/gpu/arm/midgard/mali_kbase_jd.c:1397 kbase_jd_submit() warn:
potential spectre issue 'jctx->atoms' [r]
katom = &jctx->atoms[user_atom.atom_number];
Fix this by sanitizing user_atom.atom_number
before 'katom = &jctx->atoms[user_atom.atom_number];'.
Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
Fixes: 5cf27d0b60 ("Mali: midgard: changes to enlarge BASE_JD_ATOM_COUNT to 512, for defect 184210")
Change-Id: If52f30d29a80a06c6693ddadd5947ab9fe8fbc25
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The source code of mali_so must be modified correspondingly.
Change-Id: I3f4bd03fa2d369d912e6bc05c53d2d3abefb92d3
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
4.4 kernel inno hdmi phy name is "hdmi_phy".
4.19 kernel inno hdmi phy name is "hdmi".
Change-Id: Ie87aa205c89154b417887a84703ce7bd9ffb2c7f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Parts of the modifications are borrowed from Mali Bifrost DDK r13.
Change-Id: I82c68041a3185063ae2d8a40a7a7c17feaab0733
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Mali driver only search the first compatible property.
Change-Id: If21b59d19a50e48a02157f49a6a97d7e71a41e7d
Signed-off-by: Zhixiong Lin <zhixiong.lin@rock-chips.com>
Mali sync timeline in Utgard DDK r7p0-00rel1 depends on CONFIG_SYNC.
But, CONFIG_SYNC is no longer supported by kernel v4.19.
This modification is from ARM release:DX910-SW-99002-r9p0-01rel0.tgz
Change-Id: I2f2b36c57132ebc49cc8235b2d071ed6ed540825
Signed-off-by: Zhixiong Lin <zhixiong.lin@rock-chips.com>
1. use the same mutex to serialize the calls from user application.
2. keep iommu attached state when last video is closed,
because the user application may still access the buffer allocated
by v4l2 driver.
Change-Id: I667a42a07672e5d30cc4383e9f54388fe1b91f1c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
support read 8/16bit bayer raw and yuv422 format
from memory to isp.
Change-Id: I771a1a9c366a6721323815e811668472996a3355
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
enable AWB AF irq, to send measurement alone.
AEC and HIST need to get together, do it in
frame end.
Change-Id: I7d955eccfd4080865fa4c4f260a1e3c44f9585e1
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
isp_mipi_ctrl[8:11] control synopsys dphy's SHUTDOWNZ
and RSTZ. stop mipi and dphy together.
Change-Id: Ief50ab81f5f960e414a880e43b772ee47752742b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
when use hdmi-in chip with isp, it needs to pull out/plug in hdmi cable
when stream is on.
many error logs are reported in interrupt function when pull out/plug in
hdmi cable, then the system will be dead.
so we stop isp when too many error logs are reported.
Change-Id: Ic19eddfc952954a11a176b91c16ce4c9b6372418
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
fix following camera err:
rkisp1: CIF_ISP_PIC_SIZE_ERROR (0x00000002)
Change-Id: I6168d352d521cf75d7537ffe70a9af6f2ec07282
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
V4L2_BUF_TYPE_META_OUTPUT was added by commit 72148d1a57
("media: v4l: Add support for V4L2_BUF_TYPE_META_OUTPUT") but the patch
missed adding the type to the macro telling whether a given type is an
output type or not. Do that now. Getting this wrong leads to handling the
buffer as a capture buffer in a lot of places.
Fixes: 72148d1a57 ("media: v4l: Add support for V4L2_BUF_TYPE_META_OUTPUT")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
(cherry picked from commit 4b837c6d7e)
Change-Id: I963f70c8ea7bfff8ce9818fda1d558780d99f697
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>