In the bandwidth tension environment when close win2, vop will access
the freed memory lead to iommu pagefault. so we add this reset to workaround.
Change-Id: I22b0c0f145d042e3aaf98fb45ffff6304c93963c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Because when enable uboot logo display, vop_crtc_enable() will not be
called when power on, this will lead to some vop initial like
axi channel and some debug irq will not be enabled. so we move some
config to vop_initial() and call from vop_crtc_loader_protect().
Change-Id: I86f02e2e7d12b78cce17e278baaf6dff93137167
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
some version vop unsupport pixel alpha add scale, this case
will lead to display error and post empty.
Change-Id: I32820a14292b46ce61fd30bfccdaa5e4f635de49
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Otherwise, clk_gpu won't be disabled actually in the runtime.
Change-Id: I92787a5e23bfb92f5a79efda92c130832751cc3b
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
If hdmi is enabled in uboot and pluged out when booting kernel,
the hdmi phy is still enabled. It's better to disable it to
match the real status.
Change-Id: Ia1c5ede6499ee277d08c35a85c50e3257305f90f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Under following processes, rxsense will be not match the real
signal status.
1. HDMI plug in, irq is triggered.
2. HDMI irq is mute in dw_hdmi_hardirq, bring up dw_hdmi_irq.
3. For HDMI connection is not stable, phy_stat read in
dw_hdmi_irq may be zero, then hdmi->rxsense will be false.
4. Connection fallback to stable, but dw_hdmi_irq had not
unmute the irq, irq is not triggered again, and hdmi->rxsense
keep false.
5. repo_hpd_event inform HDMI is pluggned in, dw_hdmi_bridge_enable
is called to enable HDMI. For rxsense is flase, bridge is not
powered up.
When repo_hpd_event is called, we think HDMI connection is stable,
updating rxsense is reliable.
Change-Id: Ie1f52f65b15e9a603dad9200529202053528a390
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
most of rk3288 vop lit is same with vop big, but some feature is
different, just like max output resolution.
vop big max output: 3840*2160
vop lit max ougput: 2560*1600
Change-Id: Ie926ed29c9d23159ccf3dd5c3e885e48a21731cb
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Because vop is unstable when update output timing,
so we close all win make sure stable.
Change-Id: Ifd4e60a41c667426d40e0d57e5180034bab9d5e7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Before this update, drm_fb_helper_is_bound will return false
when hdmi plug.
Change-Id: I28c07b1c1c3405af2627bf423721c757f1e84258
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
for some unknown reason, iommu will enable fail, so we set is_iommu_enabled
to false insure the iommu will be enable at next frame.
Change-Id: Icd8779fff816f7498385aff9aa4712e6ad18f93c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
DPMS status default value should be set according to
whether uboot logo is enabled. If uboot logo is enabled,
DPMS status default value should be set to ON.
Change-Id: I492d76c29687e583771824fcbc5a57455242ec0e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
If the regulator is shared between several devices then the lowest
request voltage that meets the system constraints will be used.
Change-Id: Icb6afcb571bddd6709d352dfad8fc2da80567bc0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
If there is only one opp whose frequency is equal to the initial value
in opp table list, the GPU voltage domain will keep the initial voltage,
it may be too large.
Change-Id: If2ae1c876de185d810e05296b1b9e98855c3ef48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
On rockchip platform, hdmi input format is YCbCr444 when output mode
is YCbCr422. Then the value of HDMI_TX_INVID0 on YCbCr422 is same as
the value of YCbCr444, both is 0x09/0x0b. This make enc_out_bus_format
stroed in struct hdmi_data is wrong, which is MEDIA_BUS_FMT_YUV8_1X24
or MEDIA_BUS_FMT_YUV10_1X30.
When android set enc_out_bus_format to YCbCr422, dw_hdmi_setup will be
called and logo will flash.
This patch use colorspace restored in HDMI_FC_AVICONF0 to distinguish them.
Change-Id: I6b913951b58fb47628617c11d6059bc1be4e370a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This version vop will read buffer when win2 master0-3 disable but
win2 enable, this is different from old vop version. so we add to
disable win2 en to make sure it's save.
Change-Id: Ib239a8901095a6eff980747f219c3aa585437dae
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Fixes: 35cd525521 ("drm/rockchip: lvds: Add support for PX30")
Change-Id: Ib71efbb6a063694d755df287568e0d14d6074238
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Default value of hdmi->colordepth is defined by input color mode,
so there is no need to set value again when color depth property
is created.
Change-Id: I2e242fabdaadc0c3b41e48f806cbded5f619c455
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
including :
modifications for changing patch from drivers/gpu/arm/midgard
to drivers/gpu/arm/bifrost;
rename output mali_kbase.ko to bifrost_kbase.ko;
rename configs, which have duplicated names in midgard, in Kconfig,
Kbuild and source files.
Change-Id: I127d8c8043db9010398946b3f4a90640ab1f13fe
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
When CONFIG_NEED_SG_DMA_LENGTH is enabled,
sg_dma_len is defined as follow :
"#define sg_dma_len(sg) ((sg)->dma_length)"
But, dma_length is not used by the framework indeed.
Change-Id: I93b4ceed28882236dc252fcabb7c7710153804a0
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Some optimizations on files of KBuild in addition.
Change-Id: I1db012e116b8b69897a2791ae610da35365a1a61
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
to modify bus width error sometime plug out hdmi and switch cvbs output
Change-Id: Iaa7914fbccc99991fbfbc5495ba647f97997c8ba
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
In the following case will lead to wait frame start timeout:
uboot(HDMI output 4K(DCLK: 594HZ))
-> kernel start(unplug HDMI)
->drm driver probe(plug HDMI)enable crtc(set dclk to 27Mhz)
->VOP timing register is frame effect
->VOP working at 4k output but dclk is 27M
-> VOP frame time 16.6ms * 574 / 27 = 354ms
Change-Id: Ic98af0029a15fbeef78e4f3abe4e739e760ab471
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
If hdmi is enabled in uboot, hdmi->disabled and bridge_is_on and
phy status need to be updated.
Change-Id: Ib21d894b673bf12b46a271c91d3e08fe7475ea89
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Add tve connector port. If uboot logo is enabled,
dac will not be disabled when tve bind.
Change-Id: I5d87f9d1afc05481968dc34b0bd09dd82719a933
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
If vop return error when showing kernel logo, connector atomic flush
will not be call, and mc_clkdis can not be updated.
This patch update mc_clkdis in the dw_hdmi_bind, when phy clock is
locked and HPD is connected.
Change-Id: I1498d787a993961fe75236c309ecc3c898d611a4
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>