]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
8 years agodrm: etnaviv: extract command ring reservation
Russell King [Thu, 21 Jan 2016 15:20:04 +0000 (15:20 +0000)]
drm: etnaviv: extract command ring reservation

Provide a helper etnaviv_buffer_reserve() to ensure that we can fit a
set of commands into the ring buffer without wrapping by moving code
out of etnaviv_buffer_queue().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
8 years agodrm/etnaviv: move GPU linear window to end of DMA window
Lucas Stach [Mon, 25 Jan 2016 16:03:09 +0000 (17:03 +0100)]
drm/etnaviv: move GPU linear window to end of DMA window

If the end of the system DMA window is farther away from the start of
physical RAM than the size of the GPU linear window, move the linear
window so that it ends at the same address than the system DMA window.

This allows to map command buffer from CMA, which is likely to reside
at the end of the system DMA window, while also overlapping as much
RAM as possible, in order to optimize regular buffer mappings through
the linear window.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
8 years agodrm/etnaviv: move runtime PM balance into retire worker
Lucas Stach [Thu, 7 Jan 2016 11:43:15 +0000 (12:43 +0100)]
drm/etnaviv: move runtime PM balance into retire worker

The retire worker is kicked for each fence, either the normal way
by signaling the fence from the event completion interrupt or by
the recover worker if the GPU got stuck. Moving the RPM put into
the retire worker allows us to have it in a single place for
both cases.

This also shaves off quite a bit of the CPU time spent in hardirq
context, as arming the autosuspend timer when the RPM refcount
drops to 0 is a relatively costly operation.

Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
8 years agoMerge tag 'omapdrm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux...
Dave Airlie [Fri, 4 Mar 2016 22:07:58 +0000 (08:07 +1000)]
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
  ...

8 years agoMerge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm...
Dave Airlie [Fri, 4 Mar 2016 03:37:39 +0000 (13:37 +1000)]
Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next

Big ticket items are hdmi support for 8996 (aka snapdragon 820), and
adreno 430 support.  Also one more small uapi addition to support
timestamp queries.

* 'msm-next' of git://people.freedesktop.org/~robclark/linux: (29 commits)
  drm/msm: rename hdmi symbols
  drm/msm/adreno: remove duplicate adreno_hw_init() call
  drm/msm: add timestamp param
  drm/msm: fix small typo
  drm/msm: grab struct_mutex after allocating submit
  drm/msm: reject submit ioctl if no gpu
  drm/msm/adreno: print details in case of a protect fault interrupt
  drm/msm/adreno: get CP_RPTR from register instead of shadow memory
  drm/msm/adreno: add adreno430 power control
  drm/msm/adreno: support for adreno 430.
  drm/msm: update generated headers
  drm/msm/dsi: fix definition of msm_dsi_pll_28nm_8960_init()
  drm/msm/dsi: Parse DSI lanes via DT
  drm/msm/dsi: Drop VDD regulator for MSM8916
  drm/msm/dsi: Remove incorrect warning on host attach
  drm/msm: Free fb helper resources in msm_unload
  drm/msm/mdp: Detach iommu in mdp4_destroy
  drm/msm: make iommu port names const'ier
  drm/msm/mdp: Use atomic helper to set crtc property
  dt-bindings: msm/hdmi: Add HDMI PHY bindings
  ...

8 years agodrm/msm: rename hdmi symbols
Arnd Bergmann [Mon, 22 Feb 2016 21:08:35 +0000 (22:08 +0100)]
drm/msm: rename hdmi symbols

Global symbols in the kernel should be prefixed by the name
of the subsystem and/or driver to avoid conflicts when all
code is built-in.

In this case, function names like 'hdmi_register' or 'hdmi_set_mode'
are way too generic for an MSM specific DRM driver, so I'm renaming
them all to msm_hdmi_* here.

I also rename a lot of the 'static' symbols along with the global
names for consistency, even though those are relatively harmless;
they might only be slightly confusing when they show up in
backtraces.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/adreno: remove duplicate adreno_hw_init() call
Rob Clark [Wed, 24 Feb 2016 23:56:24 +0000 (18:56 -0500)]
drm/msm/adreno: remove duplicate adreno_hw_init() call

