Sam Ravnborg
e0d409ff16
drm/panel: drop return code from drm_panel_detach()
...
There are no errors that can be reported by this function,
so drop the return code.
Fix the only bridge driver that checked the return result.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <maxime.ripard@bootlin.com >
Cc: Sean Paul <sean@poorly.run >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-14-sam@ravnborg.org
2019-08-10 15:41:48 +02:00
YueHaibing
0486ad20e7
drm/rockchip: Make analogix_dp_atomic_check static
...
Fix sparse warning:
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1151:5: warning:
symbol 'analogix_dp_atomic_check' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730150057.57388-1-yuehaibing@huawei.com
2019-07-30 12:40:07 -04:00
Sean Paul
6c836d965b
drm/rockchip: Use the helpers for PSR
...
Instead of rolling our own implementation for tracking when PSR should
be [in]active, use the new self refresh helpers to do the heavy lifting.
Changes in v2:
- updated to reflect changes made in the helpers
Changes in v3:
- use the new atomic hooks to inspect crtc state instead of needing conn state (Daniel)
Changes in v4:
- Use Laurent's get_new_connector_for_encoder helper (Daniel)
- Exit vop disable early if it's already off
Changes in v5:
- Rebase on latest drm-misc-next
- Resolve conflict with s/edp_vsc_psr/dp_sdp/ rename
- Resolve conflict with drm_atomic.h header inclusion
Link to v1: https://patchwork.freedesktop.org/patch/msgid/20190228210939.83386-4-sean@poorly.run
Link to v2: https://patchwork.freedesktop.org/patch/msgid/20190326204509.96515-3-sean@poorly.run
Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-9-sean@poorly.run
Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-9-sean@poorly.run
Cc: Zain Wang <wzz@rock-chips.com >
Cc: Tomasz Figa <tfiga@chromium.org >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
[seanpaul resolved some conflicts with drmP.h work and Helen's async fixes]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-9-sean@poorly.run
2019-07-26 14:48:03 -04:00
Sean Paul
ad309284a5
drm/rockchip: Check for fast link training before enabling psr
...
Once we start shutting off the link during PSR, we're going to want fast
training to work. If the display doesn't support fast training, don't
enable psr.
Changes in v2:
- None
Changes in v3:
- None
Changes in v4:
- None
Changes in v5:
- None
Link to v1: https://patchwork.freedesktop.org/patch/msgid/20190228210939.83386-3-sean@poorly.run
Link to v2: https://patchwork.freedesktop.org/patch/msgid/20190326204509.96515-2-sean@poorly.run
Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-9-sean@poorly.run
Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-8-sean@poorly.run
Cc: Zain Wang <wzz@rock-chips.com >
Cc: Tomasz Figa <tfiga@chromium.org >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-8-sean@poorly.run
2019-07-26 14:48:03 -04:00
Linus Torvalds
be8454afc5
Merge tag 'drm-next-2019-07-16' of git://anongit.freedesktop.org/drm/drm
...
Pull drm updates from Dave Airlie:
"The biggest thing in this is the AMD Navi GPU support, this again
contains a bunch of header files that are large. These are the new AMD
RX5700 GPUs that just recently became available.
New drivers:
- ST-Ericsson MCDE driver
- Ingenic JZ47xx SoC
UAPI change:
- HDR source metadata property
Core:
- HDR inforframes and EDID parsing
- drm hdmi infoframe unpacking
- remove prime sg_table caching into dma-buf
- New gem vram helpers to reduce driver code
- Lots of drmP.h removal
- reservation fencing fix
- documentation updates
- drm_fb_helper_connector removed
- mode name command handler rewrite
fbcon:
- Remove the fbcon notifiers
ttm:
- forward progress fixes
dma-buf:
- make mmap call optional
- debugfs refcount fixes
- dma-fence free with pending signals fix
- each dma-buf gets an inode
Panels:
- Lots of additional panel bindings
amdgpu:
- initial navi10 support
- avoid hw reset
- HDR metadata support
- new thermal sensors for vega asics
- RAS fixes
- use HMM rather than MMU notifier
- xgmi topology via kfd
- SR-IOV fixes
- driver reload fixes
- DC use a core bpc attribute
- Aux fixes for DC
- Bandwidth calc updates for DC
- Clock handling refactor
- kfd VEGAM support
vmwgfx:
- Coherent memory support changes
i915:
- HDR Support
- HDMI i2c link
- Icelake multi-segmented gamma support
- GuC firmware update
- Mule Creek Canyon PCH support for EHL
- EHL platform updtes
- move i915.alpha_support to i915.force_probe
- runtime PM refactoring
- VBT parsing refactoring
- DSI fixes
- struct mutex dependency reduction
- GEM code reorg
mali-dp:
- Komeda driver features
msm:
- dsi vs EPROBE_DEFER fixes
- msm8998 snapdragon 835 support
- a540 gpu support
- mdp5 and dpu interconnect support
exynos:
- drmP.h removal
tegra:
- misc fixes
tda998x:
- audio support improvements
- pixel repeated mode support
- quantisation range handling corrections
- HDMI vendor info fix
armada:
- interlace support fix
- overlay/video plane register handling refactor
- add gamma support
rockchip:
- RX3328 support
panfrost:
- expose perf counters via hidden ioctls
vkms:
- enumerate CRC sources list
ast:
- rework BO handling
mgag200:
- rework BO handling
dw-hdmi:
- suspend/resume support
rcar-du:
- R8A774A1 Soc Support
- LVDS dual-link mode support
- Additional formats
- Misc fixes
omapdrm:
- DSI command mode display support
stm
- fb modifier support
- runtime PM support
sun4i:
- use vmap ops
vc4:
- binner bo binding rework
v3d:
- compute shader support
- resync/sync fixes
- job management refactoring
lima:
- NULL pointer in irq handler fix
- scheduler default timeout
virtio:
- fence seqno support
- trace events
bochs:
- misc fixes
tc458767:
- IRQ/HDP handling
sii902x:
- HDMI audio support
atmel-hlcdc:
- misc fixes
meson:
- zpos support"
* tag 'drm-next-2019-07-16' of git://anongit.freedesktop.org/drm/drm: (1815 commits)
Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next"
Revert "mm: adjust apply_to_pfn_range interface for dropped token."
mm: adjust apply_to_pfn_range interface for dropped token.
drm/amdgpu/navi10: add uclk activity sensor
drm/amdgpu: properly guard the generic discovery code
drm/amdgpu: add missing documentation on new module parameters
drm/amdgpu: don't invalidate caches in RELEASE_MEM, only do the writeback
drm/amd/display: avoid 64-bit division
drm/amdgpu/psp11: simplify the ucode register logic
drm/amdgpu: properly guard DC support in navi code
drm/amd/powerplay: vega20: fix uninitialized variable use
drm/amd/display: dcn20: include linux/delay.h
amdgpu: make pmu support optional
drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent
drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq
drm/amd/powerplay: Use memset to initialize metrics structs
drm/amdgpu/mes10.1: Fix header guard
drm/amd/powerplay: add temperature sensor support for navi10
drm/amdgpu: fix scheduler timeout calc
drm/amdgpu: Prepare for hmm_range_register API change (v2)
...
2019-07-15 19:04:27 -07:00
Thomas Gleixner
d2912cb15b
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
...
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Enrico Weigelt <info@metux.net >
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org >
Reviewed-by: Allison Randal <allison@lohutok.net >
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-06-19 17:09:55 +02:00
Daniel Vetter
52d2d44eee
Merge v5.2-rc5 into drm-next
...
Maarten needs -rc4 backmerged so he can pull in the fbcon notifier
removal topic branch into drm-misc-next.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2019-06-19 12:07:29 +02:00
Linus Walleij
5b038dcf9d
drm/bridge: analogix_dp: Convert to GPIO descriptors
...
This converts the Analogix display port to use GPIO descriptors
instead of DT-extracted numbers.
Cc: Douglas Anderson <dianders@chromium.org >
Cc: Sean Paul <seanpaul@chromium.org >
Cc: Marek Szyprowski <m.szyprowski@samsung.com >
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190609231339.22136-1-linus.walleij@linaro.org
2019-06-13 15:46:37 +02:00
Hariprasad Kelam
1de287512d
drm/bridge: analogix_dp: possible condition with no effect (if == else)
...
fix below warning reported by coccicheck
./drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1414:6-8: WARNING:
possible condition with no effect (if == else)
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190525175937.GA29368@hari-Inspiron-1545
2019-06-13 15:40:17 +02:00
Thomas Gleixner
2874c5fd28
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
...
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 3029 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Allison Randal <allison@lohutok.net >
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-05-30 11:26:32 -07:00
Maarten Lankhorst
4672b1d65f
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
...
This picks up rc2 for us as well.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
2019-05-28 09:39:08 +02:00
Dave Airlie
14ee642c2a
Merge tag 'drm-intel-next-2019-05-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
...
Features:
- Engine discovery query (Tvrtko)
- Support for DP YCbCr4:2:0 outputs (Gwan-gyeong)
- HDCP revocation support, refactoring (Ramalingam)
- Remove DRM_AUTH from IOCTLs which also have DRM_RENDER_ALLOW (Christian König)
- Asynchronous display power disabling (Imre)
- Perma-pin uC firmware and re-enable global reset (Fernando)
- GTT remapping for display, for bigger fb size and stride (Ville)
- Enable pipe HDR mode on ICL if only HDR planes are used (Ville)
- Kconfig to tweak the busyspin durations for i915_wait_request (Chris)
- Allow multiple user handles to the same VM (Chris)
- GT/GEM runtime pm improvements using wakerefs (Chris)
- Gen 4&5 render context support (Chris)
- Allow userspace to clone contexts on creation (Chris)
- SINGLE_TIMELINE flags for context creation (Chris)
- Allow specification of parallel execbuf (Chris)
Refactoring:
- Header refactoring (Jani)
- Move GraphicsTechnology files under gt/ (Chris)
- Sideband code refactoring (Chris)
Fixes:
- ICL DSI state readout and checker fixes (Vandita)
- GLK DSI picture corruption fix (Stanislav)
- HDMI deep color fixes (Clinton, Aditya)
- Fix driver unbinding from a device in use (Janusz)
- Fix clock gating with pipe scaling (Radhakrishna)
- Disable broken FBC on GLK (Daniel Drake)
- Miscellaneous GuC fixes (Michal)
- Fix MG PHY DP register programming (Imre)
- Add missing combo PHY lane power setup (Imre)
- Workarounds for early ICL VBT issues (Imre)
- Fix fastset vs. pfit on/off on HSW EDP transcoder (Ville)
- Add readout and state check for pch_pfit.force_thru (Ville)
- Miscellaneous display fixes and refactoring (Ville)
- Display workaround fixes (Ville)
- Enable audio even if ELD is bogus (Ville)
- Fix use-after-free in reporting create.size (Chris)
- Sideband fixes to avoid BYT hard lockups (Chris)
- Workaround fixes and improvements (Chris)
Maintainer shortcomings:
- Failure to adequately describe and give credit for all changes (Jani)
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/87sgt3n45z.fsf@intel.com
2019-05-28 09:26:52 +10:00
Sam Ravnborg
95b608044f
drm/bridge: drop drmP.h usage
...
Drop use of the deprecated drmP.h header file.
While touching the list of include files:
- Divide include files in blocks of linux/* drm/* etc.
- Sort individual blocks of include files
- Remove duplicated header file
v2:
- Be consistent in the order of the include blocks (Laurent)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Peter Senna Tschudin <peter.senna@gmail.com >
Cc: Martin Donnelly <martin.donnelly@ge.com >
Cc: Martyn Welch <martyn.welch@collabora.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190519183636.19588-1-sam@ravnborg.org
2019-05-26 10:55:04 +02:00
Gwan-gyeong Mun
4d432f956d
drm: Rename struct edp_vsc_psr to struct dp_sdp
...
VSC SDP Payload for PSR is one of data block type of SDP (Secondaray Data
Packet). In order to generalize SDP packet structure name, it renames
struct edp_vsc_psr to struct dp_sdp. And each SDP data blocks have
different usages, each SDP type has different reserved data blocks and
Video_Stream_Configuration Extension VESA SDP might use all of Data Blocks
as Extended INFORFRAME Data Byte. so it makes Data Block variables as
array type. And it adds comments of details of DB of VSC SDP Payload
for Pixel Encoding/Colorimetry Format. This comments follows DP 1.4a spec,
section 2.2.5.7.5, chapter "VSC SDP Payload for Pixel Encoding/Colorimetry
Format".
v7: Addressed review comments from Ville.
v9: Rename a member value name DB to db on struct dp_sdp [Laurent]
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-3-gwan-gyeong.mun@intel.com
2019-05-23 09:49:32 +03:00
Thomas Gleixner
ec8f24b7fa
treewide: Add SPDX license identifier - Makefile/Kconfig
...
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-05-21 10:50:46 +02:00
Daniel Vetter
fcd70cd36b
drm: Split out drm_probe_helper.h
...
Having the probe helper stuff (which pretty much everyone needs) in
the drm_crtc_helper.h file (which atomic drivers should never need) is
confusing. Split them out.
To make sure I actually achieved the goal here I went through all
drivers. And indeed, all atomic drivers are now free of
drm_crtc_helper.h includes.
v2: Make it compile. There was so much compile fail on arm drivers
that I figured I'll better not include any of the acks on v1.
v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
there was still one, which this patch largely removes. Which means
rolling out lots more includes all over.
This will also conflict with ongoing drmP.h cleanup by others I
expect.
v3: Rebase on top of atomic bochs.
v4: Review from Laurent for bridge/rcar/omap/shmob/core bits:
- (re)move some of the added includes, use the better include files in
other places (all suggested from Laurent adopted unchanged).
- sort alphabetically
v5: Actually try to sort them, and while at it, sort all the ones I
touch.
v6: Rebase onto i915 changes.
v7: Rebase once more.
Acked-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Acked-by: CK Hu <ck.hu@mediatek.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: virtualization@lists.linux-foundation.org
Cc: etnaviv@lists.freedesktop.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: spice-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-tegra@vger.kernel.org
Cc: xen-devel@lists.xen.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190117210334.13234-1-daniel.vetter@ffwll.ch
2019-01-24 13:20:42 +01:00
Laurent Pinchart
63f8f3badf
drm: bridge: Constify mode arguments to bridge .mode_set() operation
...
The mode and ajusted_mode passed to the bridge .mode_set() operation
should never be modified by the bridge (and are not in any of the
existing bridge drivers). Make them const to make this clear.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2019-01-14 03:51:14 +02:00
Enric Balletbo i Serra
29305d7e8f
drm/bridge: analogix_dp: Fix misleading indentation reported by smatch
...
This patch avoids that building the bridge/analogix source code with
smatch triggers complaints about inconsistent indenting. It also fixes
a typo in DRM_ERROR message, attch is replaced for attach.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181016095336.15656-1-enric.balletbo@collabora.com
2018-10-29 14:47:39 +01:00
Marc Zyngier
eb1d23d71e
drm/bridge: analogix_dp: Downgrade "Link Training" messages to dev_dbg
...
The Analogix DP bridge driver is pretty verbose, and outputs
things like
[ 619.414067] rockchip-dp ff970000.edp: Link Training Clock Recovery success
[ 619.429233] rockchip-dp ff970000.edp: Link Training success!
each time the display gets unblanked. While it is good to know
that the device is behaving correctly, users already know that
because they can see some video output.
Let's keep these messages for cases where we need to actually
debug the driver (we have dynamic debug to enable them at runtime
if need be), and let's keep the kernel quiet otherwise.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180805172857.2517-1-marc.zyngier@arm.com
2018-09-13 10:47:17 +02:00
Daniel Vetter
cde4c44d87
drm: drop _mode_ from drm_mode_connector_attach_encoder
...
Again to align with the usual prefix of just drm_connector_. Again
done with sed + manual fixup for indent issues.
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180709084016.23750-7-daniel.vetter@ffwll.ch
2018-07-13 18:40:27 +02:00
Daniel Vetter
c555f02371
drm: drop _mode_ from update_edit_property()
...
Just makes it longer, and for most things in drm_connector.[hc] we
just use the drm_connector_ prefix. Done with sed + a bit of manual
fixup for the indenting.
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180709084016.23750-6-daniel.vetter@ffwll.ch
2018-07-13 18:40:27 +02:00
Douglas Anderson
7bb3bb4d56
drm/bridge: analogix_dp: Split the platform-specific poweron in two parts
...
Some of the platform-specific stuff in rockchip_dp_poweron() needs to
happen before the generic code. Some needs to happen after. Let's
split the callback in two.
Specifically we can't start doing PSR work until _after_ the whole
controller is up, so don't set the enable until the end.
Cc: Kristian H. Kristensen <hoegsberg@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
[seanpaul added exynos change]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-23-enric.balletbo@collabora.com
2018-04-24 08:34:49 +02:00
Douglas Anderson
7bd0fd9850
drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip
...
The comments in analogix_dp_init_aux() claim that we're disabling aux
channel retries, but then right below it for Rockchip it sets them to
3. If we actually need 3 retries for Rockchip then we could adjust
the comment, but it seems more likely that we want the same retry
behavior across all platforms.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Cc: 征增 王 <wzz@rock-chips.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-21-enric.balletbo@collabora.com
2018-04-24 08:34:46 +02:00
Douglas Anderson
71cef82434
drm/bridge: analogix_dp: Properly log AUX CH errors
...
The code in analogix_dp_transfer() that was supposed to print out:
AUX CH error happened
Was actually dead code. That's because the previous check (whether
the interrupt status indicated any errors) would have hit for all
errors anyway.
Let's combine the two error checks so we can actually see AUX CH
errors. We'll also downgrade the message to a warning since some of
these types of errors might be expected for some displays. If this
gets too noisy we can downgrade again to debug.
Cc: 征增 王 <wzz@rock-chips.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-20-enric.balletbo@collabora.com
2018-04-24 08:34:46 +02:00
Douglas Anderson
2f8d216002
drm/bridge: analogix_dp: Reorder plat_data->power_off to happen sooner
...
The current user of the analogix power_off is "analogix_dp-rockchip".
That driver does this:
- deactivate PSR
- turn off a clock
Both of these things (especially deactive PSR) should be done before
we turn the PHY power off and turn off analog power. Let's move the
callback up.
Note that without this patch (and with
https://patchwork.kernel.org/patch/9553349/ [seanpaul: this patch was
not applied, but it seems like the race can still occur]), I experienced
an error in reboot testing where one thread was at:
rockchip_drm_psr_deactivate
rockchip_dp_powerdown
analogix_dp_bridge_disable
drm_bridge_disable
...and the other thread was at:
analogix_dp_send_psr_spd
analogix_dp_enable_psr
analogix_dp_psr_set
psr_flush_handler
The flush handler thread was finding AUX channel errors and eventually
reported "Failed to apply PSR", where I had a kgdb breakpoint. Presumably
the device would have eventually given up and shut down anyway, but it
seems better to fix the order to be more correct.
Cc: Kristian H. Kristensen <hoegsberg@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-19-enric.balletbo@collabora.com
2018-04-24 08:34:45 +02:00
zain wang
6f4638a196
drm/bridge: analogix_dp: Move fast link training detect to set_bridge
...
It's too early to detect fast link training, if other step after it
failed, we will set fast_link flag to 1, and retry set_bridge again. In
this case we will power down and power up panel power supply, and we
will do fast link training since we have set fast_link flag to 1. In
fact, we should do full link training now, not the fast link training.
So we should move the fast link detection at the end of set_bridge.
Cc: Tomasz Figa <tfiga@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-18-enric.balletbo@collabora.com
2018-04-24 08:34:44 +02:00
zain wang
4805b7ce50
drm/bridge: analogix_dp: Fix incorrect operations with register ANALOGIX_DP_FUNC_EN_1
...
Register ANALOGIX_DP_FUNC_EN_1(offset 0x18), Rockchip is different to
Exynos:
on Exynos edp phy,
BIT 7 MASTER_VID_FUNC_EN_N
BIT 6 reserved
BIT 5 SLAVE_VID_FUNC_EN_N
on Rockchip edp phy,
BIT 7 reserved
BIT 6 RK_VID_CAP_FUNC_EN_N
BIT 5 RK_VID_FIFO_FUNC_EN_N
So, we should do some private operations to Rockchip.
Cc: Tomasz Figa <tfiga@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-17-enric.balletbo@collabora.com
2018-04-24 08:34:43 +02:00
zain wang
c4d3b1a21e
drm/bridge: analogix_dp: Fix timeout of video streamclk config
...
The STRM_VALID bit in register ANALOGIX_DP_SYS_CTL_3 may be unstable,
so we may hit the error log "Timeout of video streamclk ok" since
checked this unstable bit.
In fact, we can go continue and the streamclk is ok if we wait enough time,
it does no effect on display.
Let's change this error to warn.
Cc: Douglas Anderson <dianders@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-16-enric.balletbo@collabora.com
2018-04-24 08:34:42 +02:00
zain wang
ac0c0b611d
drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pll
...
There is no register named ANALOGIX_DP_PLL_CTL in Rockchip edp phy reg
list. We should use BIT_4 in ANALOGIX_DP_PD to control the pll power
instead of ANALOGIX_DP_PLL_CTL.
Cc: Douglas Anderson <dianders@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-15-enric.balletbo@collabora.com
2018-04-24 08:34:41 +02:00
zain wang
2a7b44c524
drm/rockchip: Restore psr->state when enable/disable psr failed
...
If we failed disable psr, it would hang the display until next psr
cycle coming. So we should restore psr->state when it failed.
Cc: Tomasz Figa <tfiga@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-14-enric.balletbo@collabora.com
2018-04-24 08:34:40 +02:00
Lin Huang
d44ba84433
drm/bridge: analogix_dp: Reset aux channel if an error occurred
...
AUX errors are caused by many different reasons. We may not know what
happened in aux channel on failure, so let's reset aux channel if some
errors occurred.
Cc: 征增 王 <wzz@rock-chips.com >
Cc: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Lin Huang <hl@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-13-enric.balletbo@collabora.com
2018-04-24 08:34:39 +02:00
zain wang
f12da6877e
drm/bridge: analogix_dp: Fix AUX_PD bit for Rockchip
...
There are some different bits between Rockchip and Exynos in register
"AUX_PD". This patch fixes the incorrect operations about it.
Cc: Douglas Anderson <dianders@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-12-enric.balletbo@collabora.com
2018-04-24 08:34:38 +02:00
Lin Huang
ccdc578b69
drm/bridge: analogix_dp: Check dpcd write/read status
...
We need to check the dpcd write/read return value to see whether the
write/read was successful
Cc: Kristian H. Kristensen <hoegsberg@chromium.org >
Signed-off-by: Lin Huang <hl@rock-chips.com >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-11-enric.balletbo@collabora.com
2018-04-24 08:34:37 +02:00
zain wang
1932250df1
drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode
...
Enhanced mode is required by the eDP 1.2 specification, and not doing it
early could result in a period of time where we have a link transmitting
idle packets without it. Since there is no reason to disable it, we just
enable it at the beginning of link training and then keep it on all the
time.
Cc: Tomasz Figa <tfiga@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-10-enric.balletbo@collabora.com
2018-04-24 08:34:36 +02:00
Lin Huang
606c5e64c6
drm/bridge: analogix_dp: Extend hpd check time to 100ms
...
There was a 1ms delay to detect the hpd signal, which is too short to
detect a short pulse. This patch extends this delay to 100ms.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Cc: 征增 王 <wzz@rock-chips.com >
Signed-off-by: Lin Huang <hl@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-9-enric.balletbo@collabora.com
2018-04-24 08:34:35 +02:00
Lin Huang
63872659fc
drm/bridge: analogix_dp: Ensure edp is disabled when shutting down the panel
...
When panel is shut down, we should make sure edp can be disabled to avoid
undefined behavior.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: Lin Huang <hl@rock-chips.com >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-8-enric.balletbo@collabora.com
2018-04-24 08:34:35 +02:00
zain wang
d79acb5932
drm/bridge: analogix_dp: Set PD_INC_BG first when powering up edp phy
...
Following the correct power up sequence:
dp_pd=ff => dp_pd=7f => wait 10us => dp_pd=00
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-7-enric.balletbo@collabora.com
2018-04-24 08:34:34 +02:00
zain wang
7f6414143a
drm/bridge: analogix_dp: Wait for HPD signal before configuring link
...
According to DP spec v1.3 chap 3.5.1.2 Link Training, Link Policy Maker
must first detect that the HPD signal is asserted high by the Downstream
Device before establishing a link with it.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-6-enric.balletbo@collabora.com
2018-04-24 08:34:33 +02:00
zain wang
8a335736f9
drm/bridge: analogix_dp: Retry bridge enable when it failed
...
When we enable bridge failed, we have to retry it, otherwise we would get
the abnormal display.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-5-enric.balletbo@collabora.com
2018-04-24 08:34:32 +02:00
zain wang
7ba8fb5704
drm/bridge: analogix_dp: Don't use fast link training when panel just powered up
...
Panel would reset its setting when it powers down. It would forget the last
succeeded link training setting. So we can't use the last successful link
training setting to do fast link training. Let's reset fast_train_enable in
analogix_dp_bridge_disable();
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-4-enric.balletbo@collabora.com
2018-04-24 08:34:31 +02:00
Lin Huang
c2021db190
drm/bridge: analogix_dp: Check AUX_EN status when doing AUX transfer
...
We should check AUX_EN bit to confirm the AUX CH operation is completed.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: Lin Huang <hl@rock-chips.com >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-3-enric.balletbo@collabora.com
2018-04-24 08:34:30 +02:00
Lin Huang
93cba9dab1
drm/bridge: analogix_dp: Move enable video into config_video()
...
We need to enable video before analogix_dp_is_video_stream_on(), so
we can get the right video stream status.
We needed to increase the delay in the timeout loop because there is
random "Timeout of video streamclk ok" message happen when debug edp
panel, this time do not define in the spec.
Cc: 征增 王 <wzz@rock-chips.com >
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: Lin Huang <hl@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-2-enric.balletbo@collabora.com
2018-04-24 08:34:29 +02:00
zain wang
ce31ddd5c4
drm/bridge: analogix_dp: Only wait for panel ACK on PSR entry
...
We currently wait for the panel to mirror our intended PSR state
before continuing on both PSR enter and PSR exit. This is really
only important to do when we're entering PSR, since we want to
be sure the last frame we pushed is being served from the panel's
internal fb before shutting down the soc blocks (vop/analogix).
This patch changes the behavior such that we only wait for the
panel to complete the PSR transition when we're entering PSR, and
to skip verification when we're exiting.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Cc: Sonny Rao <sonnyrao@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-7-enric.balletbo@collabora.com
2018-03-14 12:24:50 +01:00
zain wang
f9d5680596
drm/bridge: analogix_dp: add fast link train for eDP
...
We would meet a short black screen when exit PSR with the full link
training, In this case, we should use fast link train instead of full
link training.
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
[dropped header reordering]
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-6-enric.balletbo@collabora.com
2018-03-14 11:29:31 +01:00
zain wang
243e398aab
drm/bridge: analogix_dp: Don't change psr while bridge is disabled
...
There is a race between AUX CH bring-up and enabling bridge which will
cause link training to fail. To avoid hitting it, don't change psr state
while enabling the bridge.
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Cc: Sean Paul <seanpaul@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Caesar Wang <wxt@rock-chips.com >
[seanpaul fixed up the commit message a bit and renamed *_supported to *_enabled]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-4-enric.balletbo@collabora.com
2018-03-14 11:29:31 +01:00
Yakir Yang
1d38e421be
drm/bridge: analogix_dp: detect Sink PSR state after configuring the PSR
...
Make sure the request PSR state takes effect in analogix_dp_send_psr_spd()
function, or print the sink PSR error state if we failed to apply the
requested PSR setting.
Cc: 征增 王 <wzz@rock-chips.com >
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: Yakir Yang <ykk@rock-chips.com >
[seanpaul changed timeout loop to a readx poll]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-2-enric.balletbo@collabora.com
2018-03-14 11:29:30 +01:00
Marek Szyprowski
2e9b3e74b4
drm/bridge: analogix_dp: Don't create useless connectors
...
If there is another bridge after analogix_dp, then the connector object
should not be created. This fixes following timeouts on Exynos5420-based
Chromebook2 Peach-PIT board during boot:
exynos-dp 145b0000.dp-controller: AUX CH cmd reply timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-4-m.szyprowski@samsung.com
2018-03-07 16:18:00 +01:00
Marek Szyprowski
f25c835815
drm/bridge: analogix_dp: Postpone enabling runtime power management
...
Enabling runtime power management early in analogix_dp_bind() causes following
kernel NULL pointer dereference:
Unable to handle kernel NULL pointer dereference at virtual address 000007d8
pgd = 28ffa2e4
[000007d8] *pgd=00000000
Internal error: Oops: 5 [#1 ] PREEMPT SMP ARM
Modules linked in:
CPU: 6 PID: 69 Comm: kworker/6:1 Not tainted 4.16.0-rc1-00062-ge25751974ba8 #3622
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events deferred_probe_work_func
PC is at analogix_dp_resume+0x8/0xc0
LR is at pm_generic_runtime_resume+0x2c/0x38
pc : [<c0531b98>] lr : [<c0543fec>] psr: a0000113
sp : ee13fbd8 ip : 0000001a fp : 00000001
r10: ee0eb080 r9 : c0552bd8 r8 : c0fb1d98
r7 : eebb1010 r6 : eeae9808 r5 : 00000000 r4 : d4850415
r3 : ee0ed010 r2 : b2d05e00 r1 : 00000000 r0 : 00000000
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c5387d Table: 2000406a DAC: 00000051
Process kworker/6:1 (pid: 69, stack limit = 0x913205b4)
Stack: (0xee13fbd8 to 0xee140000)
...
[<c0531b98>] (analogix_dp_resume) from [<c0543fec>] (pm_generic_runtime_resume+0x2c/0x38)
[<c0543fec>] (pm_generic_runtime_resume) from [<c054ffb4>] (__genpd_runtime_resume+0x2c/0x8c)
[<c054ffb4>] (__genpd_runtime_resume) from [<c0552d24>] (genpd_runtime_resume+0x14c/0x258)
[<c0552d24>] (genpd_runtime_resume) from [<c0547798>] (__rpm_callback+0x134/0x214)
[<c0547798>] (__rpm_callback) from [<c0547898>] (rpm_callback+0x20/0x80)
[<c0547898>] (rpm_callback) from [<c0546ff4>] (rpm_resume+0x3a0/0x734)
[<c0546ff4>] (rpm_resume) from [<c05475ec>] (__pm_runtime_resume+0x64/0x9c)
[<c05475ec>] (__pm_runtime_resume) from [<c053b95c>] (__device_attach+0x8c/0x134)
[<c053b95c>] (__device_attach) from [<c053ad08>] (bus_probe_device+0x88/0x90)
[<c053ad08>] (bus_probe_device) from [<c05390d0>] (device_add+0x3a8/0x580)
[<c05390d0>] (device_add) from [<c06764c4>] (i2c_register_adapter+0xd4/0x3ec)
[<c06764c4>] (i2c_register_adapter) from [<c05321c8>] (analogix_dp_bind+0x2a0/0x410)
[<c05321c8>] (analogix_dp_bind) from [<c0528e90>] (exynos_dp_bind+0x9c/0x12c)
[<c0528e90>] (exynos_dp_bind) from [<c0535bc4>] (component_bind_all+0xfc/0x258)
[<c0535bc4>] (component_bind_all) from [<c0522ee8>] (exynos_drm_bind+0x15c/0x28c)
[<c0522ee8>] (exynos_drm_bind) from [<c0536378>] (try_to_bring_up_master+0x1b8/0x29c)
[<c0536378>] (try_to_bring_up_master) from [<c05364fc>] (component_add+0xa0/0x170)
[<c05364fc>] (component_add) from [<c0528fe4>] (exynos_dp_probe+0x64/0xb8)
[<c0528fe4>] (exynos_dp_probe) from [<c053debc>] (platform_drv_probe+0x50/0xb0)
[<c053debc>] (platform_drv_probe) from [<c053bd18>] (driver_probe_device+0x2b8/0x4a0)
[<c053bd18>] (driver_probe_device) from [<c0539e4c>] (bus_for_each_drv+0x44/0x8c)
[<c0539e4c>] (bus_for_each_drv) from [<c053b970>] (__device_attach+0xa0/0x134)
[<c053b970>] (__device_attach) from [<c053ad08>] (bus_probe_device+0x88/0x90)
[<c053ad08>] (bus_probe_device) from [<c053b258>] (deferred_probe_work_func+0x3c/0x168)
[<c053b258>] (deferred_probe_work_func) from [<c014352c>] (process_one_work+0x1d0/0x7bc)
[<c014352c>] (process_one_work) from [<c0143b84>] (worker_thread+0x34/0x4dc)
[<c0143b84>] (worker_thread) from [<c014a30c>] (kthread+0x128/0x164)
[<c014a30c>] (kthread) from [<c01010b4>] (ret_from_fork+0x14/0x20)
Exception stack(0xee13ffb0 to 0xee13fff8)
ffa0: 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e2800e37 eafee601 e92d4070 e1a05000 (e59067d8)
---[ end trace bf6046013df7cab2 ]---
This oops happens, because analogix_dp_bind() calls drm_dp_aux_register()
which registers i2c adapter. I2C core tries to runtime get i2c host
device during registration. This ends in analogix_dp_resume(), but dp
context is NULL there. dp context is set in exynos_dp_bind() after
executing analogix_dp_bind(). Fix this issue by postponing enabling runtime
power management after drm_dp_aux_register().
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-3-m.szyprowski@samsung.com
2018-03-07 16:17:58 +01:00
zain wang
ea2a14da0f
drm/bridge: analogix_dp: Don't power bridge in analogix_dp_bind
...
The bridge does not need to be powered in analogix_dp_bind(), so
remove the calls to pm_runtime_get()/phy_power_on()/analogix_dp_init_dp()
as well as their power-off counterparts.
Cc: Stéphane Marchesin <marcheu@chromium.org >
Signed-off-by: zain wang <wzz@rock-chips.com >
Signed-off-by: Caesar Wang <wxt@rock-chips.com >
[the patch originally just removed the power_on portion, seanpaul removed
the power off code as well as improved the commit message]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-2-m.szyprowski@samsung.com
2018-03-07 16:17:56 +01:00
Jeffy Chen
7fe201cd55
drm/bridge: analogix_dp: Fix connector and encoder cleanup
...
Since we are initing connector in the core driver and encoder in the
plat driver, let's clean them up in the right places.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180110162348.22765-3-thierry.escande@collabora.com
2018-03-01 15:50:50 +01:00