Commit Graph

329 Commits

Author SHA1 Message Date
Daniel Vetter 5bb682c446 drm/omapdrm: Use unlocked gem unreferencing
For drm_gem_object_unreference callers are required to hold
dev->struct_mutex, which these paths don't. Enforcing this requirement
has become a bit more strict with

commit ef4c6270bf
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Oct 15 09:36:25 2015 +0200

    drm/gem: Check locking in drm_gem_object_unreference

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-3-git-send-email-daniel.vetter@ffwll.ch
2016-04-20 12:54:19 +02:00
Linus Torvalds f98c2135f8 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Just a couple of dma-buf related fixes and some amdgpu fixes, along
  with a regression fix for radeon off but default feature, but makes my
  30" monitor happy again"

* 'drm-next' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/mst: cleanup code indentation
  drm/radeon/mst: fix regression in lane/link handling.
  drm/amdgpu: add invalidate_page callback for userptrs
  drm/amdgpu: Revert "remove the userptr rmn->lock"
  drm/amdgpu: clean up path handling for powerplay
  drm/amd/powerplay: fix memory leak of tdp_table
  dma-buf/fence: fix fence_is_later v2
  dma-buf: Update docs for SYNC ioctl
  drm: remove excess description
  dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()
  drm/atmel-hlcdc: use helper to get crtc state
  drm/atomic: use helper to get crtc state
2016-03-25 08:48:31 -07:00
Dave Airlie 17efca93c8 Merge tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel into drm-next
Bunch of small fixupes all over. Plus a dma-buf patch that Sumit asked me
to cherry-pick since that's the only one he had in his tree.

There's a sparse issue outstanding in the color mgr stuff, but Lionel is
still working on something that actually appeases sparse.

* tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel:
  dma-buf/fence: fix fence_is_later v2
  dma-buf: Update docs for SYNC ioctl
  drm: remove excess description
  dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()
  drm/atmel-hlcdc: use helper to get crtc state
  drm/atomic: use helper to get crtc state
2016-03-24 08:41:59 +10:00
Linus Torvalds 266c73b777 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
 "This is the main drm pull request for 4.6 kernel.

  Overall the coolest thing here for me is the nouveau maxwell signed
  firmware support from NVidia, it's taken a long while to extract this
  from them.

  I also wish the ARM vendors just designed one set of display IP, ARM
  display block proliferation is definitely increasing.

  Core:
     - drm_event cleanups
     - Internal API cleanup making mode_fixup optional.
     - Apple GMUX vga switcheroo support.
     - DP AUX testing interface

  Panel:
     - Refactoring of DSI core for use over more transports.

  New driver:
     - ARM hdlcd driver

  i915:
     - FBC/PSR (framebuffer compression, panel self refresh) enabled by default.
     - Ongoing atomic display support work
     - Ongoing runtime PM work
     - Pixel clock limit checks
     - VBT DSI description support
     - GEM fixes
     - GuC firmware scheduler enhancements

  amdkfd:
     - Deferred probing fixes to avoid make file or link ordering.

  amdgpu/radeon:
     - ACP support for i2s audio support.
     - Command Submission/GPU scheduler/GPUVM optimisations
     - Initial GPU reset support for amdgpu

  vmwgfx:
     - Support for DX10 gen mipmaps
     - Pageflipping and other fixes.

  exynos:
     - Exynos5420 SoC support for FIMD
     - Exynos5422 SoC support for MIPI-DSI

  nouveau:
     - GM20x secure boot support - adds acceleration for Maxwell GPUs.
     - GM200 support
     - GM20B clock driver support
     - Power sensors work

  etnaviv:
     - Correctness fixes for GPU cache flushing
     - Better support for i.MX6 systems.

  imx-drm:
     - VBlank IRQ support
     - Fence support
     - OF endpoint support

  msm:
     - HDMI support for 8996 (snapdragon 820)
     - Adreno 430 support
     - Timestamp queries support

  virtio-gpu:
     - Fixes for Android support.

  rockchip:
     - Add support for Innosilicion HDMI

  rcar-du:
     - Support for 4 crtcs
     - R8A7795 support
     - RCar Gen 3 support

  omapdrm:
     - HDMI interlace output support
     - dma-buf import support
     - Refactoring to remove a lot of legacy code.

  tilcdc:
     - Rewrite of pageflipping code
     - dma-buf support
     - pinctrl support

  vc4:
     - HDMI modesetting bug fixes
     - Significant 3D performance improvement.

  fsl-dcu (FreeScale):
     - Lots of fixes

  tegra:
     - Two small fixes

  sti:
     - Atomic support for planes
     - Improved HDMI support"

* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (1063 commits)
  drm/amdgpu: release_pages requires linux/pagemap.h
  drm/sti: restore mode_fixup callback
  drm/amdgpu/gfx7: add MTYPE definition
  drm/amdgpu: removing BO_VAs shouldn't be interruptible
  drm/amd/powerplay: show uvd/vce power gate enablement for tonga.
  drm/amd/powerplay: show uvd/vce power gate info for fiji
  drm/amdgpu: use sched fence if possible
  drm/amdgpu: move ib.fence to job.fence
  drm/amdgpu: give a fence param to ib_free
  drm/amdgpu: include the right version of gmc header files for iceland
  drm/radeon: fix indentation.
  drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ
  drm/amdgpu: switch back to 32bit hw fences v2
  drm/amdgpu: remove amdgpu_fence_is_signaled
  drm/amdgpu: drop the extra fence range check v2
  drm/amdgpu: signal fences directly in amdgpu_fence_process
  drm/amdgpu: cleanup amdgpu_fence_wait_empty v2
  drm/amdgpu: keep all fences in an RCU protected array v2
  drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ring
  drm/amdgpu: RCU protected amd_sched_fence_release
  ...
2016-03-21 13:48:00 -07:00
Chris Wilson 18b862dcd5 dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()
Drivers, especially i915.ko, can fail during the initial migration of a
dma-buf for CPU access. However, the error code from the driver was not
being propagated back to ioctl and so userspace was blissfully ignorant
of the failure. Rendering corruption ensues.

Whilst fixing the ioctl to return the error code from
dma_buf_start_cpu_access(), also do the same for
dma_buf_end_cpu_access().  For most drivers, dma_buf_end_cpu_access()
cannot fail. i915.ko however, as most drivers would, wants to avoid being
uninterruptible (as would be required to guarrantee no failure when
flushing the buffer to the device). As userspace already has to handle
errors from the SYNC_IOCTL, take advantage of this to be able to restart
the syscall across signals.

This fixes a coherency issue for i915.ko as well as reducing the
uninterruptible hold upon its BKL, the struct_mutex.

Fixes commit c11e391da2
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Feb 11 20:04:51 2016 -0200

    dma-buf: Add ioctls to allow userspace to flush

Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible
Testcase: igt/prime_mmap_coherency/ioctl-errors
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tiago Vignatti <tiago.vignatti@intel.com>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
CC: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: intel-gfx@lists.freedesktop.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1458331359-2634-1-git-send-email-chris@chris-wilson.co.uk
2016-03-19 11:03:49 +01:00
Dave Airlie 1a4be38a3a Merge tag 'topic/drm-misc-2016-03-14' of git://anongit.freedesktop.org/drm-intel into drm-next
* tag 'topic/drm-misc-2016-03-14' of git://anongit.freedesktop.org/drm-intel: (27 commits)
  drm: atomic helper: do not unreference error pointer
  drm/edid: Extract SADs properly from multiple audio data blocks
  drm: fix blob pointer check
  drm: introduce pipe color correction properties
  drm/atomic: Clean up update_connector_routing.
  drm/atomic: Clean up steal_encoder, v2.
  drm/atomic: Handle encoder assignment conflicts in a separate check, v3.
  drm/atomic: Handle encoder stealing from set_config better.
  drm/atomic: Always call steal_encoder, v2.
  drm/ast: removed optional dummy crtc mode_fixup function.
  drm/bochs: removed optional dummy crtc mode_fixup function.
  drm/fsl-dcu: removed optional dummy crtc mode_fixup function.
  drm/virtio: removed optional dummy crtc mode_fixup function.
  drm/nouveau/dispnv04: removed optional dummy crtc mode_fixup function.
  drm/atmel-hlcdc: remove optional dummy crtc mode_fixup function.
  drm/sti: removed optional dummy crtc mode_fixup function.
  drm/shmobile: removed optional dummy crtc mode_fixup function.
  drm/msm/mdp: removed optional dummy crtc mode_fixup function.
  drm/omapdrm: removed optional dummy crtc mode_fixup function.
  drm/rcar-du: removed optional dummy crtc mode_fixup function.
  ...