Not sure where it came from, but seem unintentional.  And also not
needed on a420, so let's just drop it.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: add timestamp param
Rob Clark [Mon, 22 Feb 2016 11:26:21 +0000 (06:26 -0500)]
drm/msm: add timestamp param

We need this for GL_TIMESTAMP queries.

Note: currently only supported on a4xx.. a3xx doesn't have this
always-on counter.  I think we could emulate it with the one CP
counter that is available, but for now it is of limited usefulness
on a3xx (since we can't seem to do time-elapsed queries in any sane
way with the existing firmware on a3xx, and if you are trying to do
profiling on a tiler you want time-elapsed).  We can add that later
if it becomes useful.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: fix small typo
Rob Clark [Wed, 3 Feb 2016 19:02:04 +0000 (14:02 -0500)]
drm/msm: fix small typo

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: grab struct_mutex after allocating submit
Rob Clark [Wed, 3 Feb 2016 18:24:35 +0000 (13:24 -0500)]
drm/msm: grab struct_mutex after allocating submit

No real need to hold the lock over allocation, and simplifies things
slightly if we change the order.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: reject submit ioctl if no gpu
Rob Clark [Wed, 3 Feb 2016 18:12:31 +0000 (13:12 -0500)]
drm/msm: reject submit ioctl if no gpu

Existing userspace wouldn't get this far, since getparam ioctl would
have failed and it would have bailed out creating a screen/context.

But all the same, we shouldn't let evil or confused userspace cause a
null ptr deref.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/adreno: print details in case of a protect fault interrupt
Craig Stout [Fri, 19 Feb 2016 00:50:03 +0000 (16:50 -0800)]
drm/msm/adreno: print details in case of a protect fault interrupt

Signed-off-by: Craig Stout <cstout@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/adreno: get CP_RPTR from register instead of shadow memory
Craig Stout [Fri, 19 Feb 2016 00:50:02 +0000 (16:50 -0800)]
drm/msm/adreno: get CP_RPTR from register instead of shadow memory

As described in the downstream/kgsl driver:
Sometimes the RPTR shadow memory is unreliable causing timeouts
in adreno_idle().  Read it directly from the register instead.

Signed-off-by: Craig Stout <cstout@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/adreno: add adreno430 power control
Craig Stout [Fri, 19 Feb 2016 00:50:01 +0000 (16:50 -0800)]
drm/msm/adreno: add adreno430 power control

Signed-off-by: Craig Stout <cstout@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/adreno: support for adreno 430.
Craig Stout [Fri, 19 Feb 2016 00:50:00 +0000 (16:50 -0800)]
drm/msm/adreno: support for adreno 430.

Signed-off-by: Craig Stout <cstout@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: update generated headers
Rob Clark [Sat, 20 Feb 2016 18:37:58 +0000 (13:37 -0500)]
drm/msm: update generated headers

Pull in additional regs needed for a430, etc.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/dsi: fix definition of msm_dsi_pll_28nm_8960_init()
Luis Henriques [Wed, 3 Feb 2016 14:25:15 +0000 (14:25 +0000)]
drm/msm/dsi: fix definition of msm_dsi_pll_28nm_8960_init()

This fixes the following build failure:

drivers/gpu/drm/msm/dsi/pll/dsi_pll_28nm.o: In function `msm_dsi_pll_28nm_8960_init':
dsi_pll_28nm.c:(.text+0x1198): multiple definition of `msm_dsi_pll_28nm_8960_init'
drivers/gpu/drm/msm/dsi/pll/dsi_pll.o:dsi_pll.c:(.text+0x0): first defined here

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Acked-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/dsi: Parse DSI lanes via DT
Archit Taneja [Thu, 25 Feb 2016 05:49:48 +0000 (11:19 +0530)]
drm/msm/dsi: Parse DSI lanes via DT

The DSI driver is currently unaware of how the DSI physical data lanes
are mapped to the logical lanes provided by the DSI controller.

Create a DT binding "qcom,data-lane-map" that provides this information
on a given platform.

