Commit graph

428591 commits

Author SHA1 Message Date
Dave Airlie
82c68b6ccd drm/tegra: Changes for v3.15-rc1
Implement eDP support for Tegra124 and support the PRIME vmap()/vunmap()
 operations.
 
 A symbol that is required for upcoming V4L2 support is now exported by
 the host1x driver.
 
 Relicense drivers under the GPL v2 for consistency. One exception is the
 public header file, which is relicensed under MIT to abide by the common
 rule.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTPlzgAAoJEN0jrNd/PrOhR2AQALMfTgwlcUb53NkYKyuotf1g
 dcUeCXrYlOZQhEkTEBkp8rjU3kYHcLieQW5NFUpVKMy4VTvb1nXPB0VrEJjajtrx
 coAzffIVzqhWOUz4iGHphoIhzfQ6xQTNCd8B2bT/4pdnHuHNt4A10blFfxlBYPwD
 2hw4alTYpaNhsSso3dDB2ORSKZsCWlFC/bPJVA/yGtrXon/CR8Q9sGIqcEnKa6fp
 gPfdxJChr2c5FeFIgQRnkt+MHOl+SgpkzxNXX5c5ffY6kt1HvKKJZfTv4cbOsSrn
 7xPtgv0PKiiGtReRXZxZKB/xOGKJBCDM2oXfv02pMT5bCIRTzpmkWne3cuU2b2Mn
 FN67ZBHCSPRiBcdHIc7pGwP8jIg21zZ/7IqWW9/4yAXksYV3Ii7TdQY3eL3PCrBP
 3802ygJznKuVx2S1xLMI7z4DXV+44cLCCWzmglWEQPQfKFCVgTsmuLr8HiM1Tj1m
 YvEibgL72ggDsInGF4nrwidEirvtRqHSn/qcD19p1gRORKxR8P7e9LUmWN/PHlkV
 iKfcaMyWpHuCLcCyKC2b9iieAtLDz1Hsn9MiaQ7BcZUVVMAS6OVrrrm14Q5Wbi/Z
 RxfF0hRjPDEXyrxo2LKrVLQbxeMhkmBfkc532YZCwSxoWvgScUfE73lB/kk68Iv2
 c0WnbuHrH41dslXH4yPl
 =LGu0
 -----END PGP SIGNATURE-----

Merge tag 'drm/tegra/for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/tegra: Changes for v3.15-rc1

Implement eDP support for Tegra124 and support the PRIME vmap()/vunmap()
operations.

A symbol that is required for upcoming V4L2 support is now exported by
the host1x driver.

Relicense drivers under the GPL v2 for consistency. One exception is the
public header file, which is relicensed under MIT to abide by the common
rule.

* tag 'drm/tegra/for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/tegra: Use standard GPL v2 license text
  drm/tegra: Relicense under GPL v2
  drm/tegra: Relicense public header under MIT
  drm/tegra: Add eDP support
  gpu: host1x: export host1x_syncpt_incr_max() function
  drm/tegra: prime: Add vmap support
2014-04-05 16:13:08 +10:00
Dave Airlie
243b930f8b drm/panel: Changes for v3.15-rc1
Add support for a couple more simple panels. A few cleanups to the
 simple panel driver are also included (gpiod interface conversion,
 removal of redundant call to regulator_disable()).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTPlsYAAoJEN0jrNd/PrOhYLUP/AhNzYjs8Aj/B7wYUKwsjY5v
 Kt3pci/dkCJnsrORH/CRLQiHN96LiH6h07vxoN1zia5viompnso3PtDln9Rl9rny
 V463crFhwjtDwvotob7UWzk5JSvJU12Wea3Q1pvRo/GZnjBgKDqmzq5zReXzUrw8
 Pw1vqNs1o+cZVO+1JVobn3VnwqPPMNi1lCfd1igyDcn+hSnrrLh8MlI3fC5ji4O5
 iLOT2U+4CD+MYICDKyrW27kUA62HYyi0eGtlDJVOThjVBvQaUqYuz/czfbvZw0xG
 U2rarUI+l4AhecP2AuAbkHrdQK2mIGRTC7S+GvCCH2eGqG9FNs3Z+rTEpg4kPIBl
 fsfdvOrkJNPfHHH3rZEbrz5ahyRJMFMgMoJrNRcnUu0Vn3BsiPBO8GMMf8jiGqbJ
 meT8d7x5Ln00egIrdx/17VJkLGZf4PO7mnWL5O76n+7CTfcrWI0xwMfwiKzURIlU
 LT1oY/VrJuJLmKVE7Z5yR+bFM1Ee4oxB3Uc13o7Qn3f+Bv4/lzZJJhc13hloXuIZ
 Nb81KL3KrD02KcgqhXhgbw9nZcdwnAvEqup+D6vJ+vaJzFGy3/GVKVZ0KAi7NGml
 rsGUpKDmtQMiAAy1bVV1zDMo5pX3fr1c7pry+dljkVOAC/KIDWcYt244y81ud3i1
 WJvAxR+PkY4mpWq5zvy5
 =6Tqg
 -----END PGP SIGNATURE-----

