Commit Graph

31619 Commits

Author SHA1 Message Date
Russell King 6d30c0f728 drm/i2c: tda998x: avoid race in tda998x_encoder_mode_set()
As priv->audio_params can now be changed at run time, we need to be more
careful about how we deal with a mode set.  We must take the audio lock
while checking if there's a valid audio configuration.

However, it's slightly worse than that - during mode set, we mute the
audio, and it must not be unmuted until we have finished the mode set.
It is possible that the audio side may start while a mode set is in
progress, so take the audio_mutex lock around the whole mode setting
procedure.

Tested-by: Jon Medhurst <tixy@linaro.org>
Acked-by: Jon Medhurst <tixy@linaro.org>
Tested-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2016-11-18 00:00:40 +00:00
Russell King ba300c1787 drm/i2c: tda998x: move audio mutex initialisation
We will need the audio mutex initialised in all cases, so lets move this
to be early, rather than only being initialised for the DT case.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2016-11-17 23:59:39 +00:00
Rongrong Zou 1d98b91611 drm/hisilicon/hibmc: Add support for vblank interrupt
Add vblank interrupt.

Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
Acked-by: Sean Paul <seanpaul@chromium.org>
2016-11-17 15:26:27 +08:00
Rongrong Zou 5294967f4a drm/hisilicon/hibmc: Add support for VDAC
VDAC(Video Digital-to-Analog converter) converts the RGB diaital data
stream from DE to VGA analog signals.

Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
Acked-by: Sean Paul <seanpaul@chromium.org>
2016-11-17 15:26:26 +08:00
Rongrong Zou da52605eea drm/hisilicon/hibmc: Add support for display engine
Add display engine function, crtc/plane is initialized here.

Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
Acked-by: Sean Paul <seanpaul@chromium.org>
2016-11-17 15:26:25 +08:00
Rongrong Zou d1667b8679 drm/hisilicon/hibmc: Add support for frame buffer
Add support for fbdev and kms fb management.

Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
Acked-by: Sean Paul <seanpaul@chromium.org>
2016-11-17 15:26:25 +08:00
Rongrong Zou e4daebc77e drm/hisilicon/hibmc: Add video memory management
Hibmc have 32m video memory which can be accessed through PCIe by host,
we use ttm to manage these memory.

Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
Acked-by: Sean Paul <seanpaul@chromium.org>
2016-11-17 15:26:24 +08:00
Rongrong Zou 5e0df3a08f drm/hisilicon/hibmc: Add hisilicon hibmc drm master driver
Add DRM master driver for Hisilicon Hibmc SoC which used for
Out-of-band management. Blow is the general hardware connection,
both the Hibmc and the host CPU are on the same mother board.

+----------+       +----------+
|          | PCIe  |  Hibmc   |
|host CPU( |<----->| display  |
|arm64,x86)|       |subsystem |
+----------+       +----------+

Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
Acked-by: Sean Paul <seanpaul@chromium.org>
2016-11-17 15:26:24 +08:00
Dave Airlie 08859ede42 Merge branch 'linux-4.10' of git://github.com/skeggsb/linux into drm-next
- GP102/GP104 devinit (suspend/resume, optimus) hang fix
- GP102/GP104 hardware cursor fix
- Fix for a regression on some non-MST monitors that was caused by the
MST work
- Workaround for certain laptops where ACPI sends display hotkey presses
on a modeset, causing gnome-settings-daemon to go into a continuous loop

* 'linux-4.10' of git://github.com/skeggsb/linux:
  drm/nouveau/disp/gp102: rename from gp104
  drm/nouveau/ce/gp102: rename from gp104
  drm/nouveau/fb/gp102: rename from gp104
  drm/nouveau/disp/gp102: fix cursor/overlay immediate channel indices
  drm/nouveau/disp/nv50-: specify ctrl/user separately when constructing classes
  drm/nouveau/disp/nv50-: split chid into chid.ctrl and chid.user
  drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
  drm/nouveau/devinit/gm200: drop pmu reset sequence
  drm/nouveau/devinit/gm200: replace while loops with PTIMER-based timeout loops
  drm/nouveau/pmu/gp102: initial implementation
  drm/nouveau/pmu/gp100: initial implementation
  drm/nouveau/pmu: execute reset before running devinit
  drm/nouveau/pmu: move ucode handling into gt215 implementation
  drm/nouveau/core: initial support for GP102
  drm/nouveau/device/pci: fix oops if no mmu subdev present
  drm/nouveau/kms/nv50: avoid touching DP_MSTM_CTRL if !DP_MST_CAP
2016-11-17 10:08:29 +10:00
Ravikant B Sharma e8e11817e2 drm/armada: fix NULL pointer comparison warning
Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'. As per coding standard.

Signed-off-by: Ravikant B Sharma <ravikant.s2@samsung.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2016-11-17 00:02:50 +00:00
Stefan Christ 6f3723c15a drm/armada: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2016-11-17 00:02:50 +00:00
Christophe JAILLET 244a2419b6 drm/armada: remove some dead code
'dma_buf_map_attachment()' can not return NULL, so there is no need to
check for it.

Also add a space in order to improve layout.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2016-11-17 00:02:50 +00:00
Baoyou Xie 42b454590f drm/armada: mark symbols static where possible
We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/armada/armada_gem.c:215:27: warning: no previous prototype for 'armada_gem_alloc_object' [-Wmissing-prototypes]
drivers/gpu/drm/armada/armada_gem.c:423:1: warning: no previous prototype for 'armada_gem_prime_map_dma_buf' [-Wmissing-prototypes]

In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2016-11-17 00:02:50 +00:00
Russell King 917a3cbee0 drm/armada: de-midlayer armada
Now that the drm_connector_register() is gone from tda998x, we can
remove the mid-layer from armada-drm, eliminating the load, unload,
debugfs_init, and debugfs_cleanup callbacks from armada's drm_driver
structure.  No functional changes.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2016-11-17 00:02:50 +00:00
Ben Skeggs ed828666a7 drm/nouveau/disp/gp102: rename from gp104
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:39 +10:00
Ben Skeggs a4fa851c64 drm/nouveau/ce/gp102: rename from gp104
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:39 +10:00
Ben Skeggs eeea423c48 drm/nouveau/fb/gp102: rename from gp104
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:39 +10:00
Ben Skeggs e50fcff15f drm/nouveau/disp/gp102: fix cursor/overlay immediate channel indices
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:38 +10:00
Ben Skeggs 2a32b9b186 drm/nouveau/disp/nv50-: specify ctrl/user separately when constructing classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:38 +10:00
Ben Skeggs 4391d7f5c7 drm/nouveau/disp/nv50-: split chid into chid.ctrl and chid.user
GP102/GP104 make life difficult by redefining the channel indices for
some registers, but not others.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:38 +10:00
Hans de Goede 3a6536c51d drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
Various notebooks with nvidia GPUs generate an ACPI_VIDEO_NOTIFY_PROBE
acpi-video event when an external device gets plugged in (and again on
modesets on that connector), the default behavior in the acpi-video
driver for this is to send a KEY_SWITCHVIDEOMODE evdev event, which
causes e.g. gnome-settings-daemon to ask us to rescan the connectors
(good), but also causes g-s-d to switch to mirror mode on a newly plugged
monitor rather then using the monitor to extend the desktop (bad)
as KEY_SWITCHVIDEOMODE is supposed to switch between extend the desktop
vs mirror mode.