2016-03-16 11:09:26 +10:00
Tomi Valkeinen 55f6fca3be drm/omap: fix panel/encoder probes
The recent changes which removed platform data support from panels &
encoders had a few mistakes, causing probes of DVI connector and DSI
command mode panels to fail every time due to missing '!'. Fix the
if()s.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-03-16 11:08:35 +10:00
Luis R. Rodriguez f6e45661f9 dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()
Rename dma_*_writecombine() to dma_*_wc(), so that the naming
is coherent across the various write-combining APIs. Keep the
old names for compatibility for a while, these can be removed
at a later time. A guard is left to enable backporting of the
rename, and later remove of the old mapping defines seemlessly.

Build tested successfully with allmodconfig.

The following Coccinelle SmPL patch was used for this simple
transformation:

@ rename_dma_alloc_writecombine @
expression dev, size, dma_addr, gfp;
@@

-dma_alloc_writecombine(dev, size, dma_addr, gfp)
+dma_alloc_wc(dev, size, dma_addr, gfp)

@ rename_dma_free_writecombine @
expression dev, size, cpu_addr, dma_addr;
@@

-dma_free_writecombine(dev, size, cpu_addr, dma_addr)
+dma_free_wc(dev, size, cpu_addr, dma_addr)

@ rename_dma_mmap_writecombine @
expression dev, vma, cpu_addr, dma_addr, size;
@@

-dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size)
+dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size)

We also keep the old names as compatibility helpers, and
guard against their definition to make backporting easier.

Generated-by: Coccinelle SmPL
Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: airlied@linux.ie
Cc: akpm@linux-foundation.org
Cc: benh@kernel.crashing.org
Cc: bhelgaas@google.com
Cc: bp@suse.de
Cc: dan.j.williams@intel.com
Cc: daniel.vetter@ffwll.ch
Cc: dhowells@redhat.com
Cc: julia.lawall@lip6.fr
Cc: konrad.wilk@oracle.com
Cc: linux-fbdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: luto@amacapital.net
Cc: mst@redhat.com
Cc: tomi.valkeinen@ti.com
Cc: toshi.kani@hp.com
Cc: vinod.koul@intel.com
Cc: xen-devel@lists.xensource.com
Link: http://lkml.kernel.org/r/1453516462-4844-1-git-send-email-mcgrof@do-not-panic.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-03-09 14:57:51 +01:00
Dave Airlie a90cc3f250 omapdrm changes for v4.6
* HDMI interlace output support
 * DMAbuf import support
 * Big refactoring leading to removal of legacy code
 * Various non-critical fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJW2Y2tAAoJEPo9qoy8lh71MPoP/ikqFMmkmtXgn3ND/IRXfkbz
 UUDgdOf7TyzMgTVJEKv8MMz/Da2P9AxTtv4unImZoy9OswfYuNETOViMw3Yj26aM
 SNKWxHCA3yDUHndvwLUC8tMhpDXAXC1AdrIbuvj/H/5+Hox89Xo7L3CVMtdE68vN
 9mlpxUJDqudMiUCv15Pi7YfLYJmzWLHGx7g+a6f6+KCPbtSWF7777MsSlxwPr1uP
 M44cjseq8debLn8wWHl4Vzm40Wr4t0vzEo8oRIdBTs15YMQnPGanuIxvW/byPaCN
 dXnEo98cD0wjd6lutMwEW0LQBCueQlsLgFRPHuUdhT0Z1NsiV7V892MH+QmePbzK
 +MeV0TA3+34fj9ngSc8dqx7re26z8YNAkGrEZHYQTepjrzk4baS9GVZL9c4c5oV/
 PSzoeC8ipPNMtbLJtgqIijvlO9Ir61J4twaGqhmJXiktsX+KZa0RuJ/RubT1ABmJ
 Fkv9Jo4GK6ZxyH3xI6kJFxbf835/vaPRxCdd40Tp2H79w+1bxy37ieqhybLcQjqn
 hR0Apn/VP0qREdw5naP1el+79R56vNogwsH7m/h3hM2DCMiwB7QuOTtoWw7eSDOW
 ruOvLoNryYgQgMTK5baaTfeDo8lmYzjJch71W0zhlBa6qBXKl1dsVKWK7yKtbiXx
 MabEhh52njL4pYF32wjW
 =+fwk
 -----END PGP SIGNATURE-----

