Chris Zhong
a432e05405
drm/rockchip/dsi: dw-mipi: correct the coding style
...
correct the coding style, according the checkpatch scripts
Signed-off-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-4-git-send-email-zyw@rock-chips.com
2017-03-01 14:49:01 -05:00
Chris Zhong
ef6eba1992
drm/rockchip/dsi: dw-mipi: support RK3399 mipi dsi
...
The vopb/vopl switch register of RK3399 mipi is different from RK3288,
the default setting for mipi dsi mode is different too, so add a
of_device_id structure to distinguish them, and make sure set the
correct mode before mipi phy init.
Signed-off-by: Chris Zhong <zyw@rock-chips.com >
Signed-off-by: Mark Yao <mark.yao@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-3-git-send-email-zyw@rock-chips.com
2017-03-01 14:49:01 -05:00
John Keeping
f3b7a5b838
drm/rockchip: dw-mipi-dsi: add reset control
...
In order to fully reset the state of the MIPI controller we must assert
this reset.
This is slightly more complicated than it could be in order to maintain
compatibility with device trees that do not specify the reset property.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-24-john@metanate.com
2017-03-01 14:48:59 -05:00
John Keeping
03a5832c0e
drm/rockchip: dw-mipi-dsi: support non-burst modes
...
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-23-john@metanate.com
2017-03-01 14:48:59 -05:00
John Keeping
2f8f2d2991
drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded
...
This ensures that the output resolution is known before fbcon loads.
mipi_dsi_host_register() is moved above dw_mipi_dsi_register() to
simplify error cleanup since the order of these operations does not
matter.
Signed-off-by: John Keeping <john@metanate.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-22-john@metanate.com
2017-03-01 14:48:58 -05:00
John Keeping
d790ad03ed
drm/rockchip: vop: test for P{H,V}SYNC
...
When connected to the MIPI DSI output, we need to use N{H,V}SYNC for the
internal connection but these flags are meaningless for DSI panels.
Switch the test so that we do not set the P{H,V}SYNC bits unless the
mode requires it.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Mark Yao <mark.yao@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
[seanpaul resolved conflict using macros instead of hardcoded values]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-21-john@metanate.com
2017-03-01 14:48:58 -05:00
John Keeping
2b0c4b70b1
drm/rockchip: dw-mipi-dsi: use positive check for N{H, V}SYNC
...
This matches other drivers.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-20-john@metanate.com
2017-03-01 14:48:57 -05:00
John Keeping
4413697141
drm/rockchip: dw-mipi-dsi: use specific poll helper
...
As the documentation for readx_poll_timeout says, we want to use the
specialized macro for readl rather than using the generic version
directly.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-19-john@metanate.com
2017-03-01 14:48:57 -05:00
John Keeping
b0a45fec59
drm/rockchip: dw-mipi-dsi: improve PLL configuration
...
The multiplication ratio for the PLL is required to be even due to the
use of a "by 2 pre-scaler". Currently we are likely to end up with an
odd multiplier even though there is an equivalent set of parameters with
an even multiplier.
For example, using the 324MHz bit rate with a reference clock of 24MHz
we end up with M = 27, N = 2 whereas the example in the PHY databook
gives M = 54, N = 4 for this bit rate and reference clock.
By walking down through the available multiplier instead of up we are
more likely to hit an even multiplier. With the above example we do now
get M = 54, N = 4 as given by the databook.
While doing this, change the loop limits to encode the actual limits on
the divisor, which are:
40MHz >= (pllref / N) >= 5MHz
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-18-john@metanate.com
2017-03-01 14:48:56 -05:00
John Keeping
3fdfb4f170
drm/rockchip: dw-mipi-dsi: properly configure PHY timing
...
These values are specified as constant time periods but the PHY
configuration is in terms of the current lane byte clock so using
constant values guarantees that the timings will be outside the
specification with some display configurations.
Derive the necessary configuration from the byte clock in order to
ensure that the PHY configuration is correct.
Signed-off-by: John Keeping <john@metanate.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-17-john@metanate.com
2017-03-01 14:48:56 -05:00
John Keeping
d969c1553c
drm/rockchip: dw-mipi-dsi: configure PHY before enabling
...
The bias, bandgap and PLL should all be configured before we enable
them.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-16-john@metanate.com
2017-03-01 14:48:55 -05:00
John Keeping
efe83cee34
drm/rockchip: dw-mipi-dsi: ensure PHY is reset
...
Also don't power up the DSI host at this point since this is not
necessary in order to configure the PHY and we do so later when
selecting video or command mode.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-15-john@metanate.com
2017-03-01 14:48:55 -05:00
John Keeping
1bef24bae2
drm/rockchip: dw-mipi-dsi: fix escape clock rate
...
This clock rate is derived from the PHY PLL, so it should be calculated
dynamically. This calculation is the same as that used by the vendor
kernel and ensures that the escape clock runs at <20MHz as required by
the MIPI specification.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-14-john@metanate.com
2017-03-01 14:48:54 -05:00
John Keeping
96ad6f0b8d
drm/rockchip: dw-mipi-dsi: allow commands in panel_disable
...
Panel drivers may want to sent commands during the disable function, for
example MIPI_DCS_SET_DISPLAY_OFF before the video signal ends. In order
to send commands we need to write to registers, so pclk must be enabled.
While changing this, remove the unnecessary code after the panel
unprepare call which seems to be a workaround for a specific panel and
thus belongs in the panel driver.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-13-john@metanate.com
2017-03-01 14:48:54 -05:00
John Keeping
8a7df73ff9
drm/rockchip: dw-mipi-dsi: prepare panel after phy init
...
Some panels need to be configured with commands sent over the MIPI link,
which they will do in the prepare hook. Call this after the PHY has
been initialized so that we are able to send commands to the panel.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-12-john@metanate.com
2017-03-01 14:48:53 -05:00
John Keeping
1ed498b03d
drm/rockchip: dw-mipi-dsi: don't assume buffer is aligned
...
By dereferencing the MIPI command buffer as a u32* we rely on it being
correctly aligned on ARM, but this may not be the case. Copy it into a
stack variable that will be correctly aligned.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-11-john@metanate.com
2017-03-01 14:48:53 -05:00
John Keeping
7361c6f829
drm/rockchip: dw-mipi-dsi: only request HS clock when required
...
Requesting the HS clock from the PHY before we initialize it causes an
invalid signal to be sent out since the input clock is not yet
configured. The PHY databook suggests only asserting this signal when
performing HS transfers, so let's do that.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-10-john@metanate.com
2017-03-01 14:48:52 -05:00
John Keeping
52c66e4f6e
drm/rockchip: dw-mipi-dsi: respect message flags
...
Instead of always sending commands in LP mode, respect the
MIPI_DSI_MSG_USE_LPM flag to decide how to send each message. Also
request acks if MIPI_DSI_MSG_REQ_ACK is set.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-9-john@metanate.com
2017-03-01 14:48:52 -05:00
John Keeping
028316fb6f
drm/rockchip: dw-mipi-dsi: include bad value in error message
...
As an aid to debugging.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-8-john@metanate.com
2017-03-01 14:48:51 -05:00
John Keeping
dad17ed01e
drm/rockchip: dw-mipi-dsi: avoid out-of-bounds read on tx_buf
...
As a side-effect of this, encode the endianness explicitly rather than
casting a u16.
Signed-off-by: John Keeping <john@metanate.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-7-john@metanate.com
2017-03-01 14:48:51 -05:00
John Keeping
480564a033
drm/rockchip: dw-mipi-dsi: fix generic packet status check
...
We want to check that both the GEN_CMD_EMPTY and GEN_PLD_W_EMPTY bits
are set so we can't just check "val & mask" because that will be true if
either bit is set.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-6-john@metanate.com
2017-03-01 14:48:50 -05:00
John Keeping
d3852c212d
drm/rockchip: dw-mipi-dsi: fix command header writes
...
In a couple of places here we use "val" for the value that is about to
be written to a register but then reuse the same variable for the value
of a status register before we get around to writing it. Rename the
value to be written to so that we write the value we intend to and not
what we have just read from the status register.
Signed-off-by: John Keeping <john@metanate.com >
Tested-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-5-john@metanate.com
2017-03-01 14:48:49 -05:00
John Keeping
2ba0f4a4c3
drm/rockchip: dw-mipi-dsi: remove mode_set hook
...
This is not needed since we can access the mode via the CRTC from the
enable hook. Also remove the "mode" field that is no longer used.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-4-john@metanate.com
2017-03-01 14:48:49 -05:00
John Keeping
0f2c3ad54a
drm/rockchip: dw-mipi-dsi: pass mode in where needed
...
This shows that we only use the mode from the enable function and
prepares us to remove the "mode" field and the mode_set hook in the next
commit.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Chris Zhong <zyw@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-3-john@metanate.com
2017-03-01 14:48:48 -05:00
John Keeping
5e408d7a28
drm/rockchip: dw-mipi-dsi: don't configure hardware in mode_set for MIPI
...
With atomic modesetting the hardware will be powered off when the
mode_set function is called. We should configure the hardware in the
enable function, which is the atomic version of "commit" so let's use
the enable hook rather than commit while we're at it.
Signed-off-by: John Keeping <john@metanate.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-2-john@metanate.com
2017-03-01 14:48:48 -05:00
Chris Wilson
dd689287b9
drm/i915: Prevent concurrent tiling/framebuffer modifications
...
Reintroduce a lock around tiling vs framebuffer creation to prevent
modification of the obj->tiling_and_stride whilst the framebuffer is
being created. Rather than use struct_mutex once again, use the
per-object lock - this will also be required in future to prevent
changing the tiling whilst submitting rendering.
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Fixes: 24dbf51a55
("drm/i915: struct_mutex is not required for allocating the framebuffer")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170301154128.2841-2-chris@chris-wilson.co.uk
2017-03-01 17:57:17 +00:00
Chris Wilson
9aceb5c15d
drm/i915: Fix all intel_framebuffer_init failures to take the error path
...
No more direct return -EINVAL as we have to unwind the
obj->framebuffer_references.
Fixes: 24dbf51a55
("drm/i915: struct_mutex is not required for allocating the framebuffer")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170301154128.2841-1-chris@chris-wilson.co.uk
2017-03-01 17:57:16 +00:00
Linus Torvalds
3437f9f0a6
Merge tag 'drm-ast-2500-for-v4.11' of git://people.freedesktop.org/~airlied/linux
...
Pull drm AST2500 support from Dave Airlie:
"This is a set of changes to enable the AST2500 BMC hardware, and also
fix some bugs interacting with the older AST hardware.
Some of the bug fixes are cc'ed to stable"
* tag 'drm-ast-2500-for-v4.11' of git://people.freedesktop.org/~airlied/linux:
drm/ast: Call open_key before enable_mmio in POST code
drm/ast: Fix test for VGA enabled
drm/ast: POST code for the new AST2500
drm/ast: Rename ast_init_dram_2300 to ast_post_chip_2300
drm/ast: Factor mmc_test code in POST code
drm/ast: Fixed vram size incorrect issue on POWER
drm/ast: Base support for AST2500
drm/ast: Fix calculation of MCLK
drm/ast: Remove spurious include
drm/ast: const'ify mode setting tables
drm/ast: Handle configuration without P2A bridge
drm/ast: Fix AST2400 POST failure without BMC FW or VBIOS
2017-03-01 09:42:42 -08:00
Linus Torvalds
f3ecc84b09
Merge tag 'drm-fixes-for-v4.11-rc1' of git://people.freedesktop.org/~airlied/linux
...
Pull drm fixes from Dave Airlie:
"Misc fixes for v4.11-rc1.
This is a selection of fixes for recent bugs, the vmwgfx one is
important to avoid a regression, and compat ioctl one is pretty urgent
for stable. Otherwise nothing too much.
I've got a separate pull req for some AST hw IBM need to enable"
* tag 'drm-fixes-for-v4.11-rc1' of git://people.freedesktop.org/~airlied/linux:
dma-buf: add support for compat ioctl
drm/vmwgfx: Work around drm removal of control nodes
drm/rockchip: cdn-dp: Fix error handling
drm/rockchip: add extcon dependency for DP
drm: zte: fix static checker warning on variable 'fmt'
2017-03-01 08:50:33 -08:00
Manasi Navare
233ce881dd
drm/i915: Implement Link Rate fallback on Link training failure
...
If link training at a link rate optimal for a particular
mode fails during modeset's atomic commit phase, then we
let the modeset complete and then retry. We save the link rate
value at which link training failed, update the link status property
to "BAD" and use a lower link rate to prune the modes. It will redo
the modeset on the current mode at lower link rate or if the current
mode gets pruned due to lower link constraints then, it will send a
hotplug uevent for userspace to handle it.
This is also required to pass DP CTS tests 4.3.1.3, 4.3.1.4,
4.3.1.6.
v9:
* Use the trimmed max values of link rate/lane count based on
link train fallback (Daniel Vetter)
v8:
* Set link_status to BAD first and then call mode_valid (Jani Nikula)
v7:
Remove the redundant variable in previous patch itself
v6:
* Obtain link rate index from fallback_link_rate using
the helper intel_dp_link_rate_index (Jani Nikula)
* Include fallback within intel_dp_start_link_train (Jani Nikula)
v5:
* Move set link status to drm core (Daniel Vetter, Jani Nikula)
v4:
* Add fallback support for non DDI platforms too
* Set connector->link status inside set_link_status function
(Jani Nikula)
v3:
* Set link status property to BAd unconditionally (Jani Nikula)
* Dont use two separate variables link_train_failed and link_status
to indicate same thing (Jani Nikula)
v2:
* Squashed a few patches (Jani Nikula)
Acked-by: Tony Cheng <tony.cheng@amd.com >
Acked-by: Harry Wentland <Harry.wentland@amd.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/d796cc0c2814d668a47ef43c464f9a4089d46d64.1481883920.git.jani.nikula@intel.com
2017-03-01 16:44:35 +01:00
Noralf Trønnes
81895b5409
drm/msm: Remove drm_debugfs_remove_files() calls
...
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so it's not necessary to call
drm_debugfs_remove_files(). Additionally it uses
debugfs_remove_recursive() to clean up the debugfs files, so no need
to do that.
Cc: robdclark@gmail.com
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-10-noralf@tronnes.org
2017-03-01 16:09:52 +01:00
Noralf Trønnes
b05eeb0f47
drm/i915: Remove i915_debugfs_unregister()
...
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so no need to do this explicitly. Additionally it
uses debugfs_remove_recursive() to clean up the debugfs files,
so no need for adding fake drm_info_node entries.
Cc: daniel.vetter@intel.com
Cc: jani.nikula@linux.intel.com
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-20-noralf@tronnes.org
2017-03-01 16:09:52 +01:00
Noralf Trønnes
cc14d46ba1
drm/qxl: Remove qxl_debugfs_takedown()
...
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so the drm_driver.debugfs_cleanup callback is not
needed.
Cc: airlied@linux.ie
Cc: kraxel@redhat.com
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-19-noralf@tronnes.org
2017-03-01 16:09:52 +01:00
Noralf Trønnes
e663112e27
drm/virtio: Remove virtio_gpu_debugfs_takedown()
...
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so the drm_driver.debugfs_cleanup callback is not
needed.
Cc: airlied@linux.ie
Cc: kraxel@redhat.com
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-18-noralf@tronnes.org
2017-03-01 16:09:52 +01:00
Noralf Trønnes
1a54082a95
drm/nouveau: Remove nouveau_drm_debugfs_cleanup()
...
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so the drm_driver.debugfs_cleanup callback is not
needed. Additionally it uses debugfs_remove_recursive() to clean
up the debugfs files, so no need for adding fake drm_info_node
entries.
Cc: bskeggs@redhat.com
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-11-noralf@tronnes.org
2017-03-01 16:09:52 +01:00
Noralf Trønnes
b516a6c954
drm/armada: Remove armada_drm_debugfs_cleanup()
...
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so no need to do this explicitly. Additionally it
uses debugfs_remove_recursive() to clean up the debugfs files,
so no need for adding fake drm_info_node entries.
And finally there's no need to clean up on error,
drm_debugfs_cleanup() is called in the error path.
Cc: linux@armlinux.org.uk
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-6-noralf@tronnes.org
2017-03-01 16:09:51 +01:00
Hans de Goede
25b4620ee8
drm/i915/dsi: Skip delays for v3 VBTs in vid-mode
...
For v3 VBTs in vid-mode the delays are part of the VBT sequences, so
we should not also delay ourselves otherwise we get double delays.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-11-git-send-email-jani.nikula@intel.com
2017-03-01 15:58:08 +02:00
Hans de Goede
38dec5c089
drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested)
...
According to the spec we should call MIPI_SEQ_TEAR_ON and DISPLAY_ON
on enable for cmd-mode, just like we already call their counterparts
on disable. Note: untested, my panel is a vid-mode panel.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-10-git-send-email-jani.nikula@intel.com
2017-03-01 15:58:06 +02:00
Hans de Goede
7108b436c2
drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable
...
For v3+ VBTs we should call MIPI_SEQ_TEAR_OFF before MIPI_SEQ_DISPLAY_OFF,
v2 VBTs do not have MIPI_SEQ_TEAR_OFF so there this is a nop.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-9-git-send-email-jani.nikula@intel.com
2017-03-01 15:58:04 +02:00
Hans de Goede
3983145164
drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order
...
According to the spec for v2 VBTs we should call MIPI_SEQ_DISPLAY_OFF
before sending SHUTDOWN, where as for v3 VBTs we should send SHUTDOWN
first.
Since the v2 order has known issues, we use the v3 order everywhere,
add a comment documenting this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-8-git-send-email-jani.nikula@intel.com
2017-03-01 15:58:02 +02:00
Hans de Goede
f5bce6df88
drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight
...
Execute the MIPI_SEQ_BACKLIGHT_ON/OFF VBT sequences at the same time as
we call intel_panel_enable_backlight() / intel_panel_disable_backlight().
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-7-git-send-email-jani.nikula@intel.com
2017-03-01 15:57:59 +02:00
Hans de Goede
3e40fa8a31
drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready()
...
Execute MIPI_SEQ_DEASSERT_RESET before putting the device in ready
state (LP-11), this is the sequence in which things should be done
according to the spec.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-6-git-send-email-jani.nikula@intel.com
2017-03-01 15:57:57 +02:00
Hans de Goede
deae2006a3
drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable
...
Move the DPOunit clock gate workaround to directly after the PLL enable.
The exact location of the workaround does not matter and there are 2
reasons to group it with the PLL enable:
1) This moves it out of the middle of the init sequence from the spec,
making it easier to follow the init sequence / compare it to the spec
2) It is grouped with the pll disable call in intel_dsi_post_disable,
so for consistency it should be grouped with the pll enable in
intel_dsi_pre_enable
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-5-git-send-email-jani.nikula@intel.com
2017-03-01 15:57:53 +02:00
Hans de Goede
c7dc5275bc
drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls
...
Now that we are no longer bound to the drm_panel_ callbacks, call
MIPI_SEQ_POWER_ON/OFF at the proper place.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-4-git-send-email-jani.nikula@intel.com
2017-03-01 15:57:51 +02:00
Hans de Goede
19c17df3cb
drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON
...
intel_dsi_post_disable(), which does the MIPI_SEQ_ASSERT_RESET,
will always be called at some point before intel_dsi_pre_enable()
making the MIPI_SEQ_ASSERT_RESET in intel_dsi_pre_enable() redundant.
In addition, calling MIPI_SEQ_ASSERT_RESET in the enable path goes
against the VBT spec.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-3-git-send-email-jani.nikula@intel.com
2017-03-01 15:57:49 +02:00
Hans de Goede
249f696235
drm/i915/dsi: Document the panel enable / disable sequences from the spec
...
Document the DSI panel enable / disable sequences from the spec,
for easy comparison between the code and the spec.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-2-git-send-email-jani.nikula@intel.com
2017-03-01 15:57:46 +02:00
Jani Nikula
9160095c0e
drm/i915: use BUILD_BUG_ON to ensure platform name has been set up
...
Leave the runtime check in place in case the platform variable itself
comes from bogus sources.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488280303-9323-1-git-send-email-jani.nikula@intel.com
2017-03-01 13:11:24 +02:00
Imre Deak
0129936ddd
drm/i915/gen9: Increase PCODE request timeout to 50ms
...
After
commit 2c7d0602c8
Author: Imre Deak <imre.deak@intel.com >
Date: Mon Dec 5 18:27:37 2016 +0200
drm/i915/gen9: Fix PCODE polling during CDCLK change notification
there is still one report of the CDCLK-change request timing out on a
KBL machine, see the Reference link. On that machine the maximum time
the request took to succeed was 34ms, so increase the timeout to 50ms.
v2:
- Change timeout from 100 to 50 ms to maintain the current 50 ms limit
for atomic waits in the driver. (Chris, Tvrtko)
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=99345
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: <stable@vger.kernel.org >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Acked-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/1487946730-17162-1-git-send-email-imre.deak@intel.com
2017-03-01 13:05:07 +02:00
Deepak M
4644848369
drm/i915/glk: Add MIPIIO Enable/disable sequence
...
v2: Addressed Jani's Review comments(renamed bit field macros)
v3: Jani's Review comment for aligning code to platforms and added
wrapper functions.
v4: Corrected enable/disable seuqence as per BSPEC
v5: Corrected waiting twice for same bit (Review comments: Jani)
v6: Rebased to Han's patches(dsi restructuring code)
Signed-off-by: Deepak M <m.deepak@intel.com >
Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1488352893-29916-2-git-send-email-madhav.chauhan@intel.com
2017-03-01 12:41:06 +02:00
Chris Wilson
f4c3a88e5f
drm/i915: Tighten mmio arrays for MIPI_PORT
...
drivers/gpu/drm/i915/intel_dsi.c: In function ‘intel_dsi_prepare’:
drivers/gpu/drm/i915/intel_dsi.c:1308:1: error: the frame size of 2488 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
which is caused by the compiling expanding every _MIPI_PORT into an
on-stack array of u32[3] at every callsite. Not sure why only one
machine/compiler appears susceptible, but with a minor tweak to _MIPI_PORT
we can defer the error until later.
This is a partial revert of commit ce64645d86
("drm/i915: use variadic
macros and arrays to choose port/pipe based registers") for a particular
bad offender.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170228145519.18012-1-chris@chris-wilson.co.uk
Acked-by: Jani Nikula <jani.nikula@intel.com >
2017-03-01 09:45:43 +00:00