More troublesome are the repeated ACPI_VIDEO_NOTIFY_PROBE events on
changing the mode on the connector, which cause g-s-d to switch
between mirror/extend mode, which causes a new ACPI_VIDEO_NOTIFY_PROBE
event and we end up with an endless loop.

This commit fixes this by adding an acpi notifier block handler to
nouveau_display.c to intercept ACPI_VIDEO_NOTIFY_PROBE and:

1) Wake-up runtime suspended GPUs and call drm_helper_hpd_irq_event()
   on them, this is necessary in some cases for the GPU to detect connector
   hotplug events while runtime suspended
2) Return NOTIFY_BAD to stop acpi-video from emitting a bogus
   KEY_SWITCHVIDEOMODE key-press event

There already is another acpi notifier block handler registered in
drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c, but that is not
suitable since that one gets unregistered on runtime suspend, and
we also want to intercept ACPI_VIDEO_NOTIFY_PROBE when runtime suspended.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-11-17 09:50:37 +10:00
Ben Skeggs dc2b655928 drm/nouveau/devinit/gm200: drop pmu reset sequence
This sequence is incorrect for GP102/GP104 boards.  This is now being
handled correctly by the PMU subdev during preinit();

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:37 +10:00
Ben Skeggs 920c58a711 drm/nouveau/devinit/gm200: replace while loops with PTIMER-based timeout loops
It appears to be safe to access PTIMER on an unposted board with newer
chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:37 +10:00
Ben Skeggs d91ccec631 drm/nouveau/pmu/gp102: initial implementation
GP102/GP104 require a harder reset of PMU prior to DEVINIT, or the IFR
image will hang.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:37 +10:00
Ben Skeggs 41c7be6913 drm/nouveau/pmu/gp100: initial implementation
Just enough to hookup preinit reset(), which DEVINIT will depend on later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:36 +10:00
Ben Skeggs 2f524aa0b7 drm/nouveau/pmu: execute reset before running devinit
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:36 +10:00
Ben Skeggs da7d2062fc drm/nouveau/pmu: move ucode handling into gt215 implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:36 +10:00
Ben Skeggs 17ff521d69 drm/nouveau/core: initial support for GP102
From visual inspection of traces, what we currently implement appears to
be identical to GP104.  Seems to work well enough too.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:35 +10:00
Ben Skeggs 9e38b13ea5 drm/nouveau/device/pci: fix oops if no mmu subdev present
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:35 +10:00
Ben Skeggs 3ca03cac39 drm/nouveau/kms/nv50: avoid touching DP_MSTM_CTRL if !DP_MST_CAP
Fixes certain displays not being detected due to DPAUX errors.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-11-17 09:50:35 +10:00
Dave Airlie b7c0e47d98 This pull request brings in fragment shader threading and ETC1 support
for vc4.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJYLM74AAoJELXWKTbR/J7oMhoP/iXpvkEMm5tujsiXLSJwi2yZ
 Kt3h8lDIuF+p0i0lQDpUj9M5OfG8z0XJwLgmIJzh64uclG70tcfAuQ9WECC0h0ix
 ZvV+g8OaLURu/kRpLf4MDwxMAVnd0zOxmJ3PugLjmdrVtMR7keF/iedJpwzxNNWi
 PI0bZ8Vl2V8S5ayerDtDGTNs6yVP3/+SBKHsjPo2tj46FspMBWlzS7tI4YsyCdts
 gHI+0ICtAK2Aj0imo01UEIriO5AzHxkFk/c848knUYgrK51H0zmqXxWPo2I1NHFG
 wMHx/gUgasAv9EbSCjfyS/KP+YRKMeOER002/xSOuy3HFoAgOBHKZ54p3zPw9T44
 17eDpLU2LUwJYoMSWYGGjeeDsmHCqTDY84K9qqkwhLx8saODtk99P5zXdoMxYgyt
 a77ibarPAdJH1tC2WOo86yxQzcKaDzjzhhq4mqdBBDksZK0eVYfwDe1PssDZUQQe
 QAAs+DkygXYI+80rRdKFFeu4ApZZu151zdDKviXE2J7fYT9EQUgRJRlnZJNuYnok
 N7X0SVoqwGtxipZhIRlE348clEZ3abzdL6k1aUBL96O4tXu95n/BbbCXHXDYvOQf
 USyhrhTWVY2tSc3OAoXkZJ6bR7Mj+iXoQxV25tZohHoXUFaBu3Bgz5lBhDWBoMeN
 UK+TE4Wcfsr3EvA39plG
 =dFfc
 -----END PGP SIGNATURE-----

Merge tag 'drm-vc4-next-2016-11-16' of https://github.com/anholt/linux into drm-next

This pull request brings in fragment shader threading and ETC1 support
for vc4.
2016-11-17 09:43:56 +10:00
Dave Airlie 25bfe018c1 Merge branch 'drm-tda998x-mali' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-next
Fix conncector registration with tda998x.

* 'drm-tda998x-mali' of git://git.armlinux.org.uk/~rmk/linux-arm:
  drm/i2c: tda998x: mali-dp: hdlcd: refactor connector registration
2016-11-17 08:55:26 +10:00
Dave Airlie 318313d1d4 Merge tag 'drm-misc-next-2016-11-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next
Another pile of misc:
- Explicit fencing for atomic! Big thanks to Gustavo, Sean, Rob 3x, Brian
  and anyone else I've forgotten to make this happen.
- roll out fbdev helper ops to drivers (Stefan Christ)
- last bits of drm_crtc split-up&kerneldoc
- some drm_irq.c crtc functions cleanup
- prepare_fb helper for cma, works correctly with explicit fencing (Marek
  Vasut)
- misc small patches all over

* tag 'drm-misc-next-2016-11-16' of git://anongit.freedesktop.org/git/drm-misc: (51 commits)
  drm/fence: add out-fences support
  drm/fence: add fence timeline to drm_crtc
  drm/fence: add in-fences support
  drm/bridge: analogix_dp: return error if transfer none byte
  drm: drm_irq.h header cleanup
  drm/irq: Unexport drm_vblank_on/off
  drm/irq: Unexport drm_vblank_count
  drm/irq: Make drm_vblank_pre/post_modeset internal
  drm/nouveau: Use drm_crtc_vblank_off/on
  drm/amdgpu: Use drm_crtc_vblank_on/off for dce6
  drm/color: document NULL values and default settings better
  drm: Drop externs from drm_crtc.h
  drm: Move tile group code into drm_connector.c
  drm: Extract drm_mode_config.[hc]
  Revert "drm: Add aspect ratio parsing in DRM layer"
  Revert "drm: Add and handle new aspect ratios in DRM layer"
  drm/print: Move kerneldoc next to definition
  drm: Consolidate dumb buffer docs
  drm: Clean up kerneldoc for struct drm_driver
  drm: Extract drm_drv.h
  ...
2016-11-17 08:02:46 +10:00
Jonas Pfeil c778cc5df9 drm/vc4: Add fragment shader threading support
FS threading brings performance improvements of 0-20% in glmark2.

The validation code checks for thread switch signals and ensures that
the registers of the other thread are not touched, and that our clamps
are not live across thread switches.  It also checks that the
threading and branching instructions do not interfere.

(Original patch by Jonas, changes by anholt for style cleanup,
removing validation the kernel doesn't need to do, and adding the flag
for userspace).

v2: Minor style fixes from checkpatch.