Merge tag 'omapdrm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next

omapdrm changes for v4.6

* HDMI interlace output support
* DMAbuf import support
* Big refactoring leading to removal of legacy code
* Various non-critical fixes

* tag 'omapdrm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (76 commits)
  drm/omap: no need to select OMAP2_DSS
  drm/omap: gem: Fix omap_gem_new() error path
  drm/omap: remove -Werror from Makefile
  drm/omap: remove dispc_ovl_check()
  drm/omap: remove dss compat code
  drm/omap: remove last uses of omap_overlay_manager
  drm/omap: DSI: remove uses of omap_overlay_manager
  drm/omap: VENC: remove uses of omap_overlay_manager
  drm/omap: SDI: remove uses of omap_overlay_manager
  drm/omap: HDMI4: remove uses of omap_overlay_manager
  drm/omap: HDMI5: remove uses of omap_overlay_manager
  drm/omap: DPI: remove uses of omap_overlay_manager
  drm/omap: remove extra manager checks on disconnect
  drm/omap: remove extra check in dpi and sdi
  drm/omap: convert dss_mgr_unregister_framedone_handler to accept omap_channel
  drm/omap: convert dss_mgr_register_framedone_handler to accept omap_channel
  drm/omap: convert dss_mgr_start_update to accept omap_channel
  drm/omap: convert dss_mgr_disable to accept omap_channel
  drm/omap: convert dss_mgr_enable to accept omap_channel
  drm/omap: convert dss_mgr_set_lcd_config to accept omap_channel
  ...
2016-03-05 08:07:58 +10:00
Carlos Palminha 4091e54e84 drm/omapdrm: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/101f043d5fa747291c09ae765bac4d55c6e39988.1455630967.git.palminha@synopsys.com
2016-03-04 17:59:02 +01:00
Tomi Valkeinen 1c278e5e37 drm/omap: no need to select OMAP2_DSS
omapdss driver now depends on omapdrm, so we no longer should select
OMAP2_DSS from omapdrm's Kconfig.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:46 +02:00
Laurent Pinchart c2eb77ff71 drm/omap: gem: Fix omap_gem_new() error path
When an error occurs in omap_gem_new() the function calls
omap_gem_free_object() to clean up. However, that function expects to be
called on a fully initialized GEM object and thus crashes.