Merge tag 'drm/panel/for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/panel: Changes for v3.15-rc1

Add support for a couple more simple panels. A few cleanups to the
simple panel driver are also included (gpiod interface conversion,
removal of redundant call to regulator_disable()).

* tag 'drm/panel/for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/panel: add support for LG LD070WX3-SL01 panel
  drm/panel: add support for LG LH500WX1-SD03 panel
  drm/panel: simple: Allow DSI panels to provide mode flags
  drm/panel: simple: Allow GPIO accesses to sleep
  drm/panel: remove redundant regulator_disable()
  drm/panel: use gpiod interface for enable GPIO
  drm/panel: Add LG 12.9" LCD panel
  MAINTAINERS: Add entry for DRM panel drivers

Conflicts:
	MAINTAINERS
2014-04-05 16:12:27 +10:00
Dave Airlie
13b9389274 Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
Summaries:
- Add MIPI-DSI Driver, and dt bindigs
- Add S6E8AA0 MIPI-DSI based panel drivers, and dt bindings
- Add LD9040 parallel panel driver
 . this driver is placed in drivers/gpu/drm/panel, and it seems
   to be used for exynos drm as of now,
- Some fixups

Changelog v2:
- Remove super device support, and relevant dt bindings for more reviews.
- Fix module build errors you pointed out.
- Re-based it to drm-next again.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/bridge: export ptn3460_init function
  drm/exynos: remove MODULE_DEVICE_TABLE definitions
  ARM: dts: exynos4412-trats2: enable exynos/fimd node
  ARM: dts: exynos4210-trats: enable exynos/fimd node
  ARM: dts: exynos4412-trats2: add panel node
  ARM: dts: exynos4210-trats: add panel node
  ARM: dts: exynos4: add MIPI DSI Master node
  drm/panel: add S6E8AA0 driver
  ARM: dts: exynos4210-universal_c210: add proper panel node
  drm/panel: add ld9040 driver
  panel/ld9040: add DT bindings
  panel/s6e8aa0: add DT bindings
  drm/exynos: add DSIM driver
  exynos/dsim: add DT bindings
  drm/exynos: disallow fbdev initialization if no device is connected
  drm/mipi_dsi: create dsi devices only for nodes with reg property
  drm/mipi_dsi: add flags to DSI messages
2014-04-05 16:09:15 +10:00
Dave Airlie
14c6d5bdf7 Merge tag 'vmwgfx-next-2014-04-04' of git://people.freedesktop.org/~thomash/linux into drm-next
Pull request of 2014-04-04

The second vmwgfx pull request for the 3.15 merge window.
Contains a fbdev fix by Christopher Friedt, one fix for a locking order
violation introduced in 3.14 (hit when using queries) and finally a
removal of the DRM_AUTH requirement around some vmwgfx IOCTLS where the
caller is already required to have an open handle to the object.

* tag 'vmwgfx-next-2014-04-04' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: correct fb_fix_screeninfo.line_length
  drm/vmwgfx: Remove authorization requirements around some more ioctls
  drm/vmwgfx: Fix query buffer locking order violation
2014-04-05 16:08:27 +10:00
Dave Airlie
8d51a977a4 Merge tag 'ttm-next-2014-04-04' of git://people.freedesktop.org/~thomash/linux into drm-next
Pull request of 2014-04-04

Currently only a single patch fixing up mixed use of the ttm_bo_reserve and
ww_mutex APIs

* tag 'ttm-next-2014-04-04' of git://people.freedesktop.org/~thomash/linux:
  drm/ttm: Hide the implementation details of reservation
2014-04-05 16:07:39 +10:00
Dave Airlie
aa17edff0a drm/dp_helper: don't return EPROTO for defers (v2)
If we get a msg.reply of REPLY_DEFER, we also get an err of 0
so we fail reads with 0 < size and return -EPROTO instead of trying
again.

v2: same fix in i2c code.