Signed-off-by: Jonas Pfeil <pfeiljonas@gmx.de>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-11-16 13:25:26 -08:00
Gustavo Padovan beaf5af480 drm/fence: add out-fences support
Support DRM out-fences by creating a sync_file with a fence for each CRTC
that sets the OUT_FENCE_PTR property.

We use the out_fence pointer received in the OUT_FENCE_PTR prop to send
the sync_file fd back to userspace.

The sync_file and fd are allocated/created before commit, but the
fd_install operation only happens after we know that commit succeed.

v2: Comment by Rob Clark:
	- Squash commit that adds DRM_MODE_ATOMIC_OUT_FENCE flag here.

    Comment by Daniel Vetter:
	- Add clean up code for out_fences

v3: Comments by Daniel Vetter:
	- create DRM_MODE_ATOMIC_EVENT_MASK
	- userspace should fill out_fences_ptr with the crtc_ids for which
	it wants fences back.

v4: Create OUT_FENCE_PTR properties and remove old approach.

v5: Comments by Brian Starkey:
	- Remove extra fence_get() in atomic_ioctl()
	- Check ret before iterating on the crtc_state
	- check ret before fd_install
	- set fence_state to NULL at the beginning
	- check fence_state->out_fence_ptr before put_user()
	- change order of fput() and put_unused_fd() on failure

     - Add access_ok() check to the out_fence_ptr received
     - Rebase after fence -> dma_fence rename
     - Store out_fence_ptr in the drm_atomic_state
     - Split crtc_setup_out_fence()
     - return -1 as out_fence with TEST_ONLY flag

v6: Comments by Daniel Vetter
	- Add prepare/unprepare_crtc_signaling()
	- move struct drm_out_fence_state to drm_atomic.c
	- mark get_crtc_fence() as static

    Comments by Brian Starkey
	- proper set fence_ptr fence_state array
	- isolate fence_idx increment

    - improve error handling

v7: Comments by Daniel Vetter
	- remove prefix from internal functions
	- make out_fence_ptr an s64 pointer
	- degrade DRM_INFO to DRM_DEBUG_ATOMIC when put_user fail
	- fix doc issues
	- filter out OUT_FENCE_PTR == NULL and do not fail in this case
	- add complete_crtc_signalling()
	- krealloc fence_state on demand

    Comment by Brian Starkey
	- remove unused crtc_state arg from get_out_fence()

v8: Comment by Brian Starkey
	- cancel events before check for !fence_state
	- convert a few lefovers u64 types for out_fence_ptr
	- fix memleak by assign fence_state earlier after realloc
	- proper accout num_fences in case of error

v9: Comment by Brian Starkey
	- memset last position of fence_state after krealloc
    Comments by Sean Paul
	- pass install_fds in complete_crtc_signaling() instead of ret

     - put_user(-1, fence_ptr) when decoding props

v10: Comment by Brian Starkey
	- remove unneeded num_fences increment on error path
	- kfree fence_state after installing fences fd

v11: rebase against latest drm-misc

v12: rebase again against latest drm-misc

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Brian Starkey <brian.starkey@arm.com> (v10)
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Robert Foss <robert.foss@collabora.com> (v10)
[danvet: Appease checkpatch.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479301221-13056-1-git-send-email-gustavo@padovan.org
2016-11-16 14:36:27 +01:00
Gustavo Padovan 6d6003c4b6 drm/fence: add fence timeline to drm_crtc
Create one timeline context for each CRTC to be able to handle out-fences
and signal them. It adds a few members to struct drm_crtc: fence_context,
where we store the context we get from fence_context_alloc(), the
fence seqno and the fence lock, that we pass in fence_init() to be
used by the fence.

v2: Comment by Daniel Stone:
	- add BUG_ON() to fence_to_crtc() macro

v3: Comment by Ville Syrjälä
	- Use more meaningful name as crtc timeline name

v4: Comments by Brian Starkey
	- Use even more meaninful name for the crtc timeline
	- add doc for timeline_name
    Comment by Daniel Vetter
	- use in-line style for comments

    - rebase after fence -> dma_fence rename

v5: Comment by Daniel Vetter
	- Add doc for drm_crtc_fence_ops

v6: Comment by Chris Wilson
	- Move fence_to_crtc to drm_crtc.c
	- Move export of drm_crtc_fence_ops to drm_crtc_internal.h

    - rebase against latest drm-misc

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v5)
Reviewed-by: Sean Paul <seanpaul@chromium.org> (v5)
Tested-by: Robert Foss <robert.foss@collabora.com> (v5)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479220628-10204-1-git-send-email-gustavo@padovan.org
2016-11-16 10:42:48 +01:00
Gustavo Padovan 9626014258 drm/fence: add in-fences support
There is now a new property called IN_FENCE_FD attached to every plane
state that receives sync_file fds from userspace via the atomic commit
IOCTL.

The fd is then translated to a fence (that may be a fence_array
subclass or just a normal fence) and then used by DRM to fence_wait() for
all fences in the sync_file to signal. So it only commits when all
framebuffers are ready to scanout.

v2: Comments by Daniel Vetter:
	- remove set state->fence = NULL in destroy phase
	- accept fence -1 as valid and just return 0
	- do not call fence_get() - sync_file_fences_get() already calls it
	- fence_put() if state->fence is already set, in case userspace
	set the property more than once.

v3: WARN_ON if fence is set but state has no FB

v4: Comment from Maarten Lankhorst
	- allow set fence with no related fb

v5: rename FENCE_FD to IN_FENCE_FD

v6: Comments by Daniel Vetter:
	- rename plane_state->in_fence back to "fence"
	- re-introduce WARN_ON if fence set but no fb

     - rebase after fence -> dma_fence rename

v7: Comments by Brian Starkey
	- set state->fence to NULL when duplicating the state
	- fail if IN_FENCE_FD was already set

v8: rebase against latest drm-misc

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Robert Foss <robert.foss@collabora.com>
[danvet: Rebase onto extracted drm_mode_config.[hc].]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-11-16 09:55:27 +01:00
Jianqun Xu 19423ba710 drm/bridge: analogix_dp: return error if transfer none byte
Reference from drm_dp_aux description (about transfer):
Upon success, the implementation should return the number of payload bytes
that were transferred, or a negative error-code on failure. Helpers
propagate errors from the .transfer() function, with the exception of
the -EBUSY error, which causes a transaction to be retried. On a short,
helpers will return -EPROTO to make it simpler to check for failure.

The analogix_dp_transfer will return num_transferred, but if there is none
byte been transferred, the return value will be 0, which means success, we
should return error-code if transfer none byte.

for (retry = 0; retry < 32; retry++) {
	err = aux->transfer(aux, &msg);
	if (err < 0) {
		if (err == -EBUSY)
			continue;

		goto unlock;
	}
}

