The hsync of some timings maybe bigger than 300.
If get hsync error, it could be very large, so we
think that is error if it's bigger than 500.
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I57e8b462c3a224ba402d8ab1c20fd2c4c0f77a2c
Update all 64bit rockchip devicetree files to use SPDX-License-Identifiers.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ie983cca0d54cae8b5ad6d322d51eb7bbd265aa0a
HDMIRX and HDMITX cec cannot enable at the same time.
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I825c552a57dd795d358108f95a1dc24391aa3f93
CONFIG_VIDEO_RK_IRCUT need config for imx415 module with rk3588 evb1
otherwise camera can't work in GKI mode
Because GKI does not compile __v4l2_async_notifier_clr_unready_dev,
the link relationship will be established only after all devices
on the dts link are registered
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib7e244e0ab7ea1f19e4247ce0731f2a588c1d382
drivers/video/rockchip/rga3/rga_drv.c:1036:3: error: implicit declaration of function 'rga_power_enable_all' [-Werror=implicit-function-declaration]
rga_power_enable_all();
^~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1040:3: error: implicit declaration of function 'rga_power_disable_all' [-Werror=implicit-function-declaration]
rga_power_disable_all();
^~~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c: In function 'rga_drv_probe':
drivers/video/rockchip/rga3/rga_drv.c:1526:1: warning: label 'failed' defined but not used [-Wunused-label]
error, forbidden warning:rga_drv.c:1526
failed:
^~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1376:6: warning: unused variable 'i' [-Wunused-variable]
error, forbidden warning:rga_drv.c:1376
int i, irq;
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3a7bd21a2351b474df654a81b93f7f0c1560aac1
There are 3 planes and 3 mirror plane for rk3566. If both
exist in one vp, the mirror planes should be removed in
plane_mask drm_property.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I15b776224ebfbaa19a0d9d3dca56828a980e0c54
In order to avoid mapping memory when the job pointer is invalid after abort.
Update driver version to 1.2.18
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I50a581f604e66975f87d1566a3dd1b2e95c7e2a3
This will be used to identify the running state of the current scheduler.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib5cdff02e9aa6a32ac1f5e2916190aaa6141a687
In some cases, there are too much userspace high priority RT threads, which
cause kernel RT threads or kworkers block too long time. This config separate
kernel and userspace RT threads into two priority regions, priority 0~49 for
kernel and priority 50~99 for userspace, so that kernel RT threads is always
higher priority than userspace. This config also set RT policy for kworkers.
Change-Id: I87e03915dc0dd03cbcd91d211d2ef56c301451f9
Signed-off-by: Liang Chen <cl@rock-chips.com>
Enable this config used in some old IP chips, e.g. rk3288/rk3399...Socs.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I015ac9fdab94f23c8c6cd14b2696cfdf03cc0f18
gamma maybe enable at uboot, so we read dsp_lut state to adjust gamma
state is more correct.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie8893e6136009874c140933b10a77d532e019aa1
This patch fix following two cases dwc2 resume does not recognize
peripherals.
1. plug in device after system suspend, then press the power-on
button to wake up,at this time the dr_mode is OTG, op_state is
still Peripheral, the Bit[0] of GINTSTS is 1 and the port power
is off, dwc2 will not resume at this time.
2. plug in device then press the power-on button to put the system
to sleep, then we press the power-on button to wake up the system,
At this time, the dr_mode is OTG, op_state is still Host, the Bit[0]
of GINTSTS is 1, dwc2 will not resume and working abnormally.
To resolve the first exception, we should call the dwc2_hsotg_resume()
directly to resume dwc2. To resolve the second exception, if the dwc2
is lost power during suspend like RK3326S platform, wo should reinit
the core to device mode, and after do dwc2_hsotg_resume, it can trigger
the ID status change interrupt if the OTG cable is still connect. Then
we can init it for host mode in the ID status change interrupt handler.
We can use the power on bit of Hprt register to distinguish whether
it is lost power during suspend.
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I7cd09bce993dcee8e5bfcaddd5fe884cdfab6b52
Some rockchip encoder (e.g RV1106/RV1103) support to reserve
UVC Header in the encoded image, this patch improve the uvc
driver to support zero copy for uvc formats MJPEG/H264/H265,
and no support zero copy for YUYV.
By default, the uvc driver disable the zero copy, you can
set the ${USB_FUNCTIONS_DIR}/uvc.gs*/uvc_zero_copy to 1
to enable the zero copy.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I19be26170d51f209f3196f546515be665481b8b5
kernel_read()/kernel_write() are missing from GKI symbol list.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iad8f6749840d8fdc6c80c751a3d229e9f04359de
Maybe appear the following case:
-> set gamma
-> config done
-> atomic commit
--> update win format
--> update win address
---> here maybe meet vop hardware frame start, and triggle some config take affect.
---> as only some config take affect, this maybe lead to iommu pagefault.
--> update win size
--> update win other parameters
-> config done
so we add vop2_wait_for_fs_by_done_bit_status() to make sure the first config done take
effect and then to do next frame config.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6ec67b374b3afd2bed4a57aa1e7b729964df1736
Fix the following smatch warnings:
rockchip_drm_vop2.c:2892 rk3568_crtc_load_lut() warn: we tested 'vp->gamma_lut_active' before and it was 'true'
rockchip_drm_vop2.c:6995 vop2_setup_hdr10() warn: we tested 'vp->hdr_out' before and it was 'true'
rockchip_drm_vop2.c:7512 vop2_setup_dly_for_vp() warn: we tested 'vp->hdr_in' before and it was 'true'
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I239658d19924b12843efdee8edf89962df1dae0b
https://lkml.org/lkml/2016/9/14/208
Interactive governor has lived in Android sources for a very long time
and this commit is based on the code present in following branch:
https://android.googlesource.com/kernel/common android-4.4
The Interactive governor is designed for latency-sensitive workloads,
such as interactive user interfaces like the mobile phones and tablets.
The interactive governor aims to be significantly more responsive to
ramp CPU quickly up when CPU-intensive activity begins.
Existing governors sample CPU load at a particular rate, typically every
X ms and then update the frequency from a work-handler. This can lead
to under-powering UI threads for the period of time during which the
user begins interacting with a previously-idle system until the next
sample period happens.
The 'interactive' governor uses a different approach.
A real-time thread is used for scaling up, giving the remaining tasks
the CPU performance benefit, unlike existing governors which are more
likely to schedule ramp-up work to occur after your performance starved
tasks have completed.
The Android version of interactive governor also checks whether to scale
the CPU frequency up soon after coming out of idle. When the CPU comes
out of idle, the governor check if the CPU sampling is overdue or not.
If yes, it immediately starts the sampling. Otherwise, the utilization
hooks from the scheduler handle the sampling later. If the CPU is very
busy from exiting idle to when the evaluation happens, then it assumes
that the CPU is under-powered and ramps it to MAX speed.
If the CPU was not sufficiently busy to immediately ramp to MAX speed,
then the governor evaluates the CPU load since the last speed
adjustment, choosing the highest value between that longer-term load or
the short-term load since idle exit to determine the CPU speed to ramp
to.
The core of this code is written and maintained (in Android
repositories) by Mike Chan and Todd Poyner over a long period of time.
Vireshk has made changes to to the governor to align it with the current
practices followed with mainline governors, like using utilization hooks
from the scheduler and handling kobject (for governor's sysfs directory)
in a race free manner. And of course this included general cleanup of
the governor as well.
Signed-off-by: Mike Chan <mike@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Change-Id: Ib5e8d1dab0fa3cc5ba79b7a554c8dde35435cbdb
[AmitP: Cherry-picked this version from
https://git.kernel.org/cgit/linux/kernel/git/vireshk/pm.git/log/?h=cpufreq/interactive-idle-notifier.
Also refactored and folded https://lkml.org/lkml/2016/9/14/209
patch into this unified patch.]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Liang Chen <cl@rock-chips.com>
(cherry picked from https://android.googlesource.com/kernel/msm
commit 33f7a05d4e82c81841af20e6a944a4c3f9b2973e)
When CPU idle is enabled, the idle call should also notify the
idle_notifier_call_chain of the change in status. Otherwise some
processes will think the CPU is always active.
CRs-Fixed: 677525
Change-Id: Iabd6f617d6835688cf8b482ac1321e5c1deafffd
Signed-off-by: Patrick Cain <pcain@codeaurora.org>
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Liang Chen <cl@rock-chips.com>
(cherry picked from https://android.googlesource.com/kernel/msm
commit e7f65ab439125bdc29a7a0ca7345ff746d014119)