Andrzej Hajda
269ed8eec9
drm/bridge/sii8620: send EMSC features on request
...
Device should report to the peer which features are really supported.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-22-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:29 +05:30
Andrzej Hajda
bf1722cab5
drm/bridge/sii8620: rewrite hdmi start sequence
...
MHL3 protocol requires registry adjustments depending on chosen video mode.
Necessary information is gathered in mode_fixup callback. In case of HDMI
video modes driver should also send special AVI and MHL3 infoframes.
The patch introduces generic helpers for handling MHL3 infoframes, in
case of appearance of other users of MHL3 infoframes these function can
be moved to common library.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-21-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:29 +05:30
Andrzej Hajda
003f9929f8
drm/bridge/sii8620: fix disconnect sequence
...
The patch allows to avoid rare cases when discovery fails.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-19-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:28 +05:30
Andrzej Hajda
263b5c93a2
drm/bridge/sii8620: split EDID read and write code
...
MHL3 requires that after reading EDID from the sink source should ask
peer for features. To make both protocols happy the patch splits the code
accordingly.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-18-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:28 +05:30
Andrzej Hajda
4dc3c07127
drm/bridge/sii8620: add delay during cbus reset
...
Without delay CBUS sometimes was not reset properly.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-17-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:27 +05:30
Andrzej Hajda
6bed9bc2ae
drm/bridge/sii8620: do not stop MHL output when TMDS input is stopped
...
Stopping output causes full re-detection of the sink and slows down the
process.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-16-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:27 +05:30
Andrzej Hajda
26a4cef815
drm/bridge/sii8620: set gen2 write burst before sending MSC command
...
Write burst should be enabled for MHL_INT_RC_FEAT_REQ and disabled for
other commands. The patch moves functions up and adds delay setting
for MHL3 burst mode.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-15-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:26 +05:30
Andrzej Hajda
9a466cd1dd
drm/bridge/sii8620: abstract out sink detection code
...
MHL1 and MHL3 have different initialization paths. To make both protocols
happy sink detection is put into continuation after link mode enablement.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-14-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:26 +05:30
Andrzej Hajda
ef822a0745
drm/bridge/sii8620: fix initialization sequence for MHL2 receivers
...
MHL2 receiver require disabling transmitter on initialization.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-13-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:26 +05:30
Andrzej Hajda
d6d59c5a57
drm/bridge/sii8620: fix MSC message removal
...
Messages queue can be cleaned up by message callbacks, to avoid repeated
removal of current message it should be removed from the queue before
calling these callbacks.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-12-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:25 +05:30
Andrzej Hajda
73a5d25d50
drm/bridge/sii8620: remove spare CBUS bring-up sequence
...
In case of MHL3 CBUS is bring-up already in sii8620_got_ecbus_speed.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-11-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:25 +05:30
Andrzej Hajda
e3a654872d
drm/bridge/sii8620: fix peer device capabilities read code
...
Peer capabilities should be read differently depending on protocol version.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-10-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:24 +05:30
Andrzej Hajda
4a36888585
drm/bridge/sii8620: respond to feature requests
...
MHL3 protocol requires device to respond to feature request from peer.
This minimal answer fulfills the requirement and allows to continue
negotiation.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-9-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:24 +05:30
Andrzej Hajda
e19e9c692f
drm/bridge/sii8620: add support for burst eMSC transmissions
...
Burst transmissions are used in MHL3 mode negotiation.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-8-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:24 +05:30
Andrzej Hajda
2c8fb853c0
drm/bridge/sii8620: initial support for eCBUS-S mode
...
The Single-ended eCBUS Mode (eCBUS-S) mode provides 60 Mb/s full-duplex
bidirectional traffic for three channels:
- CBUS data (CBUS1 channel),
- High-bandwidth MHL data (eMSC channel),
- tunneling data (T-CBUS channel).
It is required to fully support MHL3 dongles.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-6-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:23 +05:30
Andrzej Hajda
0c2d18756b
drm/bridge/sii8620: add continuations to messages
...
Due to asynchronous nature of MHL flow of execution is dispersed.
Logical continuation of some actions happens after response of peer,
i.e in interrupt handler. To simplify coding continuation mechanism
has been added - it is now possible to provide continuation callback,
which will be called after peer responds to given action.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-5-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:22 +05:30
Andrzej Hajda
e9c6da270a
drm/bridge/sii8620: add reading device capability registers
...
This functionality is necessary to implement MHL3 modes.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-4-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:22 +05:30
Andrzej Hajda
bb4954c77c
drm/bridge/sii8620: add MHL3 mode check helper
...
MHL3 modes differs significantly from MHL1 mode, this helper will be used
frequently to clearly distinguish them.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-3-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:22 +05:30
Andrzej Hajda
dd12312906
drm/bridge/sii8620: simplify MHL3 mode setting
...
It is not necessary to set REG_COC_CTL0, REG_MHL_COC_CTL1 registers.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-2-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:21 +05:30
Liviu Dudau
82260364fd
drm/etnaviv: Remove duplicate header file include
...
etnaviv_gem.h header gets included twice. Remove duplicate.
Signed-off-by: Liviu Dudau <liviu@dudau.co.uk >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
2017-02-02 10:30:51 +01:00
Lucas Stach
e17d0bf23f
Revert "drm/etnaviv: trick drm_mm into giving out a low IOVA"
...
Now that commandstreams are handled through the cmdbuf suballocator
the workaround to make the IOVA games work is not needed anymore.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2017-02-02 10:30:43 +01:00
Lucas Stach
e66774dd6f
drm/etnaviv: add cmdbuf suballocator
...
There are 3 big benefits to suballocating a single big DMA buffer
for command submission:
1. Avoid hammering CMA. The old way of allocating and freeing a DMA
buffer for each submission was hitting some of the real slow
pathes in CMA, as this allocator was not designed for a concurrent
small buffers load.
2. Less TLB flushes on IOMMUv2. If a new command buffer is mapped into
the GPU address space the MMU TLBs need to be flushed. By having
one big buffer statically mapped to the GPU, a lot of those flushes
can be avoided.
3. No funky workarounds for GC3000. The FE TLB flush on GC3000 isn't
reliable. To work around that we tried to lay out the cmdbufs in
the GPU address space in a way to avoid this issue. This hasn't
always worked if the address space is crowded. A single statically
mapped buffer avoids the erratum completely.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2017-02-02 10:30:37 +01:00
Lucas Stach
9912b4db7b
drm/etnaviv: get cmdbuf physical address through the cmdbuf abstraction
...
Don't allow IOMMUv2 to peek directly into the cmdbuf, but get the
needed PA through a dedicated function.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2017-02-02 10:30:27 +01:00
Lucas Stach
c3ef4b8c3e
drm/etnaviv: wire up iova handling in new cmdbuf abstraction
...
Don't call the IOMMU directly, but go through the new cmdbuf abstraction.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2017-02-02 10:30:20 +01:00
Lucas Stach
ea1f5729aa
drm/etnaviv: move cmdbuf de-/allocation into own file
...
This will get more complex with the following changes, so move it
into its own place.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2017-02-02 10:30:15 +01:00
Lucas Stach
d46450737c
drm/etnaviv: always flush MMU TLBs on map/unmap
...
This ensures that the GPU isn't able to write into already freed
objects, as doing this in the IOVA reaper isn't enough, as the
gem_free_object path will also cause unmaps to happen.
On MMUv2 this also ensures that stale entries, which may have
been prefetched into the TLB will be purged.
The flush is low overhead, as it gets batched up with the next
user command buffer, so this isn't incuring an overhead for
each buffer map/unmap.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2017-02-02 10:30:08 +01:00
Bhumika Goyal
bc179f08d2
drm/etnaviv: constify etnaviv_iommu_ops structures
...
Declare etnaviv_iommu_ops structure as const as it is only used when
the reference of one of its field is stored in the ops field of a
iommu_domain structure. This ops field is of type const, so
etnaviv_iommu_ops structures having similar properties can be declared
const too.
Done using Coccinelle.
Before and after size details of .o file remains the same after
cross compiling for arm architecture.
lst: Trimmed commit message, apply the same change to iommu_v2.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
2017-02-02 10:29:52 +01:00
Gabriel Krisman Bertazi
cbdded7f8a
drm: qxl: Embed drm_device into driver structure
...
This is the recommended way to create the drm_device structure,
according to DRM documentation.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-4-krisman@collabora.co.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2017-02-02 10:02:37 +01:00
Gabriel Krisman Bertazi
d74d74aeaf
drm: qxl: Drop duplicated pci_device pointer attribute
...
qxl_device duplicates the pointer to struct pci_dev, which is not
needed since we already have it in the drm_device structure. Clean it
up.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-3-krisman@collabora.co.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2017-02-02 10:02:36 +01:00
Gabriel Krisman Bertazi
5472bdee3f
drm: qxl: Drop duplicated device pointer attribute
...
qxl_device duplicates a pointer to struct device, which is not needed
since we already have it in the drm_device structure. Clean it up.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-2-krisman@collabora.co.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2017-02-02 10:02:34 +01:00
Gabriel Krisman Bertazi
768851b92c
drm: qxl: Drop misleading comment
...
No longer true since commit 07f8d9bdb2
("drm/qxl: add support for > 1
output"). qxl_num_crtc defaults to 4 and is configurable as a module
parameter.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170127010548.27970-1-krisman@collabora.co.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2017-02-02 10:02:33 +01:00
Max Staudt
1acf566195
drm/bochs: Implement nomodeset
...
Up until now, the bochsdrm driver didn't handle the nomodeset option
at boot, and didn't provide a "modeset" module option either.
This patch implements both.
The new parameter can be used by specifying bochs-drm.modeset=0
at boot time.
Signed-off-by: Max Staudt <mstaudt@suse.de >
Link: http://patchwork.freedesktop.org/patch/msgid/1484763012-17783-1-git-send-email-mstaudt@suse.de
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: David Airlie <airlied@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2017-02-02 10:02:32 +01:00
Maarten Lankhorst
37255d8d3f
drm/i915: Fix POWER_DOMAIN_AUDIO refcounting.
...
If the crtc was brought up with audio before the driver loads,
then crtc_disable will remove a refcount to audio that doesn't exist
before.
Fortunately we already set power domains on readout, so we can just add
the power domain handling to get_crtc_power_domains, which will update
the power domains correctly in all cases.
This was found when testing module reload on CI with the crtc enabled,
which resulted in the following warn after module reload + modeset:
[ 24.197041] ------------[ cut here ]------------
[ 24.197075] WARNING: CPU: 0 PID: 99 at drivers/gpu/drm/i915/intel_runtime_pm.c:1790 intel_display_power_put+0x134/0x140 [i915]
[ 24.197076] Use count on domain AUDIO is already zero
[ 24.197098] CPU: 0 PID: 99 Comm: kworker/u8:2 Not tainted 4.9.0-CI-Trybot_393+ #1
[ 24.197099] Hardware name: /NUC6i5SYB, BIOS SYSKLi35.86A.0042.2016.0409.1246 04/09/2016
[ 24.197102] Workqueue: events_unbound async_run_entry_fn
[ 24.197105] ffffc900003c7688 ffffffff81435b35 ffffc900003c76d8 0000000000000000
[ 24.197107] ffffc900003c76c8 ffffffff8107e4d6 000006fe5dc36f28 ffff88025dc30054
[ 24.197109] ffff88025dc36f28 ffff88025dc30000 ffff88025dc30000 0000000000000015
[ 24.197110] Call Trace:
[ 24.197113] [<ffffffff81435b35>] dump_stack+0x67/0x92
[ 24.197116] [<ffffffff8107e4d6>] __warn+0xc6/0xe0
[ 24.197118] [<ffffffff8107e53a>] warn_slowpath_fmt+0x4a/0x50
[ 24.197149] [<ffffffffa039b4b4>] intel_display_power_put+0x134/0x140 [i915]
[ 24.197187] [<ffffffffa04217dd>] intel_disable_ddi+0x4d/0x80 [i915]
[ 24.197223] [<ffffffffa03f388f>] intel_encoders_disable.isra.74+0x7f/0x90 [i915]
[ 24.197257] [<ffffffffa03f6c05>] haswell_crtc_disable+0x55/0x170 [i915]
[ 24.197292] [<ffffffffa03fec88>] intel_atomic_commit_tail+0x108/0xfd0 [i915]
[ 24.197295] [<ffffffff810d47c6>] ? __lock_is_held+0x66/0x90
[ 24.197330] [<ffffffffa03fff79>] intel_atomic_commit+0x429/0x560 [i915]
[ 24.197332] [<ffffffff81570186>] ?drm_atomic_add_affected_connectors+0x56/0xf0
[ 24.197334] [<ffffffff8156f726>] drm_atomic_commit+0x46/0x50
[ 24.197336] [<ffffffff81553f87>] restore_fbdev_mode+0x147/0x270
[ 24.197337] [<ffffffff81555bee>] drm_fb_helper_restore_fbdev_mode_unlocked+0x2e/0x70
[ 24.197339] [<ffffffff81555aa8>] drm_fb_helper_set_par+0x28/0x50
[ 24.197374] [<ffffffffa041c7d3>] intel_fbdev_set_par+0x13/0x70 [i915]
[ 24.197376] [<ffffffff8149e07a>] fbcon_init+0x57a/0x600
[ 24.197379] [<ffffffff81514b71>] visual_init+0xd1/0x130
[ 24.197381] [<ffffffff8151603c>] do_bind_con_driver+0x1bc/0x3a0
[ 24.197384] [<ffffffff81516521>] do_take_over_console+0x111/0x180
[ 24.197386] [<ffffffff8149e152>] do_fbcon_takeover+0x52/0xb0
[ 24.197387] [<ffffffff814a12c3>] fbcon_event_notify+0x723/0x850
[ 24.197390] [<ffffffff810a4830>] ?__blocking_notifier_call_chain+0x30/0x70
[ 24.197392] [<ffffffff810a44a4>] notifier_call_chain+0x34/0xa0
[ 24.197394] [<ffffffff810a4848>] __blocking_notifier_call_chain+0x48/0x70
[ 24.197397] [<ffffffff810a4881>] blocking_notifier_call_chain+0x11/0x20
[ 24.197398] [<ffffffff814a4556>] fb_notifier_call_chain+0x16/0x20
[ 24.197400] [<ffffffff814a678c>] register_framebuffer+0x24c/0x330
[ 24.197402] [<ffffffff815558d9>] drm_fb_helper_initial_config+0x219/0x3c0
[ 24.197436] [<ffffffffa041d373>] intel_fbdev_initial_config+0x13/0x30 [i915]
[ 24.197438] [<ffffffff810a5d44>] async_run_entry_fn+0x34/0x140
[ 24.197440] [<ffffffff8109c26c>] process_one_work+0x1ec/0x6b0
[ 24.197442] [<ffffffff8109c1e6>] ? process_one_work+0x166/0x6b0
[ 24.197445] [<ffffffff8109c779>] worker_thread+0x49/0x490
[ 24.197447] [<ffffffff8109c730>] ? process_one_work+0x6b0/0x6b0
[ 24.197448] [<ffffffff810a2a9b>] kthread+0xeb/0x110
[ 24.197451] [<ffffffff810a29b0>] ? kthread_park+0x60/0x60
[ 24.197453] [<ffffffff818241a7>] ret_from_fork+0x27/0x40
[ 24.197476] ---[ end trace bda64b683b8e8162 ]---
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1481812185-19098-3-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-02-01 22:05:07 +01:00
Maarten Lankhorst
a667fb402c
drm/i915: Disable all crtcs during driver unload, v2.
...
We may keep the crtc's enabled when userspace unsets all framebuffers but
keeps the crtc active. This exposes a WARN in fbc_global disable, and
a lot of bugs in our hardware readout code. Solve this by disabling
all crtc's for now.
Changes since v1:
- Use lock_all_ctx instead of lock_all.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1481812185-19098-4-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-02-01 22:04:37 +01:00
Eric Anholt
4078f57571
drm/vc4: Add DSI driver
...
The DSI0 and DSI1 blocks on the 2835 are related hardware blocks.
Some registers move around, and the featureset is slightly different,
as DSI1 (the 4-lane DSI) is a later version of the hardware block.
This driver doesn't yet enable DSI0, since we don't have any hardware
to test against, but it does put a lot of the register definitions and
code in place.
v2: Use the clk_hw interfaces, don't set CLK_IS_BASIC (from review by
Stephen Boyd)
Signed-off-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch > (v1)
Link: http://patchwork.freedesktop.org/patch/msgid/20170131192912.11316-1-eric@anholt.net
2017-02-01 12:51:23 -08:00
Eric Anholt
a86773d120
drm/vc4: Add support for feeding DSI encoders from the pixel valve.
...
We have to set a different pixel format, which tells the hardware to
use the pix_width field that's fed in sideband from the DSI encoder to
divide the "pixel" clock.
Signed-off-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161214194621.16499-6-eric@anholt.net
2017-02-01 12:51:22 -08:00
Eric Anholt
d17a1bb9b8
drm/vc4: Set up SCALER_DISPCTRL at boot.
...
We want the HVS on, obviously, and we also want DSP3 (PV1's source) to
be muxed from HVS channel 2 like we expect in vc4_crtc.c. The
firmware wasn't setting the DSP3 mux up when both the LCD and HDMI
were disabled.
Signed-off-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161214194621.16499-5-eric@anholt.net
2017-02-01 12:51:22 -08:00
Takashi Iwai
969218fee1
drm: Clean up the 1366x768 fixup codes
...
This is just a cleanup, no functional change.
The fixup code for 1366x768 in drm_mode_create_from_cmdline_mode() is
basically a copy of the existing code in drm_edid.c. Make the latter
code public so that it can be called from the former function.
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117164329.10551-1-tiwai@suse.de
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
[vsyrjala: include drm_crtc_internal.h to make sparse happy]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
2017-02-01 19:01:47 +02:00
Chris Wilson
453cfe2171
drm/i915/execlists: Add interrupt-pending check to intel_execlists_idle()
...
Primarily this serves as a sanity check that the bit has been cleared
before we suspend (and hasn't reappeared after resume).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Tvrtko Ursulin <tursulin@ursulin.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170201131222.11882-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-02-01 15:23:06 +00:00
Chris Wilson
e2de845e0b
drm/i915/execlists: Skip resetting RING_CONTEXT_STATUS_PTR
...
As we now flag when the GPU signals a context-switch and do not read the
status register before we see that signal, we do not have to ensure that
it is cleared upon reset (and can leave it to the GPU to reset it from
the power context).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Tvrtko Ursulin <tursulin@ursulin.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170201125338.12932-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-02-01 15:22:38 +00:00
Takashi Iwai
b1c01f4df2
drm/i915: Pass platform device to LPE audio notifier
...
This allows the LPE HDMI driver to clean up its global variable
reference.
Also drop to pass the eld pointer because the connection status and
the ELD bytes can be retrieved from the attached pdata.
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2017-02-01 16:22:28 +01:00
Takashi Iwai
f95e29b921
drm/i915: Pass pipe to LPE audio notification
...
The LPE audio configuration depends on the pipe, thus we need to pass
the currently used pipe. It's now embedded in struct
intel_hdmi_lpe_audio_eld as well as port id.
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2017-02-01 16:22:10 +01:00
Takashi Iwai
9c9191f3de
drm/i915: Avoid MST pipe handling for LPE audio
...
The pipe gets cleared to -1 for non-MST before the ELD audio
notification due to the MST audio support. This makes sense for
HD-audio that received the MST handling, but it's useless for LPE
audio. Handle the MST pipe hack conditionally only for HD-audio.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2017-02-01 16:21:59 +01:00
Pierre-Louis Bossart
d5d8c3a19e
drm/i915: add DisplayPort amp unmute for LPE audio mode
...
Enable unmute/mute amp notification. This doesn't seem to affect
HDMI support so this is done unconditionally.
An earlier version of this patch set a chicken bit at address 0x62F38
prior to the mute/unmute but this register doesn't seem to do anything
so this phase was removed.
v1->v2: Drop needless pipe A check, avoid temporary reg offset variable.
v2->v3: Add "_" prefix to VLV_AUD_PORT_EN_X_DBG as they are internal.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2017-02-01 16:21:49 +01:00
Pierre-Louis Bossart
b5f2be9ae5
drm/i915: add DP support in LPE audio mode
...
If DisplayPort is detected, pass flag and link rate to audio driver
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2017-02-01 16:21:38 +01:00
Uma Shankar
1881a4234e
drm/i915: Add MIPI_IO WA and program DSI regulators
...
Enable MIPI IO WA for BXT DSI as per bspec and
program the DSI regulators.
v2: Moved IO enable to pre-enable as per Mika's
review comments. Also reused the existing register
definition for BXT_P_CR_GT_DISP_PWRON.
v3: Added Programming the DSI regulators as per disable/enable
sequences.
v4: Restricting regulator changes to BXT as suggested by
Jani/Mika
v5: Removed redundant read/modify for regulator register as
per Jani's comment. Maintain enable/disable symmetry as per spec.
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com >
Acked-by: Mika Kahola <mika.kahola@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1485353603-11260-1-git-send-email-vidya.srinivas@intel.com
2017-02-01 16:18:45 +02:00
Chris Wilson
69aeafeae9
drm/i915: Flush untouched framebuffers before display on !llc
...
On a non-llc system, the objects are created with .cache_level =
CACHE_NONE and so the transition to uncached for scanout is a no-op.
However, if the object was never written to, it will still be in the CPU
domain (having been zeroed out by shmemfs). Those cachelines need to be
flushed prior to display.
Reported-and-tested-by: Vito Caputo
Fixes: a6a7cc4b7d
("drm/i915: Always flush the dirty CPU cache when pinning the scanout")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Link: http://patchwork.freedesktop.org/patch/msgid/20170109111932.6342-1-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-02-01 10:54:17 +00:00
Daniel Vetter
e2b06d71bd
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
...
Chris Wilson wants the new fence tracepoint added in
commit 8c96c67801
Author: Chris Wilson <chris@chris-wilson.co.uk >
Date: Tue Jan 24 11:57:58 2017 +0000
dma/fence: Export enable-signaling tracepoint for emission by drivers
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
2017-02-01 10:58:11 +01:00
Chris Wilson
e8fe4f4b2b
drm/i915: Track pinned vma in intel_plane_state
...
With atomic plane states we are able to track an allocation right from
preparation, during use and through to the final free after being
swapped out for a new plane. We can couple the VMA we pin for the
framebuffer (and its rotation) to this lifetime and avoid all the clumsy
lookups in between.
v2: Remove residual vma on plane cleanup (Chris)
v3: Add a description for the vma destruction in
intel_plane_destroy_state (Maarten)
References: https://bugs.freedesktop.org/show_bug.cgi?id=98829
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-1-chris@chris-wilson.co.uk
Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
(cherry picked from commit be1e341513
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1485854491-27389-3-git-send-email-maarten.lankhorst@linux.intel.com
2017-02-01 11:45:21 +02:00
Maarten Lankhorst
eeee74a4f6
drm/atomic: Unconditionally call prepare_fb.
...
Atomic drivers may set properties like rotation on the same fb, which
may require a call to prepare_fb even when framebuffer stays identical.
Instead of handling all the special cases in the core, let the driver
decide when prepare_fb and cleanup_fb are noops.
This is a revert of:
commit fcc60b413d
Author: Keith Packard <keithp@keithp.com >
Date: Sat Jun 4 01:16:22 2016 -0700
drm: Don't prepare or cleanup unchanging frame buffers [v3]
The original commit mentions that this prevents waiting in i915 on all
previous rendering during cursor updates, but there are better ways to
fix this.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/6d82f9b6-9d16-91d1-d176-4a37b09afc44@linux.intel.com
(cherry picked from commit 0532be078a
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1485854491-27389-2-git-send-email-maarten.lankhorst@linux.intel.com
2017-02-01 11:44:39 +02:00