Cc: zain wang <wzz@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1479255219-7243-1-git-send-email-jay.xu@rock-chips.com
2016-11-16 11:16:13 +05:30
Dave Airlie 4473904ccd sun4i-drm changes for 4.10
Support for the Allwinner A31 SoC display engine using the sun4i-drm
 driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJYK3v7AAoJEBx+YmzsjxAgc6oQAJlonN7vkVqe05wLynl0xTLh
 oGVKSskd1FR6oYncZAIFC6ZpTY7+j0NogfXa90lESCuOyrNt6gUnngiUeKD7ZBMS
 g+BgIjUbmPwa0QRKfJl7QkNs4EK+rMMOi5t9ku+pf3mbId3FIyV7IV7jeJrqrxy7
 i5Q+2bXK3NikQetjj7KvVzSAGx2CUa8h8gvIU1ntgs/2blPdVV3KFBSxS63UjuNr
 oOgkR1LJyojKOd2MKORvbF6WH43q7gsL6IRMsnHLs497HhRK6fSDruyVs5E7ODkR
 0RHwM5RUbVj4T8JHyZ0IAyunv26nU9dOVDAznmMdw8pA3E9EjFTob8SvwWtlPl6M
 h37+dBtvjP3SvL4vDL5UJNI7PZuG0Z6MwGJJkBtfJN2A0JL8THbOjBSP67md59vr
 Nj1hIrqxteAHxH9OfaW8R3Lg2JIUOaWCI4u0q4G+pn626kNsOeewBuJgoeqw2MS4
 PZoN5U6wxQQbSqWDAYCiasljyEDloNuCLgSF1hesKA8ezyV9ATzJGy0MfGqQpo3W
 hKiYEmiKLra+ZcHzZJpZD7I5iu0yyF4qaXPS1H65Ryc1R3ro1xe+AR5BcYQYALlU
 c7p/MpDoVO8vUdQk1utl8QbS9LqADgE72yKqE7T7a5SPGmMkImofNM3ndc3DDl2B
 pQEnH5CRwBADyzaRZBWu
 =fERq
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-drm-for-4.10' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next

sun4i-drm changes for 4.10

Support for the Allwinner A31 SoC display engine using the sun4i-drm
driver.

* tag 'sunxi-drm-for-4.10' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  drm/sun4i: Add a few formats
  drm/sun4i: Add compatible strings for A31/A31s display pipelines
  drm/sun4i: Add compatible string for A31/A31s TCON (timing controller)
  drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure
  drm/sun4i: sun6i-drc: Support DRC on A31 and A31s
2016-11-16 09:39:55 +10:00
Dave Airlie 1a3865d64a Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/media into drm-next
rcar-du -next branch.

* 'drm/next/du' of git://linuxtv.org/pinchartl/media:
  drm: rcar-du: Fix LVDS start sequence on Gen3
  drm: rcar-du: Fix H/V sync signal polarity configuration
  drm: rcar-du: Fix display timing controller parameter
  drm: rcar-du: Fix dot clock routing configuration
  drm: rcar-du: Add R8A7796 support
  drm: rcar-du: Add R8A7792 support
  drm: rcar-du: Simplify and fix probe error handling
  drm: rcar-du: Fix crash in encoder failure error path
  drm: rcar-du: Remove memory allocation error message
  drm: rcar-du: Remove test for impossible error condition
  drm: rcar-du: Bring HDMI encoder comments in line with the driver
  drm: rcar-du: Constify node argument to rcar_du_lvds_connector_init()
  video: of: Constify node argument to display timing functions
2016-11-16 09:39:21 +10:00
Daniel Vetter b9876d5061 drm: drm_irq.h header cleanup
- Drop extern for functions, it's noise.
- Move&consolidate drm.ko internal parts into drm-internal.h.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114090255.31595-6-daniel.vetter@ffwll.ch
2016-11-15 23:33:48 +01:00
Daniel Vetter 2d1e331fa9 drm/irq: Unexport drm_vblank_on/off
Only remaining use was in amdgpu, and trivial to convert over to
drm_crtc_vblank_* variants.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114090255.31595-5-daniel.vetter@ffwll.ch
2016-11-15 23:33:48 +01:00
Daniel Vetter d6b0f62637 drm/irq: Unexport drm_vblank_count
No one outside of drm_irq.c should ever need this. The correct way to
implement get_vblank_count for hw lacking a vblank counter is
drm_vblank_no_hw_counter. Fix this up in mtk, which is the only
offender left over.

Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114090255.31595-4-daniel.vetter@ffwll.ch
2016-11-15 23:33:47 +01:00
Daniel Vetter 07600c5363 drm/irq: Make drm_vblank_pre/post_modeset internal
Now that all drivers are switched over to drm_crtc_vblank_on/off we
can relegate pre/post_modeset to the purely drm_irq.c internal role of
supporting old ums userspace.

As usual switch to the drm_legacy_ prefix to make it clear this is
for old drivers only.

v2: Rebase on top of Thierry's s/int crtc/unsigned int pipe/ changes.

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-11-15 23:33:47 +01:00
Daniel Vetter 9bc6db0d91 drm/nouveau: Use drm_crtc_vblank_off/on
With atomic nv50+ is already converted over to them, but the old
display code is still using it. Found in a 2 year old patch I have
lying around to un-export these old helpers!

v2: Drop the hand-rolled versions from resume/suspend code. Now that
crtc callbacks do this, we don't need a special case for s/r anymore.

v3: Remove unused variables.

v4: Don't remove drm_crtc_vblank_off from suspend paths, non-atomic
nouveau still needs that. But still switch to drm_crtc_vblank_off
since drm_vblank_off will disappear.

Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114114101.21731-1-daniel.vetter@ffwll.ch
2016-11-15 23:33:37 +01:00
Daniel Vetter 778e1a5419 drm/amdgpu: Use drm_crtc_vblank_on/off for dce6
This old code pattern was reintroduced in

Author: Ken Wang <Qingqing.Wang@amd.com>
Date:   Tue Jan 19 14:03:24 2016 +0800

    drm/amdgpu: add display controller implementation for si v10

Realign it with later display code. Tsk, tsk for massive copypasting
;-)

Cc: Christian König <christian.koenig@amd.com>
Cc: Ken Wang <Qingqing.Wang@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com> for the whole series.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114090255.31595-1-daniel.vetter@ffwll.ch
2016-11-15 22:54:40 +01:00
Daniel Vetter 717fd813b8 drm/color: document NULL values and default settings better
Brought up in a discussion for enabling gamma on fsl-dcu.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Meng Yi <meng.yi@nxp.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160926090437.22676-1-daniel.vetter@ffwll.ch
2016-11-15 22:39:48 +01:00
Daniel Vetter 9498c19b3f drm: Move tile group code into drm_connector.c
And also put the overview section into the KMS Properties part of the
docs, instead of randomly-placed within the helpers - this is part of
the uabi.

With this patch I think drm_crtc.[hc] is cleaned up and entirely
documented.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-11-15 15:30:38 +01:00
Daniel Vetter 28575f165d drm: Extract drm_mode_config.[hc]
And shuffle the kernel-doc structure a bit since drm_crtc.[hc] now
only contains CRTC-related functions and structures.

v2:
- rebase onto drm-misc
- don't forget to move drm_mode_config_cleanup.
- move 2 internal decls under the right heading (Chris)

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-11-15 15:23:29 +01:00
Ville Syrjälä 83113df5a7 Revert "drm: Add aspect ratio parsing in DRM layer"
This reverts commit 6dffd431e2.

Adding new mode flags willy nilly breaks existing userspace. We need to
coordinate this better, potentially with a new client cap that only
exposes the aspect ratio flags when userspace is prepared for them
(similar to what we do with stereo 3D modes).

This also broke things so that we would always send out VIC==0 in
the AVI infoframe unless the user specified an aspect ratio via
the mode flags. And the automagic RGB full vs. limited range
handling was similartly broken as the user mode would never match
any CEA mode.

Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Lin, Jia <lin.a.jia@intel.com>
Cc: Akashdeep Sharma <akashdeep.sharma@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478176304-6743-2-git-send-email-ville.syrjala@linux.intel.com
2016-11-15 15:01:42 +01:00
Ville Syrjälä 7920232d54 Revert "drm: Add and handle new aspect ratios in DRM layer"
This reverts commit a68362fe3e.

