summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/mdp
Commit message (Collapse)AuthorAgeFilesLines
* drm/msm/mdp5: add support for MDP5 v1.3Stephane Viau2014-08-043-180/+421
| | | | | | | | | | | | | | | | | | | MDP5 has several functional blocks (ie: VIG/RGB pipes, LMs, ...). From one revision to another, these blocks' base addresses might change due to the number of instances present in the MDP5 hw. A way of dealing with these offset changes is to introduce dynamic offsets 'per block'. This change adds support for the new revision of MDP5: v1.3. The idea is to define one hw config per MDP version and select either one of them at runtime, after reading the MDP5 version. Once the MDP version is known, 'per block' dynamic offsets are initialized through a global pointer, which is then used for read/write register access. Signed-off-by: Stephane Viau <sviau@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: use upstream iommuRob Clark2014-08-042-2/+2
| | | | | | | | | | | | | | | | | Downstream kernel IOMMU had a non-standard way of dealing with multiple devices and multiple ports/contexts. We don't need that on upstream kernel, so rip out the crazy. Note that we have to move the pinning of the ringbuffer to after the IOMMU is attached. No idea how that managed to work properly on the downstream kernel. For now, I am leaving the IOMMU port name stuff in place, to simplify things for folks trying to backport latest drm/msm to device kernels. Once we no longer have to care about pre-DT kernels, we can drop this and instead backport upstream IOMMU driver. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: fix BUG_ON() in error cleanup pathRob Clark2014-08-041-1/+1
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp4: add mdp axi clkRob Clark2014-08-042-0/+12
| | | | | | | Downstream kernel holds this clk via a fake-parent relationship. Upstream clock framework requires that we hold it explicitly. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: update generated headersRob Clark2014-08-043-7/+7
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: DT support for 8960/8064 (v3)Rob Clark2014-08-041-3/+7
| | | | | | | | | | Now that we (almost) have enough dependencies in place (MMCC, RPM, etc), add necessary DT support so that we can use drm/msm on upstream kernel. v2: update for review comments v3: rebase on component helper changes Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: activate iommu supportStephane Viau2014-08-041-0/+6
| | | | | | | | This changes activates the iommu support for MDP5, through the platform config structure. Signed-off-by: Stephane Viau <sviau@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: fix IOMMU cleanup for -EPROBE_DEFERStephane Viau2014-06-222-5/+18
| | | | | | | | | If probe fails after IOMMU is attached, we need to detach in order to clean up properly. Before this change, IOMMU faults would occur if the probe failed (-EPROBE_DEFER). Signed-off-by: Stephane Viau <sviau@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp5: fix error return valueRob Clark2014-06-021-6/+16
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: remove redundant private plane cleanupRob Clark2014-06-022-4/+0
| | | | | | | Now that drm core knows about private planes, it cleans them up for us. Trying to do this twice results in badness. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp5: fix crash in error/unload pathsRob Clark2014-05-301-1/+4
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp4: cure for the cursor blues (v2)Rob Clark2014-04-255-10/+32
| | | | | | | | | | | | | | | | | | The hw cursor is relatively adept at triggering underflows, which manifest as a "blue flash" (since blue is configured as the underflow color). Juggle a few things around to tighten up the timing for setting cursor registers in DONE irq. And most importantly, don't ever disable the hw cursor. Instead flip it to a blank/empty cursor. This seems far more reliable, as even simply clearing the cursor-enable bit (with no other updates in previous/ following frames) can in some cases cause underflow. v1: original v2: add missing locking spotted by Micah Cc: Micah Richert <richert@braincorporation.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
* Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into ↵Dave Airlie2014-04-041-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-next * 'msm-next' of git://people.freedesktop.org/~robclark/linux: drm/omap: Don't dereference list head when the connectors list is empty drm/msm/mdp: add timeout for irq wait drm/msm: validate flags, etc drm/msm: use componentised device support drm/msm: add chip-id param drm/msm: crank down gpu when inactive drm/msm: spin helper drm/msm: add hang_debug module param drm/msm: hdmi audio support
| * drm/msm/mdp: add timeout for irq waitRob Clark2014-03-311-1/+2
| | | | | | | | | | | | | | Make things recover a bit more gracefully if we get stuck with no vblank irq ever coming. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm: Replace crtc fb with primary plane fb (v3)Matt Roper2014-04-012-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that CRTC's have a primary plane, there's no need to track the framebuffer in the CRTC. Replace all references to the CRTC fb with the primary plane's fb. This patch was generated by the Coccinelle semantic patching tool using the following rules: @@ struct drm_crtc C; @@ - (C).fb + C.primary->fb @@ struct drm_crtc *C; @@ - (C)->fb + C->primary->fb v3: Generate patch via coccinelle. Actual removal of crtc->fb has been moved to a subsequent patch. v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* | drm/msm: Switch to universal plane API'sMatt Roper2014-04-014-8/+18
|/ | | | | | | | | | | Use drm_universal_plane_init() and drm_crtc_init_with_planes() rather than the legacy drm_plane_init() / drm_crtc_init(). This will ensure that the proper primary plane is registered with the DRM (and eventually exposed to userspace in future patches). Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp4: cursor fixesRob Clark2014-02-051-6/+16
| | | | | | | | It seems we need to update all cursor registers from vblank. This appears to be the cause of intermittent underflows when enabling/ disabling cursor. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp4: pageflip fixesRob Clark2014-02-051-57/+100
| | | | | | | | | | | | | | | | | Backport a few fixes found in the course of getting mdp5 working. There is a window of time after pageflip is requested, before we start scanning out the new fb (ie. while we are waiting for gpu). During that time we need to continue holding a reference to the still-current scanout fb, to avoid the backing gem bo's from being destroyed. Possibly a common mdp_crtc parent class could be useful to share some of this logic between mdp4_crtc and mdp5_crtc. OTOH, this all can be removed from the driver once atomic is in place, as plane/crtc updates get deferred until all fb's are ready before calling in to .page_flip(), etc. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp5: fix ref leaks in error pathsRob Clark2014-02-051-1/+6
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: fix inconsequential typoRob Clark2014-02-051-2/+2
| | | | | | | Small typo I noticed in the mdp4_plane code.. no consequence because PIPE_SRC_XY and PIPE_DST_XY have same register layout. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: add mdp5/apq8x74Rob Clark2014-01-098-0/+2104
| | | | | | | | | | | | | | | | | | | | | | | Add support for the new MDP5 display controller block. The mapping between parts of the display controller and KMS is: plane -> PIPE{RGBn,VIGn} \ crtc -> LM (layer mixer) |-> MDP "device" encoder -> INTF / connector -> HDMI/DSI/eDP/etc --> other device(s) Unlike MDP4, it appears we can get by with a single encoder, rather than needing a different implementation for DTV, DSI, etc. (Ie. the register interface is same, just different bases.) Also unlike MDP4, all the IRQs for other blocks (HDMI, DSI, etc) are routed through MDP. And finally, MDP5 has this "Shared Memory Pool" (called "SMP"), from which blocks need to be allocated to the active pipes based on fetch stride. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: add hdmi support for apq8x74/mdp5Rob Clark2014-01-091-4/+6
| | | | | | | | | | | | | | | | The HDMI block is basically the same between older SoC's with mdp4 display controller, and newer ones with mdp5. So mostly this consists of better abstracting out the different sets of regulators, clks, etc. In particular, for regulators and clks we can split it up by what is needed for hot plug detect to work, and what is needed to light up the display. Also, 8x74 has a new phy.. a very simple one, but split out into a different mmio space. And with mdp5, the irq is shared with mdp, so we don't directly register our own irq handler. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: move irq utils to mdp_kmsRob Clark2014-01-098-169/+242
| | | | | | | We'll want basically the same thing for mdp5, so refactor it out so it can be shared. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: split out msm_kms.hRob Clark2014-01-091-0/+1
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: mdp4_format -> mdp_formatRob Clark2014-01-096-30/+63
| | | | | | | This can be shared between mdp4 and mdp5. Both use the same set of parameters to describe the format to the hw. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: resync generated headersRob Clark2014-01-095-62/+1149
| | | | | | resync to latest envytools db, add mdp5 registers Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: move mdp4 -> mdp/mdp4Rob Clark2014-01-098-0/+3276
There are some little bits and pieces that mdp4 and mdp5 can share, so move things around so that we can have both in a common parent directory. Signed-off-by: Rob Clark <robdclark@gmail.com>