Replace it by manual cleanup.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:46 +02:00
Tomi Valkeinen 39cd66209d drm/omap: remove -Werror from Makefile
Having -Werror in the omapdrm Makefile makes development and debugging a
PITA. Let's remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:46 +02:00
Tomi Valkeinen 3bce5f4310 drm/omap: remove dispc_ovl_check()
dispc_ovl_check() is not used anywhere, so it can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:24 +02:00
Tomi Valkeinen 9198891b4e drm/omap: remove dss compat code
We have removed all the uses of compat code from omapdrm and the
non-compat parts of omapdss, so now we can remove all the compat code
itself.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:24 +02:00
Tomi Valkeinen 751d2e18b0 drm/omap: remove last uses of omap_overlay_manager
We have now removed all uses of 'struct omap_overlay_manager', so we can
now remove the last places where it is set.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:24 +02:00
Tomi Valkeinen 0674d38627 drm/omap: DSI: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch
changes DSI driver to use 'omap_channel' instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:24 +02:00
Tomi Valkeinen 532a2cba7a drm/omap: VENC: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch
changes VENC driver to use 'omap_channel' instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:24 +02:00
Tomi Valkeinen c64b79c80a drm/omap: SDI: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch
changes SDI driver to use 'omap_channel' instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:24 +02:00
Tomi Valkeinen 46e1ef3b6f drm/omap: HDMI4: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch
changes HDMI4 driver to use 'omap_channel' instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen 86e95f92f9 drm/omap: HDMI5: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch
changes HDMI5 driver to use 'omap_channel' instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen a070ba6cea drm/omap: DPI: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch
changes DPI driver to use 'omap_channel' instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen a0e53bfe9f drm/omap: remove extra manager checks on disconnect
The DSS output drivers check 'dssdev->manager' in disconnect()
functions. This check is not needed as the manager must always be set if
the output device was connected. Remove the check.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen 98df844806 drm/omap: remove extra check in dpi and sdi
Both dpi and sdi check for 'mgr != NULL' in check_timings. This check is
not necessary, as mgr must always be set before check_timings. Remove
the check.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen 3421899893 drm/omap: convert dss_mgr_unregister_framedone_handler to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_unregister_framedone_handler() to accept 'enum
omap_channel' instead of 'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen af235e31e9 drm/omap: convert dss_mgr_register_framedone_handler to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_register_framedone_handler() to accept 'enum
omap_channel' instead of 'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen 1f03f93480 drm/omap: convert dss_mgr_start_update to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_start_update() to accept 'enum omap_channel' instead of
'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen 705fd454a9 drm/omap: convert dss_mgr_disable to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_disable() to accept 'enum omap_channel' instead of
'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen 85a8c62250 drm/omap: convert dss_mgr_enable to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_enable() to accept 'enum omap_channel' instead of
'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:23 +02:00
Tomi Valkeinen bb772e1abf drm/omap: convert dss_mgr_set_lcd_config to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_set_lcd_config() to accept 'enum omap_channel' instead
of 'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen 5c6ff3cd45 drm/omap: convert dss_mgr_set_timings to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_set_timings() to accept 'enum omap_channel' instead of
'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen bdac3bb946 drm/omap: convert dss_mgr_disconnect to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_disconnect() to accept 'enum omap_channel' instead of
'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen 1b07b0664a drm/omap: convert dss_mgr_connect to accept omap_channel
We are removing uses of 'struct omap_overlay_manager'. This patch
changes dss_mgr_connect() to accept 'enum omap_channel' instead of
'struct omap_overlay_manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen f1504ad00d drm/omap: use dispc_channel_connected in output drivers
Use 'out->dispc_channel_connected' to check if the device is connected
to an overlay manager or not, instead of using 'out->manager'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen 49239503a3 drm/omap: add dispc_channel_connected field to omap_dss_device
We want to remove the 'struct omap_overlay_manager' from
omap_dss_device. At the moment that field is used, among some other
uses, to see if the omap_dss_device is connected to an overlay manager.

To make it possible to remove the 'struct omap_overlay_manager' field,
this patch adds 'bool dispc_channel_connected' field to track the
connected-or-not status.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen e5cbb6e8ea drm/omap: convert dss_mgr_ops to use omap_channel
We are removing the use of 'struct omap_overlay_manager' from omapdrm.
This patch changes the function pointers in 'dss_mgr_ops' to get 'enum
omap_channel' parameter instead of 'struct omap_overlay_manager'.

