omap2+: add drm device

Register OMAP DRM/KMS platform device, and reserve a CMA region for
the device to use for buffer allocation.  DMM is split into a
separate device using hwmod.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
staging: omap/drm: dmm should return proper errors

Minor error path clean-up.

Signed-off-by: Rob Clark <rob@ti.com>
drm: add drm_property_change_is_valid

Move code from drm_mode_connector_property_set_ioctl to a new
function, so we can reuse this code when we add crtc properties.

v2: use bool instead of int

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
drm: WARN() when drm_connector_attach_property fails

Also return void instead of int. We have more than 100 callers and
no one checks for the return value.

If this function fails the property won't be exposed by the get/set
ioctls, but we should probably survive. If this starts happening,
the solution will be to increase DRM_CONNECTOR_MAX_PROPERTY and
recompile the Kernel.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
drm: create struct drm_object_properties and use it

For now, only connectors have it. In the future, all objects that need
properties should use it. Since the strucutre is referenced inside
struct drm_mode_object, we will be able to deal with object properties
without knowing the real type of the object.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
drm: add generic ioctls to get/set properties on any object

Useless for connector properties (since they already have their own
ioctls), but useful when we add properties to CRTCs, planes and other
objects.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
drm: make the connector properties code use the object properties code

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
drm: add CRTC properties

The i915 driver needs this for the rotation and overscan compensation
properties. Other drivers might need this too.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
drm: add bitmask property type

A bitmask property is similar to an enum.  The enum value is a bit
position (0-63), and valid property values consist of a mask of
zero or more of (1 << enum_val[n]).

TODO: word commit msg better
drm: add plane properties

The omapdrm driver uses this for setting per-overlay rotation.  It
is likely also useful for setting YUV->RGB colorspace conversion
matrix, etc.
drm: support for rotated scanout

For drivers that can support rotated scanout, the extra parameter
checking in drm-core, while nice, tends to get confused.  To solve
this drivers can set the crtc or plane invert_dimensions field so
that the dimension checking takes into account the rotation that
the driver is performing.
staging: drm/omap: dmabuf/prime support

For now just implementing the exporting APIs, not yet importing.  And
kmap is rejected on tiled buffers (although the usefulness of that seems
questionable, but could be added later if needed).

Signed-off-by: Rob Clark <rob@ti.com>
dss: GLOBAL_BUFFER hack

For 2d scanout at higher resolutions we need to increase the gfx
pipe dma buffer.. since we aren't using writeback pipe, assign
it's buffers to gfx.
WIP: tiler/2d support for DSS

updated to use properties, and re-work the omapdss part a bit