Adding new mode flags willy nilly breaks existing userspace. We need to
coordinate this better, potentially with a new client cap that only
exposes the aspect ratio flags when userspace is prepared for them
(similar to what we do with stereo 3D modes).

Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Lin, Jia <lin.a.jia@intel.com>
Cc: Akashdeep Sharma <akashdeep.sharma@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478176304-6743-1-git-send-email-ville.syrjala@linux.intel.com
2016-11-15 15:01:31 +01:00
Daniel Vetter 2d5e836de7 drm/print: Move kerneldoc next to definition
kerneldoc expects the comment next to definitions, otherwise it can't
pick up exported vs. internal stuff.

This fixes a warning from the doc build done with:

$ make DOCBOOKS="" htmldocs

Fixes: d8187177b0 ("drm: add helper for printing to log or seq_file")
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-8-daniel.vetter@ffwll.ch
2016-11-15 12:55:24 +01:00
Daniel Vetter 4f93624ee7 drm: Consolidate dumb buffer docs
Put the callback docs into struct drm_driver, and the small overview
into a DOC comment.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-7-daniel.vetter@ffwll.ch
2016-11-15 12:51:49 +01:00
Daniel Vetter 85e634bce0 drm: Extract drm_drv.h
I want to move dumb buffer documentation into the right vfuncs, and
for that I first need to be able to pull that into kerneldoc without
having to clean up all of drmP.h. Also, header-splitting is nice.

While at it shuffle all the function declarations for drm_drv.c into
the right spots, and drop the kerneldoc for drm_minor_acquire/release
since it's only used internally.

v2: Keep all existing copyright notices (Chris).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-11-15 12:50:30 +01:00
Daniel Vetter 1a02ea434e drm: Extract drm_dumb_buffers.c
Just code movement, doc cleanup will follow up later.

v2: Keep all the copyright notices.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-2-daniel.vetter@ffwll.ch
2016-11-15 12:46:36 +01:00
Dan Carpenter 72282a88d4 drm: zte: checking for NULL instead of IS_ERR()
drm_dev_alloc() never returns NULL, it only returns error pointers on
error.

