dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

16 Commits

Author SHA1 Message Date
Rob Clark f5f9454c21 staging: drm/omap: use omapdss low level API
This patch changes the omapdrm KMS to bypass the omapdss "compat"
layer and use the core omapdss API directly.  This solves some layering
issues that would cause unpin confusion vs GO bit status, because we
would not know whether a particular pageflip or overlay update has hit
the screen or not.  Now instead we explicitly manage the GO bits in
dispc and handle the vblank/framedone interrupts ourself so that we
always know which buffers are being scanned out at any given time, and
so on.

As an added bonus, we no longer leave the last overlay buffer pinned
when the display is disabled, and have been able to add the previously
missing vblank event handling.

v1: original
v2: rebased on latest staging-next and omapdss patches from Tomi and
    review comments from Archit Taneja

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Archit Taneja <archit@ti.com>
Reviewed-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:24:36 -08:00
YAMANE Toshiaki d21a9d3ba5 staging/omapdrm: Fix spacing coding style in omap_crtc.c
The following warning fixed.
- WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-14 16:31:03 -08:00
YAMANE Toshiaki bd690dece9 staging/omapdrm: remove the unnecessary initialization of a local variable in omap_crtc.c
The following error fixed.
- ERROR: do not initialise statics to 0 or NULL

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-14 16:31:03 -08:00
Andy Gross b9ed9f0ecf staging: drm/omap: Fix include error during make
Fixed include error for drm_mode.h

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 15:50:08 -07:00
Rob Clark 119c08149a staging: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 16:44:22 -07:00
Rob Clark 1e0fdfc208 staging: drm/omap: invert dimensions on crtc when rotated
If rotated 90 or 270, we need to invert the dimensions used by drm
core for calculating if the dimensions of an attached fb are correct.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:18:10 -07:00
Rob Clark 3c810c613a staging: drm/omap: add rotation properties
Use tiled buffers for rotated/reflected scanout, with CRTC and plane
properties as the interface for userspace to configure rotation.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-15 15:22:42 -07:00
Laurent Pinchart e811f5ae19 drm: Make the .mode_fixup() operations mode argument a const pointer
The passed mode must not be modified by the operation, make it const.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-19 21:52:38 -04:00
Laurent Pinchart ebe0f2442c drm: Make the CRTC gamma_set operation optional
Drivers for hardware without gamma support should not be forced to
implement a no-op gamma set operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Rob Clark <rob.clark@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-22 10:35:15 +01:00
Rob Clark 7411f9cfe6 staging: drm/omap: use current time for page-flip event
Because we don't have vblank hooked up via drm_irq (which is a bit
awkward due to separation between omapdss (which knows the irq #)
and omapdrm, for now use gettimeofday to have a semi-sane timestamp
in the page-flip event.  Otherwise apps like weston drm compositor,
which use the timestamp in it's animations, get highly confused.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 15:44:44 -07:00
Rob Clark 72d0c3363e staging: drm/omap: send page-flip event after endwin
The endwin irq indicates that DSS has finished scanning out a buffer.
Use this to trigger page-flip event to userspace, so this happens
only *after* the previous buffer is finished.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 15:44:44 -07:00
Rob Clark 2f53700df1 staging: drm/omap: updates for DSS fifomerge API changes
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-08 14:14:11 -08:00
Rob Clark 9a0774e099 staging: drm/omap: multiplanar and YUV support
Add support in framebuffer objects for other color formats and multi-
planar YUV (NV12).  Since this requires changing the API between the
plane and fb for getting scanout information (paddr, etc), take
advantage of the opportunity and put in place a way to allow fb's to
be unpinned when they are not being scanned out.  Now, before start
of scanout the plane calls omap_framebuffer_pin() which takes care
to pin all the backing bo's, then omap_framebuffer_update_scanout()
however many times to update the scanout address(es), etc, and then
when finished omap_framebuffer_unpin().

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-08 14:14:11 -08:00
Rob Clark bb5c2d9aaa staging: drm/omap: add drm_plane support
Because framebuffer layer and overlay scanout video pipes are basically
thing in OMAP display subsystem (the only difference being that the first
video pipe does not support scaling or YUV formats), much of the CRTC
code is pulled into the plane implementation, and a private plane object
is used by the CRTC object.  This avoids code duplication between the
plane and CRTC.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-08 14:14:11 -08:00
Rob Clark 65b0bd067d staging: drm/omap: crtc/encoder/fb destroy cleanups
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-12 16:37:52 -08:00
Rob Clark cd5351f4d2 staging: add omapdrm DRM/KMS driver for TI OMAP platforms
A DRM display driver for TI OMAP platform.  Similar to omapfb (fbdev)
and omap_vout (v4l2 display) drivers in the past, this driver uses the
DSS2 driver to access the display hardware, including support for
HDMI, DVI, and various types of LCD panels.  And it implements GEM
support for buffer allocation (for KMS as well as offscreen buffers
used by the xf86-video-omap userspace xorg driver).

The driver maps CRTCs to overlays, encoders to overlay-managers, and
connectors to dssdev's.  Note that this arrangement might change slightly
when support for drm_plane overlays is added.

For GEM support, non-scanout buffers are using the shmem backed pages
provided by GEM core (In drm_gem_object_init()).  In the case of scanout
buffers, which need to be physically contiguous, those are allocated
with CMA and use drm_gem_private_object_init().

See userspace xorg driver:
git://github.com/robclark/xf86-video-omap.git

Refer to this link for CMA (Continuous Memory Allocator):
http://lkml.org/lkml/2011/8/19/302

Links to previous versions of the patch:
v1: http://lwn.net/Articles/458137/
v2: http://patches.linaro.org/4156/
v3: http://patches.linaro.org/4688/
v4: http://patches.linaro.org/4791/

History:

v5: move headers from include/drm at Greg KH's request, minor rebasing
    on 3.2-rc1, pull in private copies of drm_gem_{get,put}_pages()
    because "drm/gem: add functions to get/put pages" patch is not
    merged yet
v4: bit of rework of encoder/connector _dpms() code, modeset_init()
    rework to not use nested functions, update TODO.txt
v3: minor cleanups, improved error handling for dev_load(), some minor
    API changes that will be needed later for tiled buffer support
v2: replace omap_vram with CMA for scanout buffer allocation, remove
    unneeded functions, use dma_addr_t for physical addresses, error
    handling cleanup, refactor attach/detach pages into common drm
    functions, split non-userspace-facing API into omap_priv.h, remove
    plugin API

v1: original

Signed-off-by: Rob Clark <rob@ti.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:43:30 -08:00