summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du/rcar_du_kms.c
Commit message (Collapse)AuthorAgeFilesLines
...
* drm: rcar-du: Pass the encoder DT node to rcar_du_encoder_init()Laurent Pinchart2014-11-261-1/+1
| | | | | | | | The encoder DT node will be needed to register an external HDMI encoder. Pass it to the rcar_du_encoder_init() function to prepare for HDMI support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Remove platform data supportLaurent Pinchart2014-11-261-45/+7
| | | | | | | All platforms now instantiate the DU through DT, platform data support isn't needed anymore. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar: gem: dumb: pitch is an outputThierry Reding2014-11-131-1/+1
| | | | | | | | | | | | | | | | | When creating a dumb buffer object using the DRM_IOCTL_MODE_CREATE_DUMB IOCTL, only the width, height, bpp and flags fields are inputs. The caller is not guaranteed to zero out or set handle, pitch and size. Drivers must not treat these values as possible inputs, otherwise they may use uninitialized memory during the computation of the framebuffer size. The R-Car DU driver treats the pitch passed in from userspace as minimum and will only overwrite it when the driver-computed pitch is larger, allowing userspace to, intentionally or not, overallocate framebuffers. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/cma: Introduce drm_gem_cma_dumb_create_internal()Thierry Reding2014-11-131-1/+1
| | | | | | | | | | | | | | | | | | This function is similar to drm_gem_cma_dumb_create() but targetted at kernel internal users so that they can override the pitch and size requirements of the dumb buffer. It is important to make this difference because the IOCTL says that the pitch and size fields are to be considered outputs and therefore should not be used in computations of the framebuffer size. Internal users may still want to use this code to avoid duplication and at the same time pass on additional, driver-specific restrictions on the pitch and size. While at it, convert the R-Car DU driver, the single user that overrides the pitch, to use the new internal helper. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/rcar-du: Add OF supportLaurent Pinchart2014-09-151-21/+210
| | | | | | | Implement support for the R-Car DU DT bindings in the rcar-du DRM driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Update copyright noticeLaurent Pinchart2014-09-151-1/+1
| | | | | | | | The "Renesas Corporation" listed in the copyright notice doesn't exist. Replace it with "Renesas Electronics Corporation" and update the copyright years. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Fix maximum frame buffer pitch computationLaurent Pinchart2014-07-301-2/+11
| | | | | | | | | | The maximum pitch constraint for the hardware is expressed in pixels. Convert it to bytes to validate frame buffer creation, as frame buffer pitches are expressed in bytes. Reported-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/rcar-du: Handle encoder initialization failuresLaurent Pinchart2014-04-041-1/+4
| | | | | | | | The rcar_du_encoder_init() function can fail and return an error code. Don't ignore it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/rcar-du: Split features and quirksLaurent Pinchart2013-12-021-2/+2
| | | | | | | | 128-byte pitch alignement is not a hardware feature, it's a hardware bug. Split it from the features field into a new quirks field. New quirks will be added to support the R8A7791 SoC. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Add FBDEV emulation supportLaurent Pinchart2013-08-091-8/+28
| | | | | | | | Use the FB CMA helpers to implement FBDEV emulation support. The VGA connector status must be reported as connector_status_connected instead of connector_status_unknown to be usable by the emulation layer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Add internal LVDS encoder supportLaurent Pinchart2013-08-091-0/+5
| | | | | | | The R8A7790 includes two internal LVDS encoders. Support them in the DU driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Rework output routing supportLaurent Pinchart2013-08-091-6/+11
| | | | | | | | | | | | | | | | Split the output routing specification between SoC-internal data, specified in the rcar_du_device_info structure, and board data, passed through platform data. The DU has 5 possible outputs (DPAD0/1, LVDS0/1, TCON). SoC-internal output routing data specify which output are valid, which CRTCs can be connected to the valid outputs, and the type of in-SoC encoder for the output. Platform data then specifies external encoders and the output they are connected to. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Add support for multiple groupsLaurent Pinchart2013-08-091-12/+31
| | | | | | The R8A7790 DU has 3 CRTCs, split in two groups. Support them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Fix buffer pitch alignment for R8A7790 DULaurent Pinchart2013-08-091-3/+14
| | | | | | | | The R8A7790 DU seems to require a 128 bytes pitch alignment, even though the documentation only mentions a 16 pixels alignement as for the R8A7779 DU. Make this configurable through a device flag. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Use dynamic number of CRTCs instead of CRTCs array sizeLaurent Pinchart2013-08-091-1/+1
| | | | | | | | The rcar_du_device structure contains a field that stores the number of CRTCs, use it instead of the CRTCs array size. This prepares the driver to support a variable number of CRTCs. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Introduce CRTCs groupsLaurent Pinchart2013-08-091-4/+7
| | | | | | | | | | | | | | | | | | | The R8A7779 DU is split in per-CRTC resources (scan-out engine, blending unit, timings generator, ...) and device-global resources (start/stop control, planes, ...) shared between the two CRTCs. The R8A7790 introduced a third CRTC with its own set of global resources This would be modeled as two separate DU device instances if it wasn't for a handful or resources that are shared between the three CRTCs (mostly related to input and output routing). For this reason the R8A7790 DU must be modeled as a single device with three CRTCs, two sets of "semi-global" resources, and a few device-global resources. Introduce a new rcar_du_group driver-specific object, without any real counterpart in the DU documentation, that models those semi-global resources. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Rename rcar_du_plane_(init|register) to rcar_du_planes_*Laurent Pinchart2013-08-091-2/+2
| | | | | | | The functions initialize or register all planes, rename them accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Rename platform data fields to match what they describeLaurent Pinchart2013-08-091-3/+2
| | | | | | | | The struct rcar_du_encoder_data encoder::field describes the encoder type, and the rcar_du_encoder_lvds_data and rcar_du_encoder_vga_data structures describe connector properties. Rename them accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Merge LVDS and VGA encoder codeLaurent Pinchart2013-08-091-43/+6
| | | | | | | | Create a single rcar_du_encoder structure that implements a KMS encoder. The current implementation is straightforward and only configures CRTC output routing. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Fix buffer pitch alignmentLaurent Pinchart2013-07-051-1/+18
| | | | | | | | | The DU requires a 16 pixels pitch alignement. Make sure dumb buffers are allocated with the correct pitch, and validate the pitch when creating frame buffers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/rcar-du: Don't ignore rcar_du_crtc_create() return valueLaurent Pinchart2013-07-051-2/+5
| | | | | | | Handle error cases correctly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Renesas R-Car Display Unit DRM driverLaurent Pinchart2013-06-271-0/+245
The R-Car Display Unit (DU) DRM driver supports both superposition processors and all eight planes in RGB and YUV formats with alpha blending. Only VGA and LVDS encoders and connectors are currently supported. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud