Alex Deucher
57bcd0a636
drm/amdgpu/si: fix crash on headless asics
...
Missing check for crtcs present.
Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=193341
https://bugs.freedesktop.org/show_bug.cgi?id=99387
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-02-02 11:13:50 -05:00
Chris Wilson
f30c92576a
drm: Provide a driver hook for drm_dev_release()
...
Some state is coupled into the device lifetime outside of the
load/unload timeframe and requires teardown during final unreference
from drm_dev_release(). For example, dmabufs hold both a device and
module reference and may live longer than expected (i.e. the current
pattern of the driver tearing down its state and then releasing a
reference to the drm device) and yet touch driver private state when
destroyed.
v2: Export drm_dev_fini() and move the responsibility for finalizing the
drm_device and freeing it to the release callback. (If no callback is
provided, the core will call drm_dev_fini() and kfree(dev) as before.)
v3: Remember to add drm_dev_fini() to drm_drv.h
v4: Tidy language for kerneldoc
v5: Cross reference from drm_dev_init() to note that driver->release()
allows for arbitrary embedding.
v6: Refer to driver data rather than driver state, as state is now
becoming associated with the struct drm_atomic_state and friends.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
[danvet: Use the proper reference for struct members, which is
&drm_driver.release.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170202093632.31017-1-chris@chris-wilson.co.uk
2017-02-02 15:58:06 +01:00
Jani Nikula
3aac4acb89
drm/i915: don't warn about Skylake CPU - KabyPoint PCH combo
...
Apparently there are machines out there with Skylake CPU and KabyPoint
PCH. Judging from our driver code, there doesn't seem to be any code
paths that would do anything different between SunrisePoint and
KabyPoint PCHs, so it would seem okay to accept the combo without
warnings.
Fixes: 22dea0be50 ("drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.")
References: https://lists.freedesktop.org/archives/intel-gfx/2017-February/118611.html
Reported-by: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com >
Cc: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: <stable@vger.kernel.org > # v4.8+
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1485956769-26015-1-git-send-email-jani.nikula@intel.com
2017-02-02 16:24:58 +02:00
Neil Armstrong
8aaacbc0e5
drm: meson: rename driver name to meson-drm
...
The platform driver name is currently "meson" which can lead to some
confusion, this patch renames it to "meson-drm" and removes the owner
attribute since is always added by __platform_driver_register called by the
module_platform_driver() macro.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1486028864-19622-3-git-send-email-narmstrong@baylibre.com
2017-02-02 15:19:56 +01:00
Neil Armstrong
3e6e2fd553
drm: meson: rename module name to meson-drm
...
The module is currently named "meson.ko" which can lead to some
confusion, this patches renames it "meson-drm.ko"
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1486028864-19622-2-git-send-email-narmstrong@baylibre.com
2017-02-02 15:19:53 +01:00
Chris Wilson
170b03c4a8
drm/i915: Build DRM range manager selftests for CI
...
Build the struct drm_mm selftests so that we can trivially run them
within our CI.
"Enable debug, become developer." - Joonas Lahtinen
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170125101102.9010-3-chris@chris-wilson.co.uk
2017-02-02 13:59:05 +00:00
Juergen Gross
5584f1b1d7
drm/i915: fix i915 running as dom0 under Xen
...
Commit 920cf41949 ("drm/i915: Introduce an internal allocator for
disposable private objects") introduced a regression for the kernel
running as Xen dom0: when switching to graphics mode a GPU HANG
occurred.
Reason seems to be a missing adaption similar to that done in
commit 7453c549f5 ("swiotlb: Export swiotlb_max_segment to users")
to i915_gem_object_get_pages_internal().
So limit the maximum page order to be used according to the maximum
swiotlb segment size instead to the complete swiotlb size.
Fixes: 920cf41949 ("drm/i915: Introduce an internal allocator for disposable private objects")
Signed-off-by: Juergen Gross <jgross@suse.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170202094711.939-1-jgross@suse.com
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: intel-gfx@lists.freedesktop.org
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-02-02 12:25:40 +00:00
Andrzej Hajda
45d0ea86d2
drm/bridge/sii8620: enable interlace modes
...
Bug in DECON(CRTC) driver prevented interlace modes from proper work.
Since DECON is fixed interlace modes can be enabled in MHL.
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-26-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:31 +05:30
Andrzej Hajda
9fc6ade810
drm/bridge/sii8620: enable MHL3 mode if possible
...
Since all sub-protocols of MHL3 are already supported MHL3 mode can be
enabled. With this patch it is possible to use packed pixel modes and
clocks up to 300MHz - 1920x1080@60Hz and 4K 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-25-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:31 +05:30
Andrzej Hajda
a21e658bfb
drm/bridge/sii8620: add HSIC initialization code
...
In case of MHL3 HSIC should be initialized.
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-24-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:30 +05:30
Andrzej Hajda
581a923730
drm/bridge/sii8620: improve gen2 write burst IRQ routine
...
The patch adds code to report back feature complete IRQ, and code
to read and drop burst writes from peer.
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-23-git-send-email-a.hajda@samsung.com
2017-02-02 15:15:30 +05:30
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