Found writing MST support.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-05 16:06:34 +10:00
Inki Dae
96e112c444 drm/bridge: export ptn3460_init function
This patch exports ptn3460_init function so that other modules
can call this function.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-04-04 21:24:50 +09:00
Inki Dae
d089621896 drm/exynos: remove MODULE_DEVICE_TABLE definitions
This patch removes MODULE_DEVICE_TABLE definition to of_device_id
of DP and MIPI-DSI drivers.

Eyxnos drm should be built as single module so these definitions
should be removed.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-04-04 21:24:50 +09:00
Andrzej Hajda
bbab1e3f6b ARM: dts: exynos4412-trats2: enable exynos/fimd node
The patch changes fimd node status to OK.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:50 +09:00
Andrzej Hajda
b56083968f ARM: dts: exynos4210-trats: enable exynos/fimd node
The patch changes fimd node status to OK.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:49 +09:00
Andrzej Hajda
420ae8451a ARM: dts: exynos4412-trats2: add panel node
The patch adds s6e8aa0 panel node for trats2.
It adds also trats2 specific properties for DSI
and regulator required by panel.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:49 +09:00
Andrzej Hajda
e78dd468d0 ARM: dts: exynos4210-trats: add panel node
The patch adds s6e8aa0 panel node for trats.
It adds also trats specific properties for DSI.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:49 +09:00
Andrzej Hajda
8b7dd64cbe ARM: dts: exynos4: add MIPI DSI Master node
This is a common part of DSI node for all Exynos4 boards.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:49 +09:00
Andrzej Hajda
02051ca063 drm/panel: add S6E8AA0 driver
The patch adds MIPI-DSI based S6E8AA0 AMOLED LCD panel driver.
Driver uses mipi_dsi bus to communicate with panel and exposes drm_panel
interface.

v2
- added bus error handling,
- set maxmimum DSI packet size on init,
- removed unsupported brightness drm_panel callbacks,
- minor improvements

v3
- switched to gpiod framework,
- minor fixes in error handling

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:49 +09:00
Andrzej Hajda
ffff29d1e3 ARM: dts: exynos4210-universal_c210: add proper panel node
This patch replaces panel bindings for panel initialized by boot loader
with bindings to proper ld9040 panel.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:49 +09:00
Andrzej Hajda
ff21993776 drm/panel: add ld9040 driver
The patch adds LD9040 parallel RGB panel driver with SPI control interface.
The driver uses drm_panel framework.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:48 +09:00
Andrzej Hajda
88072c39ed panel/ld9040: add DT bindings
The patch adds bindings for ld9040 panel.
Bindings describe panel resources, boot delays,
display timings and physical size.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:48 +09:00
Andrzej Hajda
86f05ae826 panel/s6e8aa0: add DT bindings
The patch adds bindings for s6e8aa0 panel.
Bindings describes panel resources, boot delays,
display timings, orientation and physical size.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:48 +09:00
Andrzej Hajda
7eb8f069be drm/exynos: add DSIM driver
The patch adds driver for Exynos DSI master (DSIM). It is a platform driver
which is registered as exynos_drm_display sub-driver of exynos_drm framework
and implements DRM encoder/connector pair.
It is also MIPI-DSI host driver and provides DSI bus for panels.
It interacts with its panel(s) using drm_panel framework.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:48 +09:00
Andrzej Hajda
670935b696 exynos/dsim: add DT bindings
The patch adds DT bindings for Exynos DSI Master. DSIM follows rules
for DSI bus host bindings [1].
Properties describes its resources: memory, interrupt, clocks,
phy, regulators, frequencies of clocks and video interfaces.