The change is very straightforward, as we still use 'struct
omap_overlay_manager' inside the function implementations where needed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen 179df15fc5 drm/omap: remove use of omapdss_find_mgr_from_display()
In order to remove uses of 'struct omap_overlay_manager' we need to get
rid of using omapdss_find_mgr_from_display() when initializing omapdrm.

Instead of using omapdss_find_mgr_from_display() and mgr->id to find the
dispc channel used for the given display, we can instead use
omapdss_find_output_from_display(), and get the output->dispc_channel
from there.

We can also remove omapdss_find_mgr_from_display() as it's no longer
used.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen 3a92413864 drm/omap: remove crtc->mgr field
In order to remove uses of 'struct omap_overlay_manager' from omapdrm,
this patch removes the crtc->mgr field.

To accomplish that, a new static array is added along the current
'omap_crtcs' static array, which is used to store the output device
connected to a crtc.

Optimally we'd use the struct omap_crtc to store this information, but
at the time when omap_crtc_dss_connect() is called, we don't yet have
the omap_crtc instances. This might possibly be fixed later, but for now
the static array does the job.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:22 +02:00
Tomi Valkeinen 7b9cb5eeb4 drm/omap: Add dispc_mgr_get_supported_outputs()
We are removing the use of the 'struct omap_overlay_manager' from
omapdrm, and one part of that is removing the use of
mgr->supported_outputs field.

This patch adds dispc_mgr_get_supported_outputs() function which can be
used instead of mgr->supported_outputs. omap_crtc.c is changed to use
the new function.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen caaecd9abe drm/omap: move dss_mgr_* declarations to omapdrm/omapfb
This patch continues the work to create private versions of the
omapdss.h header for omapdrm and omapfb. This one moves the dss_mgr_*
function declarations.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen 564c7c7510 drm/omap: move struct dss_mgr_ops to omapdrm/omapfb
This patch continues the work to create private versions of the
omapdss.h header for omapdrm and omapfb. This one moves 'struct dss_mgr_ops'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen 35a339acca drm/omap, omapfb: move exported dispc function declarations to omapdrm/omapfb
omapdrm and omapfb still share the same include/video/omapdss.h. We need
to change that so that we can proceed with omapdrm work.

However, it's not trivial to make separate omapfb and omapdrm versions
of omapdss.h, as that file is also included in other places like arch
code, audio code and omap_vout code. So we'll do it piece by piece.

This patch makes private versions of all the dispc function declarations
that are in omapdss.h. For omapdrm we create a new file,
drivers/gpu/drm/omapdrm/dss/omapdss.h, which will contain headers meant
to be visible outside omapdss.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen 33c06b6f7e drm/omap: panel-tpo-td043mtea1: remove pdata support
We no longer have any boards that require the platform data support from
the panel, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen b34da247a8 drm/omap: panel-tpo-td028ttec1: remove pdata support
We no longer have any boards that require the platform data support from
the panel, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen 367aa94c61 drm/omap: panel-nec-nl8048hl11: remove pdata support
We no longer have any boards that require the platform data support from
the panel, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen 393c2698d6 drm/omap: panel-sharp-ls037v7dw01: remove pdata support
We no longer have any boards that require the platform data support from
the panel, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen 4e040ec70b drm/omap: panel-lgphilips-lb035q02: remove pdata support
We no longer have any boards that require the platform data support from
the panel, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:21 +02:00
Tomi Valkeinen 7f7642b5b9 drm/omap: connector-hdmi: remove pdata support
We no longer have any boards that require the platform data support from
the connector, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:20 +02:00
Tomi Valkeinen a0d56d7ea5 drm/omap: connector-dvi: remove pdata support
We no longer have any boards that require the platform data support from
the connector, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:20 +02:00
Tomi Valkeinen f4487e3585 drm/omap: encoder-tfp410: remove pdata support
We no longer have any boards that require the platform data support from
the encoder, so we can remove the related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03 17:38:20 +02:00