If 'rockchip_pm_add_one_domain' fails, then 'qos_is_need_init[0]'
should be freed, otherwise, there is a memory leak.
Fixes: 2047231d24 ("soc: rockchip: power-domain: support qos init")
Change-Id: Id2ec5c4b7cbc53a5491f348eeba1fd526018875d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Instead of open coding the polling of the lock status, use the
handy regmap_read_poll_timeout for this. As the pll locking is
normally blazingly fast and we don't want to incur additional
delays, we're not doing any sleeps similar to for example the imx
clk-pllv4 and define a very safe but still short timeout of 1ms.
Link: https://lore.kernel.org/r/20200129163821.1547295-2-heiko@sntech.de
(cherry picked from commit 3507df1a46
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next)
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I39fe50d701580532f9a994266e088a909a98c985
Instead of open coding the polling of the lock status, use the handy
readl_relaxed_poll_timeout for this. As the pll locking is normally
blazingly fast and we don't want to incur additional delays, we're
not doing any sleeps similar to for example the imx clk-pllv4
and define a very safe but still short timeout of 1ms.
Link: https://lore.kernel.org/r/20200129163821.1547295-1-heiko@sntech.de
(cherry picked from commit bf4237a188
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next)
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I291bd7085e628a22bbe3877fd4961498c58c4d85
The rk3036 pll type exposes its lock status in both its pllcon registers
as well as the General Register Files. To remove one dependency convert
it to the "internal" lock status, similar to how rk3399 handles it.
Link: https://lore.kernel.org/r/20200129163821.1547295-3-heiko@sntech.de
(cherry picked from commit 7f6ffbb885
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next)
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I1e1d1c96dacf936b8f314ba246b4dd8bf4d8b8a9
add support following color space:
V4L2_COLORSPACE_SMPTE240M
V4L2_COLORSPACE_470_SYSTEM_M
V4L2_COLORSPACE_470_SYSTEM_BG
now can support following color space:
bt601 limit:
V4L2_COLORSPACE_SMPTE170M
V4L2_COLORSPACE_470_SYSTEM_M
V4L2_COLORSPACE_470_SYSTEM_BG
bt601 full:
V4L2_COLORSPACE_JPEG
bt709 limit:
V4L2_COLORSPACE_SMPTE240M
V4L2_COLORSPACE_REC709
V4L2_COLORSPACE_DEFAULT
bt2020:
V4L2_COLORSPACE_BT2020
Change-Id: Ia51b7aa9959f69efdd8bad3371395b2fceaccaaa
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This patch enable the logo function of DSI.
At the same time, when the panel is initialized in uboot,
We need set the power boot on to avoid black screen.
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I258b395ca676b8a3b41cd23e5db442c521256063
Building IOMMU drivers as modules requires that the core IOMMU API
symbols are exported as GPL symbols.
Signed-off-by: Will Deacon <will@kernel.org>
Tested-by: John Garry <john.garry@huawei.com> # smmu v3
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Change-Id: Ib06e99673ebcf2bf6524712c335965dca6d4bdbe
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit a7ba5c3d00)
rv1109-38-v10-spi-nand is a spi nand,rmii gmac phy,os04a10 board.
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ie4d3de1f87aee1d630152de95b43714234d32932
this is only used to compatibility with old hwc code
Change-Id: Idcf2ca235d320656adf20d010dcd3a3940159c0d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
we use new method to implement vop win lite multi area support.
This reverts commit 8b19e980a6.
Change-Id: I2b5ac07ba38fdb416291635719d0634b7824268c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
like rk3288/rk3399/px30 win lite, the hardware can support multi area,
we register them as normally plane to drm framwork, but they have some limitations:
one group a multi areas need use same zpos, they can't overlap, etc.
so we add SHARE_ID prop to identy them.
Change-Id: Ia814e6b0896f0e74a53193afe6642eff145da562
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
use rockchip_drm_sub_dev_list to manage rockchip drm sub dev and record
connector, offer new method to find connector through the sub_dev_list.
Change-Id: If9508cf9ff51f6f9e1d13c42c60491f4aec4b9c1
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Refer to USB 2.0 spec, if a transfer with size divisible to EPs max
packet size and with req->zero field is set, which means that after
data is transfered it is also should be transfered a zero length packet
at the end.
For uvc bulk in transfer, it only sets the req->zero flag to enable
sent the zero length packet to USB Host if the video->payload_size
equal to video->max_payload_size. However, this condition is not
enough, because if the image size is more than the max_payload_size,
the image will be split to several transaction, and if the payload_size
at the last transaction is less than then max_payload_size, it will
not enable the zero length packet xfer.
This patch sets the req->zero flag if the whole image has been
transferred.
Change-Id: I9a62a8b1df0e44b4291b6add664357d148c19d1f
Signed-off-by: William Wu <william.wu@rock-chips.com>
The sub devices of rkisp will allocate memory from rkisp before the
reserved memory been assigned to rkisp, and will alloc from default
continuous cma memory region instead.
The current system may never do free these memory, so the issue when
to free these memory can not happen.
Fix free issue by moving the assign memory earlier.
Also return error if failed to assign reserved memory since driver
has no iommu.
Change-Id: I4bd3437e5536bda827c6ca71d630a993fcce2d8d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>