The MSM DSI controller is restricted in terms of what all mappings
it can support. The lane polarity is fixed for all the lanes, the clock
lanes are fixed, and the data lanes can be swapped among each other only
for a few combinations. Apply these restrictions when we parse the DT
data.

Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
8 years agodrm/omap: no need to select OMAP2_DSS
Tomi Valkeinen [Tue, 23 Feb 2016 15:34:34 +0000 (17:34 +0200)]
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>
8 years agodrm/omap: gem: Fix omap_gem_new() error path
Laurent Pinchart [Wed, 2 Mar 2016 10:51:19 +0000 (12:51 +0200)]
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>
8 years agodrm/omap: remove -Werror from Makefile
Tomi Valkeinen [Tue, 1 Mar 2016 09:09:36 +0000 (11:09 +0200)]
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>
8 years agodrm/omap: remove dispc_ovl_check()
Tomi Valkeinen [Mon, 22 Feb 2016 16:22:30 +0000 (18:22 +0200)]
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>
8 years agodrm/omap: remove dss compat code
Tomi Valkeinen [Mon, 22 Feb 2016 14:11:45 +0000 (16:11 +0200)]
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>
8 years agodrm/omap: remove last uses of omap_overlay_manager
Tomi Valkeinen [Thu, 5 Nov 2015 08:02:43 +0000 (10:02 +0200)]
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>
8 years agodrm/omap: DSI: remove uses of omap_overlay_manager
Tomi Valkeinen [Thu, 5 Nov 2015 08:01:02 +0000 (10:01 +0200)]
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>
8 years agodrm/omap: VENC: remove uses of omap_overlay_manager
Tomi Valkeinen [Thu, 5 Nov 2015 07:57:35 +0000 (09:57 +0200)]
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>
8 years agodrm/omap: SDI: remove uses of omap_overlay_manager
Tomi Valkeinen [Thu, 5 Nov 2015 07:57:04 +0000 (09:57 +0200)]
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>
8 years agodrm/omap: HDMI4: remove uses of omap_overlay_manager
Tomi Valkeinen [Thu, 5 Nov 2015 07:56:21 +0000 (09:56 +0200)]
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>
8 years agodrm/omap: HDMI5: remove uses of omap_overlay_manager
Tomi Valkeinen [Thu, 5 Nov 2015 07:55:01 +0000 (09:55 +0200)]
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>
8 years agodrm/omap: DPI: remove uses of omap_overlay_manager
Tomi Valkeinen [Thu, 5 Nov 2015 07:52:00 +0000 (09:52 +0200)]
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>
8 years agodrm/omap: remove extra manager checks on disconnect
Tomi Valkeinen [Thu, 5 Nov 2015 07:44:53 +0000 (09:44 +0200)]
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>
8 years agodrm/omap: remove extra check in dpi and sdi
Tomi Valkeinen [Thu, 5 Nov 2015 07:41:12 +0000 (09:41 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_unregister_framedone_handler to accept omap_channel
Tomi Valkeinen [Thu, 5 Nov 2015 07:23:47 +0000 (09:23 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_register_framedone_handler to accept omap_channel
Tomi Valkeinen [Thu, 5 Nov 2015 07:23:03 +0000 (09:23 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_start_update to accept omap_channel
Tomi Valkeinen [Thu, 5 Nov 2015 07:20:46 +0000 (09:20 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_disable to accept omap_channel
Tomi Valkeinen [Wed, 4 Nov 2015 18:28:45 +0000 (20:28 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_enable to accept omap_channel
Tomi Valkeinen [Wed, 4 Nov 2015 18:27:31 +0000 (20:27 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_set_lcd_config to accept omap_channel
Tomi Valkeinen [Wed, 4 Nov 2015 18:26:15 +0000 (20:26 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_set_timings to accept omap_channel
Tomi Valkeinen [Wed, 4 Nov 2015 18:25:05 +0000 (20:25 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_disconnect to accept omap_channel
Tomi Valkeinen [Wed, 4 Nov 2015 18:23:37 +0000 (20:23 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_connect to accept omap_channel
Tomi Valkeinen [Wed, 4 Nov 2015 18:21:48 +0000 (20:21 +0200)]
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>
8 years agodrm/omap: use dispc_channel_connected in output drivers
Tomi Valkeinen [Thu, 5 Nov 2015 07:34:51 +0000 (09:34 +0200)]
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>
8 years agodrm/omap: add dispc_channel_connected field to omap_dss_device
Tomi Valkeinen [Thu, 5 Nov 2015 07:34:31 +0000 (09:34 +0200)]
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>
8 years agodrm/omap: convert dss_mgr_ops to use omap_channel
Tomi Valkeinen [Wed, 4 Nov 2015 17:36:26 +0000 (19:36 +0200)]
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>
8 years agodrm/omap: remove use of omapdss_find_mgr_from_display()
Tomi Valkeinen [Wed, 21 Oct 2015 13:17:23 +0000 (16:17 +0300)]
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>
8 years agodrm/omap: remove crtc->mgr field
Tomi Valkeinen [Wed, 21 Oct 2015 13:34:08 +0000 (16:34 +0300)]
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>
8 years agodrm/omap: Add dispc_mgr_get_supported_outputs()
Tomi Valkeinen [Wed, 4 Nov 2015 13:11:25 +0000 (15:11 +0200)]
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>
8 years agodrm/omap: move dss_mgr_* declarations to omapdrm/omapfb
Tomi Valkeinen [Fri, 19 Feb 2016 15:37:09 +0000 (17:37 +0200)]
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>
8 years agodrm/omap: move struct dss_mgr_ops to omapdrm/omapfb
Tomi Valkeinen [Fri, 19 Feb 2016 15:19:41 +0000 (17:19 +0200)]
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>
8 years agodrm/omap, omapfb: move exported dispc function declarations to omapdrm/omapfb
Tomi Valkeinen [Fri, 19 Feb 2016 14:54:36 +0000 (16:54 +0200)]
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>
8 years agodrm/omap: panel-tpo-td043mtea1: remove pdata support
Tomi Valkeinen [Mon, 22 Feb 2016 16:14:52 +0000 (18:14 +0200)]
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>
8 years agodrm/omap: panel-tpo-td028ttec1: remove pdata support
Tomi Valkeinen [Mon, 22 Feb 2016 16:14:33 +0000 (18:14 +0200)]
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>
8 years agodrm/omap: panel-nec-nl8048hl11: remove pdata support
Tomi Valkeinen [Thu, 18 Feb 2016 15:27:55 +0000 (17:27 +0200)]
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>
8 years agodrm/omap: panel-sharp-ls037v7dw01: remove pdata support
Tomi Valkeinen [Mon, 22 Feb 2016 16:13:36 +0000 (18:13 +0200)]
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>
8 years agodrm/omap: panel-lgphilips-lb035q02: remove pdata support
Tomi Valkeinen [Thu, 18 Feb 2016 15:22:54 +0000 (17:22 +0200)]
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>
8 years agodrm/omap: connector-hdmi: remove pdata support
Tomi Valkeinen [Thu, 18 Feb 2016 15:20:54 +0000 (17:20 +0200)]
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>
8 years agodrm/omap: connector-dvi: remove pdata support
Tomi Valkeinen [Thu, 18 Feb 2016 15:18:41 +0000 (17:18 +0200)]
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>
8 years agodrm/omap: encoder-tfp410: remove pdata support
Tomi Valkeinen [Thu, 18 Feb 2016 15:14:54 +0000 (17:14 +0200)]
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>
8 years agodrm/omap: panel-dsi-cm: remove pdata support
Tomi Valkeinen [Thu, 18 Feb 2016 15:12:46 +0000 (17:12 +0200)]
drm/omap: panel-dsi-cm: 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>
8 years agodrm/omap: omapdss.h: remove omap_hdmi_init
Tomi Valkeinen [Thu, 18 Feb 2016 14:27:53 +0000 (16:27 +0200)]
drm/omap: omapdss.h: remove omap_hdmi_init

omap_hdmi_init() function does not exist anymore, so we can remove the
declaration.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: omapdss.h: remove unused struct omap_dss_hdmi_data
Tomi Valkeinen [Fri, 19 Feb 2016 14:59:38 +0000 (16:59 +0200)]
drm/omap: omapdss.h: remove unused struct omap_dss_hdmi_data

'struct omap_dss_hdmi_data' is not used anywhere, so we can remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: move dss_suspend/resume_all to core.c
Tomi Valkeinen [Fri, 19 Feb 2016 16:05:14 +0000 (18:05 +0200)]
drm/omap: move dss_suspend/resume_all to core.c

core.c is the only caller of dss_disable_all_devices(). We can thus move
the function from display.c to core.c and make it static.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: fix suspend/resume handling
Tomi Valkeinen [Fri, 2 Oct 2015 08:10:42 +0000 (11:10 +0300)]
drm/omap: fix suspend/resume handling

For legacy reasons omapdss handles system suspend/resume via PM notifier
callback, where the driver disables/resumes all the outputs.

This doesn't work well with omapdrm. What happens on suspend is that the
omapdss disables the displays while omapdrm is still happily continuing
its work, possibly waiting for an vsync irq, which will never come if
the display output is disabled, leading to timeouts and errors sent to
userspace.

This patch moves the suspend/resume handling to omapdrm, and the
suspend/resume is now done safely inside modeset lock.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: check if rotation is supported before commit
Tomi Valkeinen [Thu, 27 Aug 2015 10:09:22 +0000 (13:09 +0300)]
drm/omap: check if rotation is supported before commit

omapdrm is missing a check on the validity of the rotation property.
This leads to omapdrm possibly trying to use rotation on non-rotateable
framebuffer, which causes the overlay setup to fail.

This patch adds the necessary check to omap_plane_atomic_check().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: fix crtc->plane property delegation
Tomi Valkeinen [Thu, 18 Feb 2016 16:47:14 +0000 (18:47 +0200)]
drm/omap: fix crtc->plane property delegation

Before universal planes we had to have plane specific properties for the
crtc too, as on the hardware level a crtc uses a plane. In other words,
e.g. 'zorder' property was added to both planes and crtcs, and
omap_crtc.c would delegate the property set/get to the primary plane.

However, the delegation was a bit too generic, delegating all property
set/get calls to planes. Thus it's possible to set, say, FB_ID, on a
crtc, which gets redirected to  the primary plane.

This is not standard, and shouldn't be allowed. To keep backward
compatibility, we still need to redirect the properties we supported
earlier for crtcs, namely 'zorder' and 'rotation'.

This patch redirects only the allowed properties from crtcs to planes.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: EBUSY status handling in omap_gem_fault()
Rob Clark [Sun, 20 Oct 2013 16:07:42 +0000 (12:07 -0400)]
drm/omap: EBUSY status handling in omap_gem_fault()

Subsequent threads returning EBUSY from vm_insert_pfn() was not
handled correctly. As a result concurrent access from new threads
to mmapped data caused SIGBUS.

See e79e0fe380847493266fba557217e2773c61bd1b ("drm/i915: EBUSY status
handling added to i915_gem_fault()").

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: verify that fb plane pitches are the same
Tomi Valkeinen [Fri, 8 Jan 2016 13:51:02 +0000 (15:51 +0200)]
drm/omap: verify that fb plane pitches are the same

The DSS hardware uses the same ROW_INC value for both Y and UV planes
for NV12 format. This means that the pitches of the Y and UV planes have
to match. omapdrm doesn't check this at the moment, and this can lead
into a broken NV12 fb on the screen.

This patch adds the check.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: verify that display x-res is divisible by 8
Tomi Valkeinen [Tue, 5 Jan 2016 09:43:18 +0000 (11:43 +0200)]
drm/omap: verify that display x-res is divisible by 8

DISPC requires the x resolution to be divisible by 8 when stall mode is
not used.

Add a check to the DPI driver to verify this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: HDMI5: allow interlace
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:40 +0000 (18:41 +0200)]
drm/omap: HDMI5: allow interlace

Now that interlace support has been added, we can remove the check that
prevents interlace.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: HDMI5: Add interlace support
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:39 +0000 (18:41 +0200)]
drm/omap: HDMI5: Add interlace support

Add the missing bits for interlace:

* Set VBLANK_OSC if the videomode's vblank is fractional
* Halve the vertical timings for interlace
* Double the horizontal timings for double-pixel mode
* Set FC_PRCONF properly for double-pixel mode

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: HDMI5: clean up timings copy
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:38 +0000 (18:41 +0200)]
drm/omap: HDMI5: clean up timings copy

The HDMI driver copies the timing values one by one. Instead we can just
copy the whole struct.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: HDMI5: Fix FC HSW value
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:37 +0000 (18:41 +0200)]
drm/omap: HDMI5: Fix FC HSW value

For some reason the HDMI FC's HSW value is programmed to hsw-1. There's
no indication in the documentation that this would be correct, and no
other blanking value needs -1 either.

So remove the -1.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: DISPC: Fix field order for HDMI
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:36 +0000 (18:41 +0200)]
drm/omap: DISPC: Fix field order for HDMI

Interlace field order is different between VENC and HDMI. The driver
currently sets the field order for VENC.

This patch adds the code to set the field order for HDMI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: HDMI: fix WP timings for ilace
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:35 +0000 (18:41 +0200)]
drm/omap: HDMI: fix WP timings for ilace

The HDMI WP timings are not programmed correctly for interlace.

We need to halve the vertical timings when interlace is used, and double
the horizontal timings when pixel doubling is used.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: HDMI: Fix HSW value
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:34 +0000 (18:41 +0200)]
drm/omap: HDMI: Fix HSW value

On OMAP4 and OMAP5 ES1.0 the HDMI_WP_VIDEO_TIMING_H:HSW field is
set directly to the HSW value. On later SoCs the field needs to be
programmed with the value of HSW-1.

Currently the driver always programs the field with the HSW value. Most
videomodes seem to work fine with that, but at least low resolution
interlaced modes don't work at all.

This patch fixes the HSW for OMAP5 ES2.0+ SoCs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: HDMI: support double-pixel pixel clock
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:33 +0000 (18:41 +0200)]
drm/omap: HDMI: support double-pixel pixel clock

We need double-pixel mode (pixel repetition) for interlace modes. This
patch adds the necessary support to HDMI to double the pixel clock when
double-pixel mode is used.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: support double-pixel
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:32 +0000 (18:41 +0200)]
drm/omap: support double-pixel

We need double-pixel mode (pixel repetition) for interlace modes. This
patch adds the necessary support to omapdrm to output double-pixel mode.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: DISPC: support double-pixel mode
Tomi Valkeinen [Wed, 13 Jan 2016 16:41:31 +0000 (18:41 +0200)]
drm/omap: DISPC: support double-pixel mode

We need double-pixel mode (pixel repetition) for interlace modes. This
patch adds the necessary support to DISPC to output double-pixel mode.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: increase vblank wait timeout
Tomi Valkeinen [Thu, 19 Nov 2015 15:31:25 +0000 (17:31 +0200)]
drm/omap: increase vblank wait timeout

omap_crtc_wait_pending() waits until the config changes have been taken
into use, usually at next vblank. The wait-timeout used is 50ms, which
usually is enough, but in some rare cases not.

As time wait-timeout is just a safety measure for cases where something
is broken, we can just as well increase the timeout considerably.

This patch makes the timeout 250ms.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: remove support for ext mem & sync
Tomi Valkeinen [Wed, 27 Jan 2016 08:58:43 +0000 (10:58 +0200)]
drm/omap: remove support for ext mem & sync

We no longer have the omapdrm plugin system for SGX, and we can thus
remove the support for external memory and sync objects from omap_gem.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: gem: Implement dma_buf import
Laurent Pinchart [Mon, 14 Dec 2015 20:39:44 +0000 (22:39 +0200)]
drm/omap: gem: Implement dma_buf import

OMAP GEM objects backed by dma_buf reuse the current OMAP GEM object
support as much as possible. If the imported buffer is physically
contiguous its physical address will be used directly, reusing the
OMAP_BO_MEM_DMA_API code paths. Otherwise it will be mapped through the
TILER using a pages list created from the scatterlist instead of the
shmem backing storage.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: gem: Refactor GEM object allocation
Laurent Pinchart [Mon, 14 Dec 2015 20:39:43 +0000 (22:39 +0200)]
drm/omap: gem: Refactor GEM object allocation

Split the individual steps of GEM object allocation and initialization
clearly. This improves readability and prepares for dma_buf import
support.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: gem: Clean up GEM objects memory flags
Laurent Pinchart [Mon, 14 Dec 2015 20:39:37 +0000 (22:39 +0200)]
drm/omap: gem: Clean up GEM objects memory flags

The driver assumes that only objects backed by shmem need to be mapped
through DMM. While this is true with the current code, the assumption
won't hold with dma_buf import support.

Condition the mapping based on whether the buffer has been allocated
using the DMA mapping API instead and clean up the flags to avoid having
to check both flags and GEM object filp field to decide how to process
buffers. Flags are not the authoritative source of information regarding
where the buffer memory comes from, and are renamed to make that
clearer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: print an error if display enable fails
Tomi Valkeinen [Tue, 5 Jan 2016 09:43:16 +0000 (11:43 +0200)]
drm/omap: print an error if display enable fails

If the panel's enable fails, omap_encoder silently ignores the failure.
omapdrm should really handle the failure, but unfortunately the whole
encoder enable codepath is expected to always succeed.

So for now, catch the enable failure and print an error.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: use dma_mapping_error in omap_gem_dma_sync
Tomi Valkeinen [Tue, 5 Jan 2016 09:43:15 +0000 (11:43 +0200)]
drm/omap: use dma_mapping_error in omap_gem_dma_sync

omap_gem_dma_sync() calls dma_map_page() but does not check the possible
error with dma_mapping_error(). If DMA-API debugging is enabled, the
debug layer will give a warning if dma_mapping_error() has not been
used.

This patch adds proper error handling to omap_gem_dma_sync().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: use dma_mapping_error in omap_gem_attach_pages
Tomi Valkeinen [Tue, 5 Jan 2016 09:43:14 +0000 (11:43 +0200)]
drm/omap: use dma_mapping_error in omap_gem_attach_pages

omap_gem_attach_pages() calls dma_map_page() but does not check the
possible error with dma_mapping_error(). If DMA-API debugging is
enabled, the debug layer will give a warning if dma_mapping_error() has
not been used.

This patch adds proper error handling to omap_gem_attach_pages().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: add define for DISPC_IRQ_WBUNCOMPLETEERROR
Tomi Valkeinen [Wed, 4 Nov 2015 15:10:40 +0000 (17:10 +0200)]
drm/omap: add define for DISPC_IRQ_WBUNCOMPLETEERROR

OMAP4+ DSS has WBUNCOMPLETEERROR irq, which was not defined in the irq
list. Add the define.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: tpd12s015: CT_CP_HPD as optional gpio
Manisha Agrawal [Tue, 3 Nov 2015 21:22:50 +0000 (15:22 -0600)]
drm/omap: tpd12s015: CT_CP_HPD as optional gpio

tpd12s015 HW has LS_OE, CT_CP_HPD and HPD gpios. Out of these gpios,
driver only handled LS_OE as optional. The CT_CP_HPD gpio should also
be treated as optional gpio as it is just a power saving feature. Some
boards hardwire this gpio to be always enable. In this patch, all access
to CT_CP_HPD gpio is made optional.

Signed-off-by: Manisha Agrawal <manisha.agrawal@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: tpd12s015: gpio descriptor API
Manisha Agrawal [Tue, 3 Nov 2015 21:22:49 +0000 (15:22 -0600)]
drm/omap: tpd12s015: gpio descriptor API

Migrated the gpio APIs to descriptor-interface based.

Signed-off-by: Manisha Agrawal <manisha.agrawal@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: tpd12s015: remove platform data support
Manisha Agrawal [Tue, 3 Nov 2015 21:22:48 +0000 (15:22 -0600)]
drm/omap: tpd12s015: remove platform data support

All devices using tpd12s015 driver are doing DT boot. No need of further
supporting the platform data. This patch removes support for platform
data.

Signed-off-by: Manisha Agrawal <manisha.agrawal@ti.com>
[tomi.valkeinen@ti.com: minor adjustments]
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: drm_atomic_get_plane_state() may return ERR_PTR
Jyri Sarha [Wed, 28 Oct 2015 12:00:42 +0000 (14:00 +0200)]
drm/omap: drm_atomic_get_plane_state() may return ERR_PTR

drm_atomic_get_plane_state() may return ERR_PTR. Handle
drm_atomic_get_plane_state() return values right in
omap_crtc_atomic_set_property().

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: add dmm_read() and dmm_write() wrappers
Tomi Valkeinen [Fri, 7 Aug 2015 11:31:28 +0000 (14:31 +0300)]
drm/omap: add dmm_read() and dmm_write() wrappers

This patch adds wrapper functions for readl() and writel(), dmm_read()
and dmm_write(), so that we can implement workaround for DRA7 errata
i878.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoHACK: drm/omap: always use blocking DMM fill
Tomi Valkeinen [Tue, 28 Apr 2015 11:01:34 +0000 (14:01 +0300)]
HACK: drm/omap: always use blocking DMM fill

The current driver uses non-blocking DMM fill when releasing memory.
This gives us a small performance increase as we don't have to wait for
the fill operation to finish.

However, the driver does not have any error handling for non-blocking
fill. In case of an error, the fill operation may silently fail, leading
to leaking DMM engines, which may eventually lead to deadlock if we run
out of DMM engines.

This patch makes the DMM driver always use blocking fills, so that we
can catch the errors. A more complex option would be to allow
non-blocking fills, and implement proper error handling, but that is
left for the future.

This patch is a HACK, as the proper fix is to either decide to always
use sync fills and remove all the async related code, or fix the async
code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: HDMI: change enable/disable to avoid sync-losts
Tomi Valkeinen [Tue, 24 Mar 2015 13:46:35 +0000 (15:46 +0200)]
drm/omap: HDMI: change enable/disable to avoid sync-losts

We occasionally see DISPC sync-lost errors when enabling and disabling
HDMI. Sometimes we get only a few, which get handled (ignored) by the
driver, but sometimes there's a flood of the errors which doesn't seem
to stop.

The HW team has root caused this to the order in which HDMI and DISPC
are enabled/disabled. Currently we enable HDMI first, and then DISPC,
and vice versa when disabling. HW team's suggestion is to do it the
other way around.

This patch changes the order, but this has two side effects as the pixel
clock is produced by HDMI, and the clock is not running when we
enable/disable DISPC:

* When enabling DISPC first, we don't get vertical sync events
* When disabling DISPC last, we don't get FRAMEDONE event

At the moment we use both of those to verify that DISPC has been
enabled/disabled properly. Thus this patch also needs to change the
omapdrm and omapdss which handle the DISPC side.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/msm/dsi: Drop VDD regulator for MSM8916
Archit Taneja [Thu, 25 Feb 2016 05:49:47 +0000 (11:19 +0530)]
drm/msm/dsi: Drop VDD regulator for MSM8916

VDD regulator input was specified for MSM8916. It turns our that this
regulator is used for the display panels used on MSM8916 platforms, but
not the DSI controller itself. Drop this regulator from the list.

Reported-by: Vinay Simha <vinaysimha@inforcecomputing.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/dsi: Remove incorrect warning on host attach
Archit Taneja [Thu, 25 Feb 2016 05:49:46 +0000 (11:19 +0530)]
drm/msm/dsi: Remove incorrect warning on host attach

With the implementation of of_graph parsing, it isn't any longer
necessary for msm_host->device node to be same as dsi->dev.of_node. This
only holds true when the connected device is also a child of the dsi_host.

In the case of external bridge chips belonging to a different control
bus, these are guaranteed to be different.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: Free fb helper resources in msm_unload
Archit Taneja [Thu, 25 Feb 2016 05:49:45 +0000 (11:19 +0530)]
drm/msm: Free fb helper resources in msm_unload

We have a msm_fbev_free function to uninit fb_helper stuff, but we aren't
using it. Call it in msm_unload.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/mdp: Detach iommu in mdp4_destroy
Sricharan R [Thu, 25 Feb 2016 05:49:44 +0000 (11:19 +0530)]
drm/msm/mdp: Detach iommu in mdp4_destroy

attach_dev gets called in mdp4_kms_init, but there is no corresponding
detach_dev called in the error path or in the kms driver unload path.

Detach and destroy mmu in mdp4_destroy.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: make iommu port names const'ier
Rob Clark [Thu, 25 Feb 2016 05:49:43 +0000 (11:19 +0530)]
drm/msm: make iommu port names const'ier

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/mdp: Use atomic helper to set crtc property
Archit Taneja [Thu, 25 Feb 2016 05:49:42 +0000 (11:19 +0530)]
drm/msm/mdp: Use atomic helper to set crtc property

Assign drm_atomic_helper_crtc_set_property helper to MDP4 and MDP5
crtcs' set_property ops. This replaces the custom funcs that
returned an error even for standard crtc properties.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rob Clark <robdclark@gmail.com>