If hdmi plug in when kernel starting, hdmi may be without output.
Because the old criteria that to determine whether uboot logo is
on is hdmi phy pll locked and hdmi is connected. But in some
platform(such as rk3229), hdmi phy pll is locked even hdmi phy
is power down. In this case, the old criteria is unreliable.
So we add a new criteria that check Frame Composer register.If
the register value is not 0, we think that uboot logo is on,
hdmi has been setup.
Change-Id: Ifaa27030e5f5d551bec8f971694ff5d9c34a7c1d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
set frame effect to fix mistake fild when in interlace mode
Change-Id: I74143cc28cbd9a7864a1df57979f3888137c141c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
when video width is bigger than 3840 the linebuffer mode
should be LB_YUV_3840X5.
Change-Id: I27dce8a6fcb7f6f5b8d196671a515c68f188c101
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
panel init cmds is not only for dsi panel, some mcu screen and
spi screen also need init cmds, so we update this panel init cmd
name and reuse this part logic.
Change-Id: I9e633647fa3f3d92eb90b443a8a5da99a24a3b42
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
For some reason drm driver maybe probe failed, so the drm_dev is
null. this will lead to kernel panic when enter suspend function.
Change-Id: Ic529ba9103d27b0766189285bd6cf8e43b23b912
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
in addition,
resolve all the conflicts;
rename all the configs and macros that have a same name in midgard/;
fix a compiling error.
Change-Id: I5abc8c925049e087c59b66da57c82aac3092be71
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
add support for rgb panel or rgb covert to other interface panel.
Change-Id: I190ce6e08d38f794ecabb863e0def5e74890f75a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Opp rate is used to calc power in thermal framework, so we record
this rate instead of real clock rate.
Devfreq is not ready in target() when use performance governor, so
we need record opp rate in probe().
Change-Id: Iec1918ad5d12124b9f112964f247339e0d50645f
Signed-off-by: Liang Chen <cl@rock-chips.com>
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>
[ Upstream commit a121027d27 ]
On my GP107 when I load nouveau after unloading it, for some reason the
GPU stopped sending or the CPU stopped receiving interrupts if MSI was
enabled.
Doing a rearm once before getting any interrupts fixes this.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
commit 458d876eb8 upstream.
We only support vga_switcheroo and runtime pm on PX/HG systems
so forcing runpm to 1 doesn't do anything useful anyway.
Only call vga_switcheroo_init_domain_pm_ops() for PX/HG so
that the cleanup path is correct as well. This mirrors what
radeon does as well.
v2: rework the patch originally sent by Lukas (Alex)
Acked-by: Lukas Wunner <lukas@wunner.de>
Reported-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de> (v1)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
commit db9b60400f upstream.
We were getting build warning about:
drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
from incompatible pointer type
The callback to dpms was pointing to a helper function which had a
return type of void, whereas the callback should point to a function
which has a return type of int.
On closer look it turned out that we do not need the helper function
since if we call drm_helper_connector_dpms() directly, the first check
that drm_helper_connector_dpms() does is: if (mode == connector->dpms)
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
[arnd: rebased to 4.4]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 4f25070621 upstream.
If the DSI output isn't connected, then mdfld_dsi_encoder_get_pipe()
will return -1. The mdfld_dsi_dp_mode_set() function doesn't properly
check for this condition and causes the following compiler warnings:
CC drivers/gpu/drm/gma500/mdfld_dsi_dpi.o
drivers/gpu/drm/gma500/mdfld_dsi_dpi.c: In function ‘mdfld_dsi_dpi_mode_set’:
drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:828:35: warning: array subscript is below array bounds [-Warray-bounds]
u32 pipeconf = dev_priv->pipeconf[pipe];
^
drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:829:33: warning: array subscript is below array bounds [-Warray-bounds]
u32 dspcntr = dev_priv->dspcntr[pipe];
^
Fix this by checking for a valid pipe before indexing the pipeconf and
dspcntr arrays.
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-2-git-send-email-boris.brezillon@free-electrons.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit b74c0a9969 upstream.
gcc-4.9 notices that the validate_init() function returns unintialized
data when called with a zero 'nr_buffers' argument, when called with the
-Wmaybe-uninitialized flag:
drivers/gpu/drm/nouveau/nouveau_gem.c: In function ‘validate_init.isra.6’:
drivers/gpu/drm/nouveau/nouveau_gem.c:457:5: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
However, the only caller of this function always passes a nonzero
argument, and gcc-6 is clever enough to take this into account and
not warn about it any more.
Adding an explicit initialization to -EINVAL here is correct even if
the caller changed, and it avoids the warning on gcc-4.9 as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-By: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>