Ville Syrjälä
83aefbb887
drm: Add drm_connector_for_each_possible_encoder()
...
Add a convenience macro for iterating connector->encoder_ids[].
Isolates the users from the implementation details.
Note that we don't seem to pass the file_priv down to drm_encoder_find()
because encoders apparently don't get leased. No idea why
drm_encoder_finc() even takes the file_priv actually.
Also use ARRAY_SIZE() when populating the array to avoid spreading
knowledge about the array size all over.
v2: Hide the drm_encoder_find() in the macro, and
rename the macro appropriately (Daniel)
v3: Fix kernel docs (Daniel)
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180628131315.14156-4-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2018-07-05 16:52:07 +03:00
Ville Syrjälä
20431c05ae
drm/i915: Nuke intel_mst_best_encoder()
...
With the fb-helper no longer relying on the non-atomic .best_encoder()
we can eliminate the hook from the MST encoder.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180628131315.14156-3-ville.syrjala@linux.intel.com
2018-07-05 16:52:07 +03:00
Ville Syrjälä
0d99889109
drm/fb-helper: Eliminate the .best_encoder() usage
...
Instead of using the .best_encoder() hook to figure out whether a given
connector+crtc combo will work, let's instead do what userspace does and
just iterate over all the encoders for the connector, and then check
each crtc against each encoder's possible_crtcs bitmask.
v2: Avoid oopsing on NULL encoders (Daniel)
s/connector_crtc_ok/connector_has_possible_crtc/
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Cc: Harry Wentland <harry.wentland@amd.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180628131315.14156-2-ville.syrjala@linux.intel.com
2018-07-05 16:52:07 +03:00
Rodrigo Siqueira
c91b007ed1
drm/vkms: Add extra information about vkms
...
Add the following additional information: authors and description in
Kconfig.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Haneen Mohammed <hamohammed.sa@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/180770375b0537f1ba1857bdb7fdc71dd201882e.1526514457.git.rodrigosiqueiramelo@gmail.com
2018-07-05 09:46:33 -03:00
Rodrigo Siqueira
854502fa0a
drm/vkms: Add basic CRTC initialization
...
This commit adds the essential infrastructure for around CRTCs which
is composed of: a new data struct for output data information, a
function for creating planes, and a simple encoder attached to the
connector. Finally, due to the introduction of a new initialization
function, connectors were moved from vkms_drv.c to vkms_display.c.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Haneen Mohammed <hamohammed.sa@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b6e27bc6a54f5cb340658fa5969f7b48fbfbf1b7.1526514457.git.rodrigosiqueiramelo@gmail.com
2018-07-05 09:46:23 -03:00
Rodrigo Siqueira
c04372ea4a
drm/vkms: Add mode_config initialization
...
Initialize minimum and maximum width and height of the frame buffers
with default values.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Haneen Mohammed <hamohammed.sa@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/75c55df671f24b037f9172700b479f4bb2fa7c92.1526514457.git.rodrigosiqueiramelo@gmail.com
2018-07-05 09:46:15 -03:00
kbuild test robot
41111ce17e
drm/vkms: vkms_driver can be static
...
Fixes: 58d8108f080c ("drm/vkms: Introduce basic VKMS driver")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Acked-by: Haneen Mohammed <hamohammed.sa@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180515113052.GA111532@lkp-ib04
2018-07-05 09:46:05 -03:00
Haneen Mohammed
1c7c5fd916
drm/vkms: Introduce basic VKMS driver
...
This patch introduces Virtual Kernel Mode-Setting (VKMS) driver. It
creates a very basic kms driver with 1 crtc/encoder/connector/plane.
VKMS driver would be useful for testing, or for running X (or similar)
on headless machines and be able to still use the GPU. Thus it enables
a virtual display without the need for hardware display capability.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180514143346.GA21695@haneen-vb
2018-07-05 09:45:56 -03:00
Kees Cook
c51756d56e
drm/sun4i: Remove VLA usage
...
In the quest to remove all stack VLA usage from the kernel[1], this
switches to using a kmalloc allocation and moves all the size calculations
to the start to do an allocation. If an upper bounds on the mode timing
calculations could be determined, a fixed stack size could be used instead.
[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180629184740.GA37415@beast
2018-07-04 17:44:10 +02:00
Dan Carpenter
968d72e6a5
drm/savage: off by one in savage_bci_cmdbuf()
...
The > should be >= here so that we don't read beyond the end of the
dma->buflist[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180704094810.whrgn6jxe7uibnfv@kili.mountain
2018-07-04 14:27:01 +02:00
Daniel Vetter
4dd3cdb281
dma-fence: Polish kernel-doc for dma-fence.c
...
- Intro section that links to how this is exposed to userspace.
- Lots more hyperlinks.
- Minor clarifications and style polish
v2: Add misplaced hunk of kerneldoc from a different patch.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Gustavo Padovan <gustavo@padovan.org >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180704092909.6599-6-daniel.vetter@ffwll.ch
2018-07-04 12:18:37 +02:00
Dan Carpenter
de10eba0f6
drm/vgem: off by one in vgem_gem_fault()
...
If page_offset is == num_pages then we end up reading beyond the end of
obj->pages[].
Fixes: af33a9190d ("drm/vgem: Enable dmabuf import interfaces")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180703122921.brlfxl4vx2ybvrd2@kili.mountain
2018-07-03 15:06:15 +02:00
Dan Carpenter
a1de8d0a7e
drm/i810: off by one in i810_dma_vertex()
...
If vertex->idx == dma->buf_count then we end up reading one element
beyond the end of the dma->buflist[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180703123015.kma7v7rwtdy4urce@kili.mountain
2018-07-03 15:00:42 +02:00
Daniel Vetter
64e625cf53
drm/virtio: Remove unecessary dma_fence_ops
...
dma_fence_default_wait is the default now, same for the trivial
enable_signaling implementation.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: David Airlie <airlied@linux.ie >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: virtualization@lists.linux-foundation.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-15-daniel.vetter@ffwll.ch
2018-07-03 13:14:18 +02:00
Daniel Vetter
144b097955
drm/vc4: Remove unecessary dma_fence_ops
...
dma_fence_default_wait is the default now, same for the trivial
enable_signaling implementation.
v2: Also remove the relase hook, dma_fence_free is the default.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20180504140901.27471-1-daniel.vetter@ffwll.ch
2018-07-03 13:14:10 +02:00
Daniel Vetter
93f8252bcb
drm/qxl: Remove unecessary dma_fence_ops
...
The trivial enable_signaling implementation matches the default code.
v2: Fix up commit message to match patch better (Eric).
Cc: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: virtualization@lists.linux-foundation.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-12-daniel.vetter@ffwll.ch
2018-07-03 13:13:56 +02:00
Daniel Vetter
51eebbc76b
drm/etnaviv: Remove unecessary dma_fence_ops
...
dma_fence_default_wait is the default now, same for the trivial
enable_signaling implementation.
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Russell King <linux+etnaviv@armlinux.org.uk >
Cc: Christian Gmeiner <christian.gmeiner@gmail.com >
Cc: etnaviv@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-8-daniel.vetter@ffwll.ch
2018-07-03 13:13:27 +02:00
Daniel Vetter
99e227cb03
drm: Remove unecessary dma_fence_ops
...
dma_fence_default_wait is the default now, same for the trivial
enable_signaling implementation.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Gustavo Padovan <gustavo@padovan.org >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Sean Paul <seanpaul@chromium.org >
Cc: David Airlie <airlied@linux.ie >
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-7-daniel.vetter@ffwll.ch
2018-07-03 13:13:22 +02:00
Daniel Vetter
95f9e2636a
drm/amdgpu: Remove unecessary dma_fence_ops
...
dma_fence_default_wait is the default now.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: Monk Liu <Monk.Liu@amd.com >
Cc: pding <Pixel.Ding@amd.com >
Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Cc: Evan Quan <evan.quan@amd.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Kees Cook <keescook@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-6-daniel.vetter@ffwll.ch
2018-07-03 13:13:08 +02:00
Daniel Vetter
418cc6ca06
dma-fence: Make ->wait callback optional
...
Almost everyone uses dma_fence_default_wait.
v2: Also remove the BUG_ON(!ops->wait) (Chris).
Reviewed-by: Christian König <christian.koenig@amd.com > (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Gustavo Padovan <gustavo@padovan.org >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-5-daniel.vetter@ffwll.ch
2018-07-03 13:12:57 +02:00
Russell King
070473bcf7
drm: add missing ctx argument to plane transitional helpers
...
In commits:
34a2ab5e06 ("drm: Add acquire ctx parameter to ->update_plane")
1931529448 ("drm: Add acquire ctx parameter to ->plane_disable")
a pointer to a drm_modeset_acquire_ctx structure was added as an
argument to the method prototypes. The transitional helpers are
supposed to be directly plugged in as implementations of these
methods, but doing so generates a warning. Add the missing
argument.
A number of buggy users were added for drm_plane_helper_disable()
which need to be fixed up for this change, which we do by passing
a NULL ctx argument.
Fixes: 1931529448 ("drm: Add acquire ctx parameter to ->plane_disable")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/E1fa1Zr-0005gT-VF@rmk-PC.armlinux.org.uk
2018-07-03 09:30:19 +02:00
Daniel Vetter
ba6096311b
drm: Fix hdmi connector content type property docs
...
Apparently didn't get carefully checked.
Fixes: 50525c332b ("drm: content-type property for HDMI connector")
Cc: Hans Verkuil <hans.verkuil@cisco.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180702091023.695-1-daniel.vetter@ffwll.ch
2018-07-03 08:58:57 +02:00
Ville Syrjälä
ea63272595
drm/vmwgfx: Use drm_plane_mask() & co.
...
Use drm_{plane,connector}_mask() where appropriate.
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com >
Cc: Sinclair Yeh <syeh@vmware.com >
Cc: Thomas Hellstrom <thellstrom@vmware.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-10-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2018-07-02 18:45:56 +03:00
Ville Syrjälä
c0183a8eae
drm/vc4: Use drm_crtc_mask()
...
Use drm_crtc_mask() where appropriate.
Cc: Eric Anholt <eric@anholt.net >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-9-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
2018-07-02 18:45:56 +03:00
Ville Syrjälä
dbf8f9e40e
drm/sun4i: Use drm_crtc_mask()
...
Use drm_crtc_mask() where appropriate.
Cc: Maxime Ripard <maxime.ripard@bootlin.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-8-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com >
2018-07-02 18:45:56 +03:00
Ville Syrjälä
2d4569fd8d
drm/imx: Use drm_plane_mask()
...
Use drm_plane_mask() where appropriate.
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-6-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
2018-07-02 18:45:56 +03:00
Ville Syrjälä
40560e26dc
drm/i915: Use drm_plane_mask() & co.
...
Use drm_{plane,crtc,encoder,connector}_mask() where appropriate.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-5-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2018-07-02 18:45:55 +03:00
Ville Syrjälä
737057321f
drm: Add drm_connector_mask()
...
Add drm_connector_mask() which returns the 1<<index for the connector.
We already have an identical drm_crtc_mask() for crtcs.
Mostly performed with coccinelle:
@@
@@
- (1<<drm_connector_index(
+ drm_connector_mask(
...)
- )
@@
@@
- 1<<drm_connector_index(
+ drm_connector_mask(
...)
@@
@@
- BIT(drm_connector_index(
+ drm_connector_mask(
...)
- )
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-4-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2018-07-02 18:45:55 +03:00
Ville Syrjälä
6f3be036da
drm: Add drm_encoder_mask()
...
Add drm_encoder_mask() which returns the 1<<index for the encoder.
We already have an identical drm_crtc_mask() for crtcs.
Mostly performed with coccinelle:
@@
@@
- (1<<drm_encoder_index(
+ drm_encoder_mask(
...)
- )
@@
@@
- 1<<drm_encoder_index(
+ drm_encoder_mask(
...)
@@
@@
- BIT(drm_encoder_index(
+ drm_encoder_mask(
...)
- )
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-3-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2018-07-02 18:45:55 +03:00
Ville Syrjälä
6a52193bd0
drm: Use drm_crtc_mask()
...
Use drm_crtc_mask() where appropriate.
Mostly performed with coccinelle:
@@
@@
- (1<<drm_crtc_index(
+ drm_crtc_mask(
...)
- )
@@
@@
- 1<<drm_crtc_index(
+ drm_crtc_mask(
...)
@@
@@
- BIT(drm_crtc_index(
+ drm_crtc_mask(
...)
- )
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-2-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2018-07-02 18:45:55 +03:00
Ville Syrjälä
62f77ad096
drm: Add drm_plane_mask()
...
Add drm_plane_mask() which returns the 1<<index for the plane.
We already have an identical drm_crtc_mask() for crtcs.
Mostly performed with coccinelle:
@@
@@
- (1<<drm_plane_index(
+ drm_plane_mask(
...)
- )
@@
@@
- 1<<drm_plane_index(
+ drm_plane_mask(
...)
@@
@@
- BIT(drm_plane_index(
+ drm_plane_mask(
...)
- )
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-1-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2018-07-02 18:45:55 +03:00
Ville Syrjälä
e35a2f9aee
drm/atomic-helper: Use old/new state in drm_atomic_helper_commit_planes_on_crtc()
...
Update drm_atomic_helper_commit_planes_on_crtc() to use explicit old/new
states instead of relying on obj->state.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180626204144.14769-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2018-07-02 18:45:55 +03:00
Daniel Vetter
796422f227
dma-fence: Allow wait_any_timeout for all fences
...
When this was introduced in
commit a519435a96
Author: Christian König <christian.koenig@amd.com >
Date: Tue Oct 20 16:34:16 2015 +0200
dma-buf/fence: add fence_wait_any_timeout function v2
there was a restriction added that this only works if the dma-fence
uses the dma_fence_default_wait hook. Which works for amdgpu, which is
the only caller. Well, until you share some buffers with e.g. i915,
then you get an -EINVAL.
But there's really no reason for this, because all drivers must
support callbacks. The special ->wait hook is only as an optimization;
if the driver needs to create a worker thread for an active callback,
then it can avoid to do that if it knows that there's a process
context available already. So ->wait is just an optimization, just
using the logic in dma_fence_default_wait() should work for all
drivers.
Let's remove this restriction.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Gustavo Padovan <gustavo@padovan.org >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: Christian König <christian.koenig@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-4-daniel.vetter@ffwll.ch
2018-07-02 10:20:53 +02:00
Daniel Vetter
c701317a3e
dma-fence: Make ->enable_signaling optional
...
Many drivers have a trivial implementation for ->enable_signaling.
Let's make it optional by assuming that signalling is already
available when the callback isn't present.
v2: Don't do the trick to set the ENABLE_SIGNAL_BIT
unconditionally, it results in an expensive spinlock take for
everyone. Instead just check if the callback is present. Suggested by
Maarten.
Also move misplaced kerneldoc hunk to the right patch.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Christian König <christian.koenig@amd.com > (v1)
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Gustavo Padovan <gustavo@padovan.org >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180504141034.27727-1-daniel.vetter@ffwll.ch
2018-07-02 10:16:33 +02:00
Daniel Vetter
1b48b7202c
dma-fence: remove fill_driver_data callback
...
Noticed while I was typing docs. Entirely unused.
v2: Remove reference in @timeline_value_str too. While at it clarify
why timeline_value_str has a fence parameter - we don't have an
explicit timeline structure unfortunately.
Cc: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Christian König <christian.koenig@amd.com > (v1)
Cc: Christian König <christian.koenig@amd.com > (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-2-daniel.vetter@ffwll.ch
2018-07-02 10:16:21 +02:00
Linus Walleij
e08015e7d6
drm/pl111: Support Nomadik LCDC variant
...
The Nomadik has a variant of the PL110 known as "Color LCD
Controller" LCDC. This variant has the same bit ordering as
the DRM subsystem (in difference from the other variants)
and adds a few bits for the control of 5551, 565 etc in the
control register. Notably it also adds a packed RGB888
24BPP mode.
We add support by detecting this variant and also adding a
small plug-in that will mux the LCDC out if the ASIC happens
to be muxed to the other graphics controller (they are
mutually exclusive).
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180621184450.25377-1-linus.walleij@linaro.org
2018-07-01 21:36:47 +02:00
Eric Anholt
491657a915
drm/vc4: Make DSI call into the bridge after the DSI link is enabled.
...
This allows panels or bridges that need to send DSI commands during
pre_enable() to successfully send them. We delay DISP0 (aka the
actual display) enabling until after pre_enable so that pixels aren't
streaming before then.
v2: Just clear out the encoder->bridge value to disable the midlayer
calls (idea by Andrzej Hajda).
Signed-off-by: Eric Anholt <eric@anholt.net >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180621231759.29604-1-eric@anholt.net
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
2018-06-29 13:42:09 -07:00
Eric Anholt
14d9deeb27
drm/v3d: Define the fourcc modifier for the Broadcom UIF format.
...
This will be used by Mesa, and potentially other drivers in the
future, to describe tiled buffers.
Signed-off-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20180621001703.13522-1-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2018-06-29 13:42:09 -07:00
Dirk Hohndel (VMware)
dff9688886
drm/vmwgfx: add SPDX idenitifier and clarify license
...
This is dual licensed under GPL-2.0 or MIT.
vmwgfx_msg.h is the odd one out that is GPL-2.0+ or MIT.
Acked-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Dirk Hohndel (VMware) <dirk@hohndel.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180506231626.115996-9-dirk@hohndel.org
2018-06-29 15:28:48 -05:00
Dirk Hohndel (VMware)
a3be6f6c6e
drm/vmwgfx: add SPDX idenitifier and clarify license
...
These files are licensed under GPL-2.0.
Removing the MIT boilerplate as that really didn't make any sense for
those two header files.
Acked-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Dirk Hohndel (VMware) <dirk@hohndel.org >
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180506231626.115996-8-dirk@hohndel.org
2018-06-29 15:28:48 -05:00
Dirk Hohndel (VMware)
eee3dc56e2
drm/noveau: add SPDX identifier and clarify license
...
This is dual licensed under GPL-2.0 or MIT.
Acked-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Dirk Hohndel (VMware) <dirk@hohndel.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180506231626.115996-5-dirk@hohndel.org
2018-06-29 15:28:47 -05:00
Dirk Hohndel (VMware)
4f960dcf75
drm: add SPDX identifier and clarify license
...
This is dual licensed under GPL-2.0 or MIT.
Acked-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Dirk Hohndel (VMware) <dirk@hohndel.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180506231626.115996-4-dirk@hohndel.org
2018-06-29 15:28:47 -05:00
Dirk Hohndel (VMware)
3e2b88cbd2
drm: add SPDX idenitifier and clarify license
...
This is dual licensed under GPL-2.0 or MIT.
Signed-off-by: Dirk Hohndel (VMware) <dirk@hohndel.org >
Signed-off-by: David Herrmann <dh.herrmann@gmail.com >
Signed-off-by: David Airlie <airlied@linux.ie >
Acked-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180506231626.115996-2-dirk@hohndel.org
2018-06-29 15:28:47 -05:00
Gustavo Padovan
7bd1602451
Merge tag 'ib-fbdev-drm-v4.19-deferred-console-takeover-fixup' of https://github.com/bzolnier/linux into drm-misc-next
...
Immutable branch between fbdev and drm for the v4.19 merge window
(contains build fixup for the deferred console takeover feature)
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
# gpg: Signature made Fri 29 Jun 2018 06:47:23 AM -03
# gpg: using RSA key 7E33B63FA047C20B
# gpg: Can't check signature: public key not found
Link: https://patchwork.freedesktop.org/patch/msgid/3340294.YySDL1Tsl7@amdc3058
2018-06-29 09:50:14 -03:00
Hans de Goede
334bb8972a
console: dummycon: export dummycon_[un]register_output_notifier
...
Export dummycon_[un]register_output_notifier, the fbcon code needs this
and may be build as a module.
Fixes: 83d83bebf4 ("console/fbcon: Add support for deferred console takeover")
Cc: Stephen Rothwell <sfr@canb.auug.org.au >
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
2018-06-29 11:46:19 +02:00
Gustavo Padovan
c981c01164
Merge tag 'ib-fbdev-drm-v4.19-deferred-console-takeover' of https://github.com/bzolnier/linux into drm-misc-next
...
Immutable branch between fbdev and drm for the v4.19 merge window
(contains the deferred console takeover feature)
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
# gpg: Signature made Thu 28 Jun 2018 10:24:50 AM -03
# gpg: using RSA key 7E33B63FA047C20B
# gpg: Can't check signature: public key not found
# Conflicts:
# drivers/gpu/drm/i915/i915_gem.c
# drivers/gpu/drm/i915/intel_crt.c
# drivers/gpu/drm/i915/intel_display.c
# drivers/gpu/drm/i915/intel_lrc.c
Link: https://patchwork.freedesktop.org/patch/msgid/2462549.rLSfW9kX99@amdc3058
2018-06-28 18:56:03 -03:00
Hans de Goede
83d83bebf4
console/fbcon: Add support for deferred console takeover
...
Currently fbcon claims fbdevs as soon as they are registered and takes over
the console as soon as the first fbdev gets registered.
This behavior is undesirable in cases where a smooth graphical bootup is
desired, in such cases we typically want the contents of the framebuffer
(typically a vendor logo) to stay in place as is.
The current solution for this problem (on embedded systems) is to not
enable fbcon.
This commit adds a new FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER config option,
which when enabled defers fbcon taking over the console from the dummy
console until the first text is displayed on the console. Together with the
"quiet" kernel commandline option, this allows fbcon to still be used
together with a smooth graphical bootup, having it take over the console as
soon as e.g. an error message is logged.
Note the choice to detect the first console output in the dummycon driver,
rather then handling this entirely inside the fbcon code, was made after
2 failed attempts to handle this entirely inside the fbcon code. The fbcon
code is woven quite tightly into the console code, making this to only
feasible option.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
2018-06-28 15:20:30 +02:00
Hans de Goede
3bd3a0e330
fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable
...
Replace comments about places where the console lock should be held with
calls to WARN_CONSOLE_UNLOCKED() to assert that it is actually held.
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
2018-06-28 15:20:28 +02:00
Hans de Goede
d48de54a9d
printk: Export is_console_locked
...
This is a preparation patch for adding a number of WARN_CONSOLE_UNLOCKED()
calls to the fbcon code, which may be built as a module (event though
usually it is not).
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com >
Acked-by: Petr Mladek <pmladek@suse.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
2018-06-28 15:20:27 +02:00
Dave Airlie
eab9766931
Merge tag 'drm-misc-next-2018-06-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
drm-misc-next for 4.19:
Cross-subsystem Changes:
devicetree documentation
dt-bindings defintions for sun8i (Jernej Skrabec)
Core Changes:
Consider drivers setting DRIVER_ATOMIC as atomic (Eric Anholt)
Improvements for in-kernel clients (Noralf Trønnes)
Export and rename drm_crtc_port_mask() (Jernej Skrabec)
Driver Changes:
v3d: Add looking for GPU scheduler jobs management (Eric Anholt)
Add Ilitek ILI9881c panel driver(Maxime Ripard)
rockchip: vop: fixup linebuffer mode calc error (Sandy Huang)
tinydrm: new driver for ILI9341 display panels (David Lechner)
sun4i: Add TCON TOP driver (Jernej Skrabec)
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180628010018.GA10929@juma
2018-06-28 13:29:07 +10:00