[1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:47 +09:00
Andrzej Hajda
3eb578e2d5 drm/exynos: disallow fbdev initialization if no device is connected
This patch adds explicit check if there is a connector with
connected status before fbdev initialization. It prevents creation
of default fbdev 1024x768 which is unusable on panels with bigger resolutions.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:47 +09:00
Andrzej Hajda
e49640da76 drm/mipi_dsi: create dsi devices only for nodes with reg property
MIPI DSI host node can contain child nodes which are not DSI devices.
Checking for existence of reg property can be used to distinguish such nodes.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:47 +09:00
Andrzej Hajda
1d96d4a677 drm/mipi_dsi: add flags to DSI messages
This patch adds flags field to mipi_dsi_msg structure and two flags:
- MIPI_DSI_MSG_REQ_ACK - request ACK from peripheral for given message,
- MIPI_DSI_MSG_USE_LPM - use Low Power Mode to transmit message.
The first flag is usually helpful during DSI diagnostic, the second
flag is required by some peripherals during configuration phase.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:47 +09:00
Thierry Reding
d105a6c97e drm/tegra: Use standard GPL v2 license text
Use the more canonical and concise variant of the GPL v2 license text.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:12:51 +02:00
Thierry Reding
9a2ac2dcdc drm/tegra: Relicense under GPL v2
The majority of the code in this driver is licensed under the GPL v2, so
relicense the rest under GPL v2 as well for consistency.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:12:51 +02:00
Thierry Reding
248141dbc6 drm/tegra: Relicense public header under MIT
This file will eventually be exported to libdrm, where all the public
header files use the MIT license.

Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:12:50 +02:00
Thierry Reding
6b6b604215 drm/tegra: Add eDP support
Add support for eDP functionality found on Tegra124 and later SoCs. Only
fast link training is currently supported.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:12:50 +02:00
Bryan Wu
64400c3791 gpu: host1x: export host1x_syncpt_incr_max() function
Tegra V4L2 camera driver needs this function to do frame capture.

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:12:49 +02:00
Thierry Reding
d40326f4b9 drm/tegra: prime: Add vmap support
This is trivial to support since all GEM objects are mapped into kernel
space anyway.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:12:49 +02:00
Alexandre Courbot
712ac1ba63 drm/panel: add support for LG LD070WX3-SL01 panel
This panel is used by Tegra Note 7 and supported by the simple-panel
driver.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:40 +02:00
Alexandre Courbot
499ce85af9 drm/panel: add support for LG LH500WX1-SD03 panel
This panel is used by the NVIDIA SHIELD and supported by the
simple-panel driver.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:40 +02:00
Thierry Reding
462658b8b3 drm/panel: simple: Allow DSI panels to provide mode flags
In order to differentiate between the different video modes (burst vs.
non-burst, sync pulses vs. sync events) supported by peripherals, pass
the flags that specify this mode in the panel description to the DSI
peripheral device when probed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:39 +02:00
Thierry Reding
15c1a919ae drm/panel: simple: Allow GPIO accesses to sleep
The enable GPIO for panels may be provided by GPIO expanders on slow
busses (such as I2C), and therefore toggling the GPIO may sleep. Since
these accesses don't happen in interrupt context, use the *_cansleep()
variants of the GPIO API.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:39 +02:00
Alexandre Courbot
887eb66e3a drm/panel: remove redundant regulator_disable()
regulator_disable() is already performed by panel_simple_disable(),
which is called by panel_simple_remove().

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:38 +02:00
Alexandre Courbot
cfdf0549f8 drm/panel: use gpiod interface for enable GPIO
Use the new GPIO descriptor interface to handle the panel's enable GPIO.
This considerably simplifies the code.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
[treding@nvidia.com: rework to improve readability]
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:38 +02:00
Thierry Reding
ec7c565383 drm/panel: Add LG 12.9" LCD panel
The LP129QE LCD has an LED backlight and a display resolution of
2560x1700 pixels.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:34 +02:00
Thierry Reding
03e255b993 MAINTAINERS: Add entry for DRM panel drivers
Add myself as the maintainer for DRM panel drivers. The plan is to
collect panel-related patches in one place to reduce conflicts and
unburden Dave.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:30 +02:00
Thomas Hellstrom
c75230833c drm/ttm: Hide the implementation details of reservation
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-04 08:00:59 +02:00
Laurent Pinchart
f4d1b02129 drm: gem-cma: Fix warnings due to improper printk formats
Use the %pad printk specifier to print dma_addr_t variables. This fixes
warnings on platforms where dma_addr_t has a different size than int or
size_t.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-04 10:13:48 +10:00
Laurent Pinchart
b65e64f7cc drm/cma: Use dma_mmap_writecombine() to mmap buffer
The GEM CMA helpers uses a custom mmap implementation based on
remap_pfn_range(). While this works when the buffer DMA and physical
addresses are identical, it fails to take IOMMU into account and tries
to mmap the buffer to userspace using the DMA virtual address instead of
the physical address. This results in mapping random physical pages when
the device is behind an IOMMU.

Use the DMA mapping dma_mmap_writecombine() function instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-04 10:13:32 +10:00
Michel Dänzer
145bccd239 drm/mm: Fix search for smallest hole satisfying constraints
entry->size is the size of the node, not the size of the hole after it.
So the code would actually find the hole which can satisfy the
constraints and which is preceded by the smallest node, not the smallest
hole satisfying the constraints.

Reported-by: "Huang, FrankR" <FrankR.Huang@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-04 10:12:21 +10:00
Shawn Guo
740c22ae51 drm/cma: include <drm/drmP.h> as needed
The following error and warnings will be seen when compiling a C file
which includes <drm/drm_gem_cma_helper.h> but without <drm/drmP.h>
being included before.

include/drm/drm_gem_cma_helper.h:5:24: error: field ‘base’ has incomplete type
include/drm/drm_gem_cma_helper.h: In function ‘to_drm_gem_cma_obj’:
include/drm/drm_gem_cma_helper.h:16:9: warning: initialization from incompatible pointer type [enabled by default]
include/drm/drm_gem_cma_helper.h: At top level:
include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_mode_create_dumb’ declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:24:34: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_file’ declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:28:10: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:28:10: warning: ‘struct drm_file’ declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:35:3: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:46:14: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]

