As described in:
https://patchwork.freedesktop.org/patch/msgid/20190228210939.83386-2-sean@poorly.run
From the driver's perspective, this works like a regular disable/enable
cycle. The driver need only check the 'psr_transition' state in
connector_state and keep the panel turned on when in .disable(), while
everything else will cycle off as normal. If drivers want more control,
they can use the psr_transition state to enter a low-power state to
minimize PSR exit time.
While this carries the PSR moniker, it is not specific to the
DisplayPort technology. This can be used for power savings
with other types of self refresh, such as MIPI command mode.
Change-Id: I80799c7f1356645e50dae98159591dde6aa5abff
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
if the mode of the PHY is not set in .loader_protect helper,
when entering sleep mode for the first time bring up with
display logo, the PHY will not be able to shut down completely
and accurately because it does not know in which mode it is
operating, resulting in some power consumption.
Change-Id: If5606c24fd2a542936cdb2f1c3d4e380d6c3889a
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Usperspace not commit new frame for long time will triggle
driver enter psr mode, If userspace directly close display
at next time and without any new frame commit, driver will
not exit psr, at this case we need to recover aclk here
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4bf78c5fa12ca7fa557d8e82d92427b0f849f2eb
At RK356X/RK3588/RK3562/RK3528 linear 10bit yuv format actual_w should
align as 4 pixel, from RK3576 linear 10bit yuv format actual_w should
align as 2 pixel.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I719f59574442628f2ed2410d6ca20194cf6f580d
Reset the enc core will clear the reference info of the dual-core
parallel encoding, which will cause parallel enc err.
So use another way to workaround.
Change-Id: I3ef8ae3397687929c529b40f21cb34ea3d1c327f
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Fixes: d420d65bec ("drm/rockchip: dsi2: optimize drive probe process")
rockchip drm will Registers a new aggregate driver consisting of the
components added to @match by calling one of the component_match_add()
functions. Once all components in @match are available, it will be assembled
by calling &component_master_ops.bind(rockchip_drm_ops.rockchip_drm_bind)
from @ops.
if the dsi->slave is not added into component, the binding status of
the device under the display subsystem becomes abnormal as follows:
cat /sys/kernel/debug/device_component/display-subsystem
aggregate_device name status
-------------------------------------------------------------
display-subsystem not bound
device name status
-------------------------------------------------------------
fdd90000.vop not bound
fde20000.dsi not bound
(unknown) not registered
Change-Id: I5739f06b4ef65f0b8de8f3394f4e811abe31a22c
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
commit f342de4e2f33e0e39165d8639387aa6c19dff660 upstream.
This reverts commit e0abdadcc6.
core.c:nf_hook_slow assumes that the upper 16 bits of NF_DROP
verdicts contain a valid errno, i.e. -EPERM, -EHOSTUNREACH or similar,
or 0.
Due to the reverted commit, its possible to provide a positive
value, e.g. NF_ACCEPT (1), which results in use-after-free.
Its not clear to me why this commit was made.
NF_QUEUE is not used by nftables; "queue" rules in nftables
will result in use of "nft_queue" expression.
If we later need to allow specifiying errno values from userspace
(do not know why), this has to call NF_DROP_GETERR and check that
"err <= 0" holds true.
Bug: 323034288
Fixes: e0abdadcc6 ("netfilter: nf_tables: accept QUEUE/DROP verdict parameters")
Cc: stable@vger.kernel.org
Reported-by: Notselwyn <notselwyn@pwning.tech>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8e34430e33)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ie6c699cea6f92cd4a7642f196d5f5cbffe268a6d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Since the number of hwlocks on some Rockchip SoC is not 64, we
need to configure the actual numbers with "rockchip,hwlock-num-locks"
property in DT.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ibb641b010a0431ebcb5c00e9a60d12d584fb6efa
Set number of hwlocks with the "rockchip,hwlock-num-locks" property,
it indicates that the number of hwlocks provided by this device.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ifc3f64fff942481ba98da095af0e1697803270d7
When the bridge code does not abstract a connector, and the bridge
has connection status detection, the dsi abstract connector adds
"DRM_CONNECTOR_POLL_CONNECT" and "DRM_CONNECTOR_POLL_DISCONNECT"
flags for interface plugging and unplugging detection.
Type: Function
Redmine ID: N/A
Associated modifications: N/A
Test: N/A
Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I58dcb9ade2846c73f489b0ebc9bf65947d7b6352
This patch add support to change LVDS output common mode voltage
and differential voltage using dts prop "inno,lvds-vcom" and
"inno,lvds-vod".
&video_phy0 {
inno,lvds-vcom = <950>; /* 950mV */
inno,lvds-vod = <350>; /* 350mV */
}
Change-Id: Icbaa0943f9bad7a82ffa03a178a1486c7e1117c9
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
For rk3576 and rk3588, vop dclk can be from pll or hdmi phy[except hdmi
2.1(dclk bigger than 597M), the HDMI work at FRL mode], when dclk is
from pll, dclk_parent is equal to dclk, we need clk_round_rate() for
dclk_parent to check whether can support this mode.
1. GPLL/CPLL/VPLL
dclk_parent
dclk
2. xin24m
clk_hdmiphy_pixel0
dclk
Change-Id: Ie5b9a7a5056a6f997ade95ab6af9b6d7ddc10f3b
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Test on RK3576 Tablet Android 14 GKI, when plug in U disk,
it will trigger the usb2 phy to do charging detection logic
in the following process.
1. Type-C PD controller chip (e.g HUSB311) detect DFP mode;
2. Type-C tcpm call usb_role_switch_set_role() to notify
the usb controller to set USB_ROLE_HOST;
3. The usb dwc3 controller driver do dwc3_set_mode() to
initialize the controller and phy for host mode;
4. In the __dwc3_set_mode(), it do pm_runtime_get_sync()
-> dwc3_runtime_resume() -> dwc3_resume_common() ->
dwc3_core_init() -> phy_init(dwc->usb2_generic_phy);
5. In the usb2 phy driver, it do rockchip_usb2phy_init()
-> schedule otg_sm_work -> rockchip_chg_detect_work()
6. Detect dcp cable is connected, and call extcon_set_state_sync()
to send charger notification with true state.
Later, if plug out the U disk and plug in a USB charger,
it will fail to send charger notification because its
extcon state still in true state.
To fix this issue, we need to clear the charger state
in the otg_sm_work if it's already in host mode.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I6a30429162290927cae3e5f3495f51db61bf15b6