Fixes: 0a886f5952 ("drm: zte: add initial vou drm driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161115095301.GC15424@mwanda
2016-11-15 11:00:42 +01:00
Rob Clark 35cf03508d drm: don't let crtc_ww_class leak out
kbuild spotted this error, with drm/msm patches that add a new
modeset-lock in the driver and driver built as a module:

  ERROR: "crtc_ww_class" [drivers/gpu/drm/msm/msm.ko] undefined!

Really the only reason for crtc_ww_class not being internal to
drm_modeset_lock.c is that drm_modeset_lock_init() was static-inline
(for no particularly good reason).

Fix that, and move crtc_ww_class into drm_modeset_lock.c.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479163257-18703-1-git-send-email-robdclark@gmail.com
2016-11-15 08:33:35 +01:00
Marek Vasut 782ea2a493 drm/imx: Switch to drm_fb_cma_prepare_fb() helper
Remove the common code from the driver and use the
drm_fb_cma_prepare_fb() helper instead.
Moveover, call the helper from prepare_fb() plane hook .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114100732.3446-2-marex@denx.de
Link: http://patchwork.freedesktop.org/patch/msgid/1476451342-146510-1-git-send-email-dvyukov@google.com
2016-11-15 08:25:06 +01:00
Koji Matsuoka 85e8f8d175 drm: rcar-du: Fix LVDS start sequence on Gen3
According to the latest revision of the datasheet, the LVDS I/O pins
must be enabled before starting the PLL. Fix it.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-11-15 01:44:51 +02:00
Koji Matsuoka fd1adef3bf drm: rcar-du: Fix H/V sync signal polarity configuration
The VSL and HSL bits in the DSMR register set the corresponding
horizontal and vertical sync signal polarity to active high. The code
got it the wrong way around, fix it.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-11-15 01:44:50 +02:00
Koji Matsuoka 9cdced8a39 drm: rcar-du: Fix display timing controller parameter
There is a bug in the setting of the DES (Display Enable Signal)
register. This current setting occurs 1 dot left shift. The DES
register should be set minus one value about the specifying value
with H/W specification. This patch corrects it.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-11-15 01:44:50 +02:00
Laurent Pinchart a3c477b33d drm: rcar-du: Fix dot clock routing configuration
Dot clock routing is setup through different registers depending on the
DU generation. The code has been designed for Gen2 and hasn't been
updated since. This works thanks to good reset default value, but isn't
very safe. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-11-15 01:44:49 +02:00
Laurent Pinchart 63b5053e53 drm: rcar-du: Add R8A7796 support
Document the R8A7796-specific DT bindings and support them in the
driver. The HDMI output is currently not supported.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-11-15 01:44:48 +02:00
Sergei Shtylyov 73323ddbbd drm: rcar-du: Add R8A7792 support
Add support for the R8A7792 DU; it has 2 DPAD (RGB) outputs.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-11-15 01:44:48 +02:00
Laurent Pinchart 4f7b0d2638 drm: rcar-du: Simplify and fix probe error handling
It isn't safe to call drm_dev_unregister() without first initializing
mode setting with drm_mode_config_init(). This leads to a crash if
either IO memory can't be remapped or vblank initialization fails.

Fix this by reordering the initialization sequence. Move vblank
initialization after the drm_mode_config_init() call, and move IO
remapping before drm_dev_alloc() to avoid the need to perform clean up
in case of failure.

While at it remove the explicit drm_vblank_cleanup() call from
rcar_du_remove() as the drm_dev_unregister() function already cleans up
vblank.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-11-15 01:44:47 +02:00
Marek Vasut 14d7f96f90 drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper
Add new drm_fb_cma_prepare_fb() helper function extracted from the
imx-drm driver. This function checks if the plane has DMABUF attached
to it, extracts the exclusive fence from it and attaches it to the
plane state for the atomic helper to wait on it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114100732.3446-1-marex@denx.de
2016-11-14 12:43:58 +01:00
Stefan Christ 3da6c2f3b7 drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
This refactoring leads to real functional changes in the driver.

Now the struct psbfb_ops implements two additional members:

       .fb_setcmap     = drm_fb_helper_setcmap,
       .fb_pan_display = drm_fb_helper_pan_display,

and the struct psbfb_roll_ops implements one additional member:

       .fb_setcmap     = drm_fb_helper_setcmap,

and the struct psbfb_unaccel_ops implements two additional members:

       .fb_setcmap     = drm_fb_helper_setcmap,
       .fb_pan_display = drm_fb_helper_pan_display,

These changes are not tested.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-19-git-send-email-contact@stefanchrist.eu
2016-11-14 08:01:01 +01:00
Stefan Christ a36384dd94 drm/i915: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-18-git-send-email-contact@stefanchrist.eu
2016-11-14 07:58:20 +01:00
Stefan Christ d074e55de4 drm/omapdrm: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-17-git-send-email-contact@stefanchrist.eu
2016-11-14 07:58:15 +01:00
Stefan Christ e59a03f581 drm/virtio: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
This patch removes a TODO comment in the code. I do not know whether it
is still relevant.

Cc: David Airlie <airlied@linux.ie>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-16-git-send-email-contact@stefanchrist.eu
2016-11-14 07:58:10 +01:00
Stefan Christ 00d44063fd drm/msm: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-15-git-send-email-contact@stefanchrist.eu
2016-11-14 07:58:04 +01:00
Stefan Christ 812162f04f drm/udl: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-14-git-send-email-contact@stefanchrist.eu
2016-11-14 07:57:59 +01:00
Stefan Christ 902c255b52 drm/tegra: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-13-git-send-email-contact@stefanchrist.eu
2016-11-14 07:56:58 +01:00
Stefan Christ 13be31f958 drm/radeon: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-12-git-send-email-contact@stefanchrist.eu
2016-11-14 07:56:52 +01:00
Stefan Christ 72b6bcb1a2 drm/rockchip: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-11-git-send-email-contact@stefanchrist.eu
2016-11-14 07:56:47 +01:00
Stefan Christ 1102af19cd drm/qxl: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
This patch removes a TODO comment in the code. I do not know whether it
is still relevant.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-10-git-send-email-contact@stefanchrist.eu
2016-11-14 07:55:33 +01:00
Stefan Christ 51a11f3ba5 drm/nouveau: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-9-git-send-email-contact@stefanchrist.eu
2016-11-14 07:55:14 +01:00
Stefan Christ 2eec838cf4 drm/exynos: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-8-git-send-email-contact@stefanchrist.eu
2016-11-14 07:54:50 +01:00
Stefan Christ 659119de7e drm/fb_cma_helper: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-7-git-send-email-contact@stefanchrist.eu
2016-11-14 07:54:43 +01:00
Stefan Christ d4d938c9bd drm/bochs: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-6-git-send-email-contact@stefanchrist.eu
2016-11-14 07:54:38 +01:00
Stefan Christ 1caae27760 drm/armada: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-5-git-send-email-contact@stefanchrist.eu
2016-11-14 07:54:13 +01:00
Stefan Christ ea4ffffea3 drm/amdgpu: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-4-git-send-email-contact@stefanchrist.eu
2016-11-14 07:54:04 +01:00
Stefan Christ 1b99b72489 drm/fb-helper: fix segfaults in drm_fb_helper_debug_*
A drm driver that is implementing

      fb_debug_enter and fb_debug_leave

in struct fb_ops with drm fb helper functions

     drm_fb_helper_debug_enter and drm_fb_helper_debug_leave

must also implement the callback 'mode_set_base_atomic' in struct
drm_crtc_helper_funcs. See Documentation/DocBook/kgdb.tmpl.  The current
implementation will segfault when 'mode_set_base_atomic' is a NULL
pointer.

Before this patch at least the drm drivers armada, ast, qxl, udl and
virtio do not have a 'mode_set_base_atomic' implementation but using
drm_fb_helper_debug_(enter|leave). So these drivers may segfault when
callbacks fb_debug_(enter|leave) are called.

Avoid the issue by just checking for NULL pointers. So all drivers can
unconditionally implement fb_debug_(enter|leave) with the drm_fb_helper
functions. If callback 'mode_set_base_atomic' is not implemented, the
code in drm_fb_helper_debug_(enter|leave) does effectively nothing.

Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-2-git-send-email-contact@stefanchrist.eu
2016-11-14 07:47:34 +01:00
Andrew Donnellan 554dd692af drm/ast: free correct pointer in astfb_create() error paths
In the err_free_vram and err_release_fbi error paths in astfb_create(), we
attempt to free afbdev->sysram. The only jumps to these error paths occur
before we assign afbdev->sysram = sysram. Free sysram instead.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114030359.27852-1-andrew.donnellan@au1.ibm.com
2016-11-14 07:45:16 +01:00
Laurent Pinchart 05ee29e94a drm: rcar-du: Fix crash in encoder failure error path
When an encoder fails to initialize the driver prints an error message
to the kernel log. The message contains the name of the encoder's DT
node, which is NULL for internal encoders. Use the of_node_full_name()
macro to avoid dereferencing a NULL pointer, print the output number to
add more context to the error, and make sure we still own a reference to
the encoder's DT node by delaying the of_node_put() call.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2016-11-14 03:35:14 +02:00
Laurent Pinchart eb508ce6f1 drm: rcar-du: Remove memory allocation error message
Memory allocation failures print messages to the kernel log, there's no
need to print an extra one. Remove the duplicate message.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2016-11-14 03:35:14 +02:00
Laurent Pinchart 0fab63c7b8 drm: rcar-du: Remove test for impossible error condition
The driver has lost platform data support a long time ago. R-Car DU
devices can only be instantiated through DT now, making it impossible to
have a NULL DT node pointer. Remove the error check.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2016-11-14 03:35:13 +02:00
Laurent Pinchart 410fa00a96 drm: rcar-du: Bring HDMI encoder comments in line with the driver
Capitalize acronyms and use determiners and punctuation.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2016-11-14 03:35:12 +02:00
Laurent Pinchart 48b03494c8 drm: rcar-du: Constify node argument to rcar_du_lvds_connector_init()
The node passed as a pointer to the rcar_du_lvds_connector_init()
function is never modified, make it const.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2016-11-14 03:35:12 +02:00
Julia Lawall dfeb693d5a drm/sun4i: constify component_ops structures
These component_ops structures are only used as the second argument to
component_add and component_del, which are declared as const, so the
structures can be declared as const as well.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@

static struct component_ops i@p = { ... };

@ok1@
identifier r.i;
expression e1;
position p;
@@

component_add(e1,&i@p)

@ok2@
identifier r.i;
expression e1;
position p;
@@

component_del(e1, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct component_ops e;
@@

e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@

static
+const
 struct component_ops i = { ... };
// </smpl>

The result of the size command before the change is (arm):

   text       data         bss     dec      hex filename
   5266        236           8    5510     1586 sun4i_backend.o
   6393        236           8    6637     19ed sun4i_tcon.o
   3700        368           8    4076      fec sun4i_tv.o
   1668        108           0    1776      6f0 sun6i_drc.o

and after the change:

   text       data         bss     dec     hex filename
   5274        228           8    5510    1586 sun4i_backend.o
   6401        228           8    6637    19ed sun4i_tcon.o
   3708        360           8    4076     fec sun4i_tv.o
   1676        100           0    1776     6f0 sun6i_drc.o

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478971198-3659-1-git-send-email-Julia.Lawall@lip6.fr
2016-11-13 11:42:48 +01:00
Eric Engestrom b3c11ac267 drm: move allocation out of drm_get_format_name()
The function's behaviour was changed in 90844f0004, without changing
its signature, causing people to keep using it the old way without
realising they were now leaking memory.
Rob Clark also noticed it was also allocating GFP_KERNEL memory in
atomic contexts, breaking them.

Instead of having to allocate GFP_ATOMIC memory and fixing the callers
to make them cleanup the memory afterwards, let's change the function's
signature by having the caller take care of the memory and passing it to
the function.
The new parameter is a single-field struct in order to enforce the size
of its buffer and help callers to correctly manage their memory.

Fixes: 90844f0004 ("drm: make drm_get_format_name thread-safe")
Cc: Rob Clark <robdclark@gmail.com>
Cc: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Sinclair Yeh <syeh@vmware.com> (vmwgfx)
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161112011309.9799-1-eric@engestrom.ch
2016-11-12 14:19:38 +01:00
Joonas Lahtinen f92e1ee52a drm: Add missing mutex_destroy in drm_dev_init/release
Add 3 missing mutex_destroy to drm_dev_init teardown and
drm_dev_release.

v2:
- Also include drm_dev_release

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478785835-4142-1-git-send-email-joonas.lahtinen@linux.intel.com
Link: http://patchwork.freedesktop.org/patch/msgid/1478785835-4142-1-git-send-email-joonas.lahtinen@linux.intel.com
2016-11-11 14:10:03 +01:00
Dave Airlie d8c1abd968 ZTE zxdrm driver support for 4.10:
This is the initial ZTE VOU display controller DRM/KMS driver.  There
 are still some features to be added, like overlay plane, scaling, and
 more output devices support.  But it's already useful with dual CRTCs
 and HDMI display working.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJYH++oAAoJEFBXWFqHsHzOlCQIAKLNtBmB2OSChdPRCa7tIG7O
 vtjUwze70QtD6vVe+rs0fvc46PM3qrccJI6bcgzveki+vRvFVDlreydmB18g3bMx
 cBbsByGnWrNWDtKrwvvRWrkDQwcxnSVX5lMWeIvLrPHeXQVb4nf0F2cn7/zEfIek
 G55LHonRD28m66tWb87gaWwisowcaPzA3tAEP4Rifdqg9IQ45He7Po6KZWZU4DQq
 M/RltIHQwt/OFxAnDuz18ecf+o0NXuLoMYmoA8EYdOTV3sJ2hiJQFWaL5qmXKl7C
 Nzlql70txu9B9H5R4V/6MXS21J0H2uGs2Aig9l9Brz2Vn774IBX09Wi8Fo8G8VU=
 =+zjh
 -----END PGP SIGNATURE-----

Merge tag 'zxdrm-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into drm-next

ZTE zxdrm driver support for 4.10:

This is the initial ZTE VOU display controller DRM/KMS driver.  There
are still some features to be added, like overlay plane, scaling, and
more output devices support.  But it's already useful with dual CRTCs
and HDMI display working.

[airlied: use drm_format_plane_cpp instead of legacy api]
* tag 'zxdrm-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  MAINTAINERS: add an entry for ZTE ZX DRM driver
  drm: zte: add initial vou drm driver
  dt-bindings: add bindings doc for ZTE VOU display controller
2016-11-11 10:09:13 +10:00
Dave Airlie c765102a23 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next
Here is the list of fixes that I have for drm/mali-dp. They've been on the mailing
lists for a while and merged into linux-next for a few weeks, but due to holiday and
travel to Linux Plumbers I did not send the pull request earlier. I don't know if
these patches can be pulled into v4.9 still (they will conflict with Ville Syrjälä's
cleanup of DRM_ROTATE series that is already in drm-next), but if you do that would
be great.

* 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld:
  drm: mali-dp: Clear CVAL when leaving config mode
  drm/arm: mark symbols static where possible
  drm: mali-dp: Add support for setting plane's rotation property from userspace.
  drm: mali-dp: Don't set DRM_PLANE_COMMIT_ACTIVE_ONLY
  drm: mali-dp: Store internal format and n_planes in plane state
  drm: mali-dp: Enable alpha blending
  drm: mali-dp: Refactor plane initialisation
  arm: mali-dp: Extract mode_config cleanup into malidp_fini
  drm: mali-dp: Add pitch alignment check for planes
  drm: mali-dp: Add pitch alignment check function
  drm: mali-dp: Set the drm->irq_enabled flag to match driver's state.
  drm: mali-dp: Clear the config_valid flag before using it in wait_event.
2016-11-11 10:00:58 +10:00
Dave Airlie 90233ee5d1 dw-hdmi i2c master controller
- add support for the HDMI I2C master controller, for boards that
   can have their DDC pins connected only to the HDMI TX directly.
 -----BEGIN PGP SIGNATURE-----
 
 iQI0BAABCAAeBQJX34wqFxxwLnphYmVsQHBlbmd1dHJvbml4LmRlAAoJEFDCiBxw
 nmDr7J0QAOhuvrQ03OhQ/WlnvdAfHG8+G7qFT38zzG9klWBhGYWgPNoZyTGCjmOB
 pljEo3lAPjc5YIZcPWpDFU4GIE875lE4vKlpnjIHyFJKaAcnZxy3fh7AEdEjlfhd
 PdHRpsLNsTxfZbvQnELwPl9qx1+OQjlSUCAQn8kFyyy5ejOWg3lXcZenPr/DWKxs
 KpQjV3k/HZ5EbRLxxhMYCm5xgb0bI3oVjWw48xnLfIOY3UFlzaJ1dTmPCaWmA4VZ
 7js52FRoeqCcq8OYEcq8Ix/72eNtWW7STJOlMqrB0TbTGKUwK0FEPu7k0xcn2OwK
 6quA8s/1WzTxqkBAkhN7UkUlZVonle+V7iAhe0zAE4zNIUttyUhIazPVGPqWRLf2
 FQdZC2r0hyRL5SijS/QowbPL75zB8cBQ/l9Et67wH2eSCC/ZijlQoAKtvWE4a5Tt
 KuW8YPwGUJpVHiUpur+/tyWLtPgr40IwEfwx52F4HfT+4aY5rmKyHbi3y6nkK3vC
 aXl1dtomU8p2tYf1iuXymI5e9gaz5GdEiR30ynIBMBsfgawUJL7bTDG9NFuhaioU
 PoHia1zWBOXL8gYrvVT7tU4yeN9onx7LjPS8V8r0BszZ/6Y2hIfvXAX6zO9TLj4Y
 kmWBJdCp937y/+DJ25YxA2e67ManONx7XHv5T2aix3w64uKzCZIw
 =aAzo
 -----END PGP SIGNATURE-----

Merge tag 'dw-hdmi-next-2016-09-19' of git://git.pengutronix.de/git/pza/linux into drm-next

dw-hdmi i2c master controller

- add support for the HDMI I2C master controller, for boards that
  can have their DDC pins connected only to the HDMI TX directly.

* tag 'dw-hdmi-next-2016-09-19' of git://git.pengutronix.de/git/pza/linux:
  drm: bridge/dw_hdmi: add dw hdmi i2c bus adapter support
  drm: dw_hdmi: use of_get_i2c_adapter_by_node interface
2016-11-11 09:57:54 +10:00
Dave Airlie 628d16555e imx-drm plane update cleanup, YUV formats
- request modeset if plane offsets changed, only the plane base
   address can be changed without disabling the plane IDMAC channel.
 - cleanup of plane atomic_update
 - remove unused ipu_cpmem_set_yuv_planar function
 - support YUV 4:4:4, 4:2:2, NV12 and NV16 plane formats
 - not only mask interrupts during irq init, also clear them
 - remove a legacy check from imx-ldb
 - add support to set the CSI downsizing bits
 - silence an obnoxious warning during modeset
 -----BEGIN PGP SIGNATURE-----
 
 iQI1BAABCAAfBQJYJKqnGBxwaGlsaXBwLnphYmVsQGdtYWlsLmNvbQAKCRBQwogc
 cJ5g644rD/0cVFsbTLhXY3wLbntZXeDrWEaR+PCoEcibsscBaomv1wietpkFMTKx
 41S0HP8ygc912ptZ1JdgDIrDyDD6lsubpj3wUwOWz5zlbLtEOnF1S+C+kAbdJdyg
 8wKNpTz8fxvb7tN+iYwtlDyzrEEHr0OFWtqDruuLi6Ti/bMl5QUVs1j7LBEQksgn
 SmlU99xt84NyLYVm3B+BKAOW5LR1Kx1Qq50IBM9bH1dU8vLclAnsElTpeKppDcSL
 dvvkYfFQIUNVMn8/9CBrLLaiI76j45YAnvhMPZ+g9g9IMyHqVh4Rsato7Y+u7Z2R
 kKbwWmhyPMgTsrnpdvesg+9veJpv4/EDE1JEmpTzet0mmKEoUX6cfZUwF9vjvzGX
 LED7fmVXm5gMTMPt4Tw2j5ZzVzflw+zW2g5/8e2otVVhpxC5DHKlnsUJ1fddRzu2
 C4bD3CC0zmfN6EZZQT+n2kZSu4wZhd93WhffOSTShvypio1XZQlA2NiWIwSkNQe/
 vGGTtWTT1NnV4CxrX4d3SS9IN5JhYlXQAJHNRdutLNyRKJLo6Wa3ilt+wy5jDmh4
 uYHkdumGz+modtYv2b4OR9xdmLGt/ylkodlcXvpqmvBoL4RY6oPNRIeFMEOsUwlU
 FWajcHZw7MINlKubTZGP/eWxKgfsB7fk0lcqz03nOm2f+IwMGzUy2g==
 =uKg2
 -----END PGP SIGNATURE-----

Merge tag 'imx-drm-next-2016-11-10' of git://git.pengutronix.de/git/pza/linux into drm-next

imx-drm plane update cleanup, YUV formats

- request modeset if plane offsets changed, only the plane base
  address can be changed without disabling the plane IDMAC channel.
- cleanup of plane atomic_update
- remove unused ipu_cpmem_set_yuv_planar function
- support YUV 4:4:4, 4:2:2, NV12 and NV16 plane formats
- not only mask interrupts during irq init, also clear them
- remove a legacy check from imx-ldb
- add support to set the CSI downsizing bits
- silence an obnoxious warning during modeset

* tag 'imx-drm-next-2016-11-10' of git://git.pengutronix.de/git/pza/linux:
  gpu: ipu-di: silence videomode logspam
  gpu: ipu-v3: add ipu_csi_set_downsize
  drm/imx: imx-ldb: remove unnecessary double disable check
  gpu: ipu-v3: initially clear all interrupts
  drm/imx: ipuv3-plane: add support for YUV 4:2:2 and 4:4:4, NV12, and NV16 formats
  gpu: ipu-v3: add YUV 4:4:4 support
  gpu: ipu-cpmem: remove unused ipu_cpmem_set_yuv_planar function
  drm/imx: ipuv3-plane: let drm_plane_state_to_ubo/vbo handle chroma subsampling other than 4:2:0
  drm/imx: ipuv3-plane: merge ipu_plane_atomic_set_base into atomic_update
  drm/imx: ipuv3-plane: request modeset if plane offsets changed
2016-11-11 09:31:27 +10:00
Dave Airlie 3e91168a6a Merge tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel into drm-next
- better atomic state debugging from Rob
- fence prep from gustavo
- sumits flushed out his backlog of pending dma-buf/fence patches from
  various people
- drm_mm leak debugging plus trying to appease Kconfig (Chris)
- a few misc things all over

* tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel: (35 commits)
  drm: Make DRM_DEBUG_MM depend on STACKTRACE_SUPPORT
  drm/i915: Restrict DRM_DEBUG_MM automatic selection
  drm: Restrict stackdepot usage to builtin drm.ko
  drm/msm: module param to dump state on error irq
  drm/msm/mdp5: add atomic_print_state support
  drm/atomic: add debugfs file to dump out atomic state
  drm/atomic: add new drm_debug bit to dump atomic state
  drm: add helpers to go from plane state to drm_rect
  drm: add helper for printing to log or seq_file
  drm: helper macros to print composite types
  reservation: revert "wait only with non-zero timeout specified (v3)" v2
  drm/ttm: fix ttm_bo_wait
  dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)
  dma-buf/fence: make timeout handling in fence_default_wait consistent (v2)
  drm/amdgpu: add the interface of waiting multiple fences (v4)
  dma-buf: return index of the first signaled fence (v2)
  MAINTAINERS: update Sync File Framework files
  dma-buf/sw_sync: put fence reference from the fence creation
  dma-buf/sw_sync: mark sync_timeline_create() static
  drm: Add stackdepot include for DRM_DEBUG_MM
  ...
2016-11-11 09:28:44 +10:00
Dave Airlie db8feb6979 Merge tag 'drm-intel-next-2016-11-08' of git://anongit.freedesktop.org/git/drm-intel into drm-next
- gpu idling rework for s/r (Imre)
- vlv mappable scanout fix
- speed up probing in resume (Lyude)
- dp audio workarounds for gen9 (Dhinakaran)
- more conversion to using dev_priv internally (Ville)
- more gen9+ wm fixes and cleanups (Maarten)
- shrinker cleanup&fixes (Chris)
- reorg plane init code (Ville)
- implement support for multiple timelines (prep work for scheduler)
  from Chris and all
- untangle dev->struct_mutex locking as prep for multiple timelines
  (Chris)
- refactor bxt phy code and collect it all in intel_dpio_phy.c (Ander)
- another gvt with bugfixes all over from Zhenyu
- piles of lspcon fixes from Imre
- 90/270 rotation fixes (Ville)
- guc log buffer support (Akash+Sagar)
- fbc fixes from Paulo
- untangle rpm vs. tiling-fences/mmaps (Chris)
- fix atomic commit to wait on the right fences (Daniel Stone)

* tag 'drm-intel-next-2016-11-08' of git://anongit.freedesktop.org/git/drm-intel: (181 commits)
  drm/i915: Update DRIVER_DATE to 20161108
  drm/i915: Mark CPU cache as dirty when used for rendering
  drm/i915: Add assert for no pending GPU requests during suspend/resume in LR mode
  drm/i915: Make sure engines are idle during GPU idling in LR mode
  drm/i915: Avoid early GPU idling due to race with new request
  drm/i915: Avoid early GPU idling due to already pending idle work
  drm/i915: Limit Valleyview and earlier to only using mappable scanout
  drm/i915: Round tile chunks up for constructing partial VMAs
  drm/i915: Remove the vma from the object list upon close
  drm/i915: Reinit polling before hpd when resuming
  drm/i915: Remove redundant reprobe in i915_drm_resume
  drm/i915/dp: Extend BDW DP audio workaround to GEN9 platforms
  drm/i915/dp: BDW cdclk fix for DP audio
  drm/i915: Fix pages pin counting around swizzle quirk
  drm/i915: Fix test on inputs for vma_compare()
  drm/i915/guc: Cache the client mapping
  drm/i915: Tidy slab cache allocations
  drm/i915: Introduce HAS_64BIT_RELOC
  drm/i915: Show the execlist queue in debugfs/i915_engine_info
  drm/i915: Unify global_list into global_link
  ...
2016-11-11 09:25:32 +10:00
Chris Wilson 4b514e1015 drm: Make DRM_DEBUG_MM depend on STACKTRACE_SUPPORT
0day continues to complain about trying to save a stacktrace for the
users of the drm_mm range allocator. This time, it is that m68k has no
save_stack_trace(), which is apparently guarded by STACKTRACE_SUPPORT.
Make it depend so!

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161109143906.11057-1-chris@chris-wilson.co.uk
2016-11-09 17:27:54 +01:00
Lucas Stach b5b457b33d gpu: ipu-di: silence videomode logspam
Adapting the videomode to the hardware constraints is something that
can and must happen during normal operation and isn't something that
the user can avoid. So printing a warning each time it happens isn't
helpful.

Demote this message to the debug level.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-11-09 10:41:14 +01:00