Fix them by including <drm/drmP.h> in drm_gem_cma_helper.h.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-04 10:07:57 +10:00
Takashi Iwai
c683f427bd drm: Prefer noninterlace cmdline mode unless explicitly specified
Currently drm_pick_cmdline_mode() doesn't care about the interlace
when the given mode line has no "i" suffix.  That is, when there are
multiple entries for the same resolution, an interlace mode might be
picked up just depending on the assigned order, and there is no way to
exclude it.

This patch changes the logic for the mode selection, to prefer the
noninterlace mode unless the interlace mode is explicitly given.
When no matching mode is found, it still tries the interlace mode as
fallback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-04 10:07:03 +10:00
Lauri Kasanen
deadcb36f4 drm/radeon: Use two-ended allocation by size, v2
This decreases eviction by up to 20%, by improving the fragmentation
quality. No harm in normal cases that fit VRAM fully (PTS gaming suite).

In some cases, even the VRAM-fitting cases improved slightly (openarena, urban terror).

512kb was measured as the most optimal threshold for 3d workloads common to radeon.
Other drivers may need different thresholds according to their workloads.

v2: Nicer formatting
Signed-off-by: Lauri Kasanen <cand@gmx.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-04 09:28:41 +10:00
Lauri Kasanen
62347f9e0f drm: Add support for two-ended allocation, v3
Clients like i915 need to segregate cache domains within the GTT which
can lead to small amounts of fragmentation. By allocating the uncached
buffers from the bottom and the cacheable buffers from the top, we can
reduce the amount of wasted space and also optimize allocation of the
mappable portion of the GTT to only those buffers that require CPU
access through the GTT.

For other drivers, allocating small bos from one end and large ones
from the other helps improve the quality of fragmentation.

Based on drm_mm work by Chris Wilson.

v3: Changed to use a TTM placement flag
v2: Updated kerneldoc

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Christian König <deathsimple@vodafone.de>
Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: David Airlie <airlied@redhat.com>
2014-04-04 09:28:14 +10:00
Dave Airlie
2614dc6683 Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next
* 'msm-next' of git://people.freedesktop.org/~robclark/linux:
  drm/omap: Don't dereference list head when the connectors list is empty
  drm/msm/mdp: add timeout for irq wait
  drm/msm: validate flags, etc
  drm/msm: use componentised device support
  drm/msm: add chip-id param
  drm/msm: crank down gpu when inactive
  drm/msm: spin helper
  drm/msm: add hang_debug module param
  drm/msm: hdmi audio support
2014-04-04 08:03:21 +10:00
Laurent Pinchart
d9961b2271 drm/rcar-du: Handle encoder initialization failures
The rcar_du_encoder_init() function can fail and return an error code.
Don't ignore it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-04 08:02:54 +10:00
Dave Airlie
a1b5fb3d34 Merge branch 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux into drm-next
- Rework of finding the right PLL numbers for display
- Couple of different bugfixes

* 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux:
  drm/radeon: fix typo in spectre_golden_registers
  drm/radeon: fix endian swap on hawaii clear state buffer setup
  drm/radeon: call drm_edid_to_eld when we update the edid
  drm/radeon: rework finding display PLL numbers v2
  drm/radeon: fix resuming mode in pm runtime resume path
  drm/radeon: fix runtime suspend breaking secondary GPUs
  drm/radeon: clear needs_reset flag if IB test fails
2014-04-04 07:58:24 +10:00
Alex Deucher
f1553174a2 drm/radeon: fix typo in spectre_golden_registers
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
2014-04-03 12:41:18 +02:00
Alex Deucher
a8947f5767 drm/radeon: fix endian swap on hawaii clear state buffer setup
Need to swap on BE.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
2014-04-03 12:41:02 +02:00