drm: remove unused fxn prototypes

Signed-off-by: Rob Clark <rob@ti.com>
drm: refcnt drm_framebuffer

This simplifies drm fb lifetime, and if the crtc/plane needs to hold
a ref to the fb when disabling a pipe until the next vblank, this
avoids the need to make disabling an overlay synchronous.  This is a
problem that shows up when userspace is using a drm plane to
implement a hw cursor.. making overlay disable synchronous causes
a performance problem when x11 is rapidly enabling/disabling the
hw cursor.  But not making it synchronous opens up a race condition
for crashing if userspace turns around and immediately deletes the
fb.  Refcnt'ing the fb makes it possible to solve this problem.

v1: original
v2: add drm_framebuffer_remove() which is called in all paths where
    fb->funcs->destroy() was directly called before.  This cleans
    up the CRTCs/planes that the fb was attached to.  You should
    only directly use drm_framebuffer_unreference() if you are also
    using drm_framebuffer_reference() to keep a ref to the fb.

Signed-off-by: Rob Clark <rob@ti.com>
staging: omapdrm: Fix DMM sparse warnings

Fix the following sparse warnings:

drivers/staging/omapdrm/omap_dmm_tiler.c:123:13:
   warning: symbol 'omap_dmm_irq_handler' was not declared.
   Should it be static?

drivers/staging/omapdrm/omap_dmm_tiler.c:370:24:
   warning: Using plain integer as NULL pointer

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob.clark@linaro.org>
Reviewed-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: omapdrm: Remove unnecessary memcpy

Removed the unnecessary copy of the memory page addresses when
programming the DMM/PAT and all support code for the lut copy.
The original intent was to have this code in place for
suspend/resume functionality w.r.t. DEVICE_OFF.

Performance analysis showed that the extra copy from uncached memory
led to a fairly hefty penalty when programming large 1D or 2D
buffers.  This can be implemented in a more efficient manner when we
actually have to support DEVICE_OFF suspend/resume operations.

Signed-off-by: Andy Gross <andy.gross@ti.com>
omapdrm: use alloc_ordered_workqueue() instead of UNBOUND w/ max_active = 1

This is an equivalent conversion and will ease scheduled removal of
WQ_NON_REENTRANT.

Only compile tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
drm/omap: hold a ref to the bo while waiting for flip

Since the plane hasn't yet taken a reference, we need to hold a
reference while waiting to ensure the backing GEM bo doesn't get
freed from under us.

Signed-off-by: Rob Clark <rob@ti.com>
OMAPDSS: workaround 'operation stopped while reading edid' error

Signed-off-by: Rob Clark <rob@ti.com>
WIP: OMAPDSS: enable either high level or low level API

Legacy drivers would 'select OMAP2_DSS_HL' to get the full "high
level" omapdss interface, while omapdrm would not and instead
directly use the low level omapdss interface.
omap2+: use dss_dispc hwmod for omapdrm

We need this so that platform_get_irq() works when drm core sets up the
irq handling.

Signed-off-by: Rob Clark <rob@ti.com>
WIP: drm/omap: use omapdss low lever API (v4)

This is still work in progress, but it nicely solves the omapdss vs drm
impedence mismatches, and properly fixes unpin confusion vs GO bit status.
As an added bonus, we also no longer leave the last overlay buffer pinned.
Adding the previously missing vblank event handling for userspace should
be pretty trivial now too.

v1: initial version
v2: Reshuffle mapping of kms to dss.. now it is plane->ovl, crtc->manager.
    The encoder is still a placeholder and connector is dssdev, but
    eventually encoder should map to dss encoder (DSI/DPI/VENC/HDMI)
    and connector to panel.
v3: few cleanups, add debugfs, etc
v4: rebase and fix some irq issues