irqs in different cpu will change irq_ends flag, lock to sync.
Change-Id: Ie5467825173a16c796c7ab84c15286af44edc5d9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
In some case, the pll rate will be change to get a target
rate for it's child. we want set the pll rate closest to
the max pll rate. However, It's not all the rate can get
a set of legal paramters to config the pll. So when this
case happen, we try a lower rate as the target pll rate.
Change-Id: I45abec2114f74634904cf3c34655d8df331d171b
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Raise initial voltage of vdd_cpu/vdd_logic when startup to improve stability.
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I223a21351424cb3fb47e5b3cae4f8e0324bd9a25
Raise voltage of cpu/dmc when low temperature to improve stability.
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I80321c0454c98c62a237192b46fa00da1b48d336
Use tasklet_hi_schedule for better audio performance,
especially for LLA (Low Latency Audio) situation.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic5a215a269e718b0e5613132cb9fe9b58940d0e1
Adjustments occur at two cases:
- No linkup within 5s;
- The number of packets received within 10 seconds is less than 3,
or the packet loss rate is greater than 15%.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I8b48bb4377ddb4231fa6f26b4373695fd85cbb26
Fixes: e6c7ea7d4d ("tee: optee: interrupt an RPC when supplicant has been killed")
Change-Id: I33f33af02afb75bda5d68c9731fe636bb97132fe
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
After integrating DDK g21(r46), the driver outputs the following WARNING after waking from sleep:
[ 293.271414][ T209] prev_wp_active_end_time 18446744073605310680 > start_time 1119644647 for aid 1000 active_cnt 0
[ 293.224787][ T375] WARNING: CPU: 3 PID: 375 at drivers/gpu/arm/bifrost/mali_kbase_gpu_metrics.c:84 emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
[ 293.224825][ T375] Modules linked in: bcmdhd dhd_static_buf r8168
[ 293.224873][ T375] CPU: 3 PID: 375 Comm: kworker/u17:2 Not tainted 5.10.160 #1050
[ 293.224888][ T375] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[ 293.224911][ T375] Workqueue: csf_scheduler_gpu_idle_ gpu_idle_worker
[ 293.224936][ T375] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
[ 293.224955][ T375] pc : emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
[ 293.224973][ T375] lr : emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
...
[ 293.225343][ T375] Call trace:
[ 293.225364][ T375] emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
[ 293.225382][ T375] kbase_gpu_metrics_emit_tracepoint+0x54/0xf4
[ 293.225403][ T375] cleanup_csg_slot+0x20c/0x4f8
[ 293.225423][ T375] wait_csg_slots_suspend+0x320/0x3bc
[ 293.225440][ T375] suspend_active_groups_on_powerdown+0xa8/0x1cc
[ 293.225458][ T375] scheduler_suspend_on_idle+0x24/0x828
[ 293.225474][ T375] gpu_idle_worker+0x384/0x5c4
[ 293.225495][ T375] process_one_work+0x1f0/0x478
[ 293.225511][ T375] worker_thread+0x270/0x4cc
[ 293.225531][ T375] kthread+0x138/0x340
[ 293.225552][ T375] ret_from_fork+0x10/0x18
The WARNING is due to the driver expecting 'gpu_ts' (gpu_timestamp) from the FW
to be monotonically increasing, but here "after waking up, 'gpu_ts' is smaller than before sleep."
'gpu_ts' comes from the GPU's input signal CNTVALUEB.
CNTVALUEB comes from the 'stimer' timer.
derrick.huang@rock-chips.com confirmed that this timer loses power during sleep,
and its count is reset when the system wakes up.
This causes "'gpu_ts' to be smaller after waking up than before sleep."
derrick.huang also mentioned that "for RK3588, it is not possible
to make 'stimer' not lose power in the product."
Here, we are temporarily disabling this WARNING.
It is speculated that sleep-wake cycles
might lead to certain profile features of the GPU not functioning correctly.
Further testing will be conducted to check for other potential issues.
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I9979bff7c7fb946437889561e90440de1037bb35
NOTE:
For RK3588, the mali_csffw.bin used with this driver MUST be from DDK g21p0-01eac0 correspondingly.
Change-Id: Ifab61806a6a350ba53c5dc0296d20628c28d633a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
1.support counter, frequency meter, global control and
wave generator.
2.add struct rockchip_pwm_funcs and modify struct
rockchip_pwm_data for compatibility and extensibility.
3.rename current .enable/.config/.irq_handler to v1.
4.not to return ERRNO if failed to get irq in probing for
pwm_v3.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I28c6a2946ccb9072f464397d6b25f4b6803fa8c5
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:143:3: error: implicit declaration of function 'cec_transmit_attempt_done' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:148:3: error: implicit declaration of function 'cec_received_msg' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:224:14: error: implicit declaration of function 'cec_allocate_adapter' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:224:12: error: incompatible integer to pointer conversion assigning to 'struct cec_adapter *' from 'int' [-Werror,-Wint-conversion]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx.c:1068:2: error: implicit declaration of function 'cec_queue_pin_hpd_event' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx.c:1077:2: error: implicit declaration of function 'cec_queue_pin_hpd_event' [-Werror,-Wimplicit-function-declaration]
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibad7f45af8ecf9a789d7062a2b33c68c4f1541cb
support dual sc230ai
support master_slaver mode
Change-Id: I0b3fdffa22dd5ca0b9272e6b3f8159aeb4727208
Signed-off-by: Lan Honglin <helin.lan@rock-chips.com>
When building s390 allmodconfig after commit 9b91a65230 ("usb: gadget:
uvc: increase worker prio to WQ_HIGHPRI"), the following error occurs:
In file included from ../include/linux/string.h:253,
from ../include/linux/bitmap.h:11,
from ../include/linux/cpumask.h:12,
from ../include/linux/smp.h:13,
from ../include/linux/lockdep.h:14,
from ../include/linux/rcupdate.h:29,
from ../include/linux/rculist.h:11,
from ../include/linux/pid.h:5,
from ../include/linux/sched.h:14,
from ../include/linux/ratelimit.h:6,
from ../include/linux/dev_printk.h:16,
from ../include/linux/device.h:15,
from ../drivers/usb/gadget/function/f_uvc.c:9:
In function ‘fortify_memset_chk’,
inlined from ‘uvc_register_video’ at ../drivers/usb/gadget/function/f_uvc.c:424:2:
../include/linux/fortify-string.h:301:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
301 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This points to the memset() in uvc_register_video(). It is clear that
the argument to sizeof() is incorrect, as uvc->vdev (a 'struct
video_device') is being zeroed out but the size of uvc->video (a 'struct
uvc_video') is being used as the third arugment to memset().
pahole shows that prior to commit 9b91a65230 ("usb: gadget: uvc:
increase worker prio to WQ_HIGHPRI"), 'struct video_device' and
'struct ucv_video' had the same size, meaning that the argument to
sizeof() is incorrect semantically but there is no visible issue:
$ pahole -s build/drivers/usb/gadget/function/f_uvc.o | grep -E "(uvc_video|video_device)\s+"
video_device 1400 4
uvc_video 1400 3
After that change, uvc_video becomes slightly larger, meaning that the
memset() will overwrite by 8 bytes:
$ pahole -s build/drivers/usb/gadget/function/f_uvc.o | grep -E "(uvc_video|video_device)\s+"
video_device 1400 4
uvc_video 1408 3
Fix the arugment to sizeof() so that there is no overwrite.
Cc: stable@vger.kernel.org
Fixes: e4ce9ed835 ("usb: gadget: uvc: ensure the vdev is unset")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220928201921.3152163-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit a15e17acce)
Change-Id: Id7fe8570ae7f3998593f33c01ffb63c8c89f0716