aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm
Commit message (Collapse)AuthorAge
...
| * drm/msm/hdmi: remove useless krefRob Clark2014-11-21
| | | | | | | | | | | | | | | | | | | | A left-over from prior to component framework. The original intent was to deal with hdmi getting unloaded before the master component, but that isn't really going to work anyways. These days with the component framework taking care to unload the master component first, we don't have to worry about this. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp5: get the core clock rate from MDP5 configStephane Viau2014-11-21
| | | | | | | | | | | | | | | | | | | | | | The core clock rate depends on the hw configuration. Once we have read the hardware revision, we can set the core clock to its maximum value. Before then, the clock is set at a rate supported by all MDP5 revisions. Signed-off-by: Stephane Viau <sviau@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp5: use irqdomainsRob Clark2014-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For mdp5, the irqs of hdmi/eDP/dsi0/dsi1 blocks get routed through the mdp block. In order to decouple hdmi/eDP/etc, register an irq domain in mdp5. When hdmi/dsi/etc are used with mdp4, they can directly setup their irqs in their DT nodes as normal. When used with mdp5, instead set the mdp device as the interrupt-parent, as in: mdp: qcom,mdss_mdp@fd900000 { compatible = "qcom,mdss_mdp"; interrupt-controller; #interrupt-cells = <1>; ... }; hdmi: qcom,hdmi_tx@fd922100 { compatible = "qcom,hdmi-tx-8074"; interrupt-parent = <&mdp>; interrupts = <8 0>; /* MDP5_HW_INTR_STATUS.INTR_HDMI */ ... }; There is a slight awkwardness, in that we cannot disable child irqs at the mdp level, they can only be cleared in the child block. So you must not use threaded irq handlers in the child. I'm not sure if there is a better way to deal with that. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: a4xx support for msm-drmAravind Ganesan2014-11-16
| | | | | | | | | | | | | | Added a4xx GPU support. Signed-off-by: Aravind Ganesan <aravindg@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: Handle register offset differences between a3xx and a4xxAravind Ganesan2014-11-16
| | | | | | | | | | | | | | | | | | | | | | | | Register offsets have changed between a3xx and a4xx GPUs. To be able access these registers in common code, we create a lookup table, and set of read-write APIs to access the register through the lookup table. Signed-off-by: Aravind Ganesan <aravindg@codeaurora.org> [robclark: remove REG_ADRENO_UNDEFINED, just use zero, and minor tweaks for latest generated headers] Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: small mmap offset cleanupsRob Clark2014-11-16
| | | | | | | | | | | | | | | | | | Use pre-computed iova when unmapping, to reduce the places we assume iova and mmap offset are (at the moment) the same. And get rid of an extra drm_gem_free_mmap_offset() call (since it is already called from drm_gem_object_release()) Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp4: atomicRob Clark2014-11-16
| | | | | | | | | | | | Convert mdp4 display controller backend to atomic helpers. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/hdmi: atomicRob Clark2014-11-16
| | | | | | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: atomic core bitsRob Clark2014-11-16
| | | | | | | | | | | | The core parts for async commit. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: bit of fb error checkingRob Clark2014-11-16
| | | | | | | | | | | | | | | | It's a problem that can't happen yet, since we don't support any multi-planar formats yet. But let's avoid nasty surprises when the time comes. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: fb prepare/cleanupRob Clark2014-11-16
| | | | | | | | | | | | | | | | Atomic wants to split the prepare/pin from where we actually program the scanout address (so that any part that can fail is done synchronously). Add some fb/gem apis to make this easier to use from the kms parts. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: remove unused compile-test stubRob Clark2014-11-16
| | | | | | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: small fence cleanupRob Clark2014-11-16
| | | | | | | | | | | | | | Give ourselves a way to wait for certain fence #.. makes it easier to wait on a set of bo's, which we'll need for atomic. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp5: drop attached planes tableRob Clark2014-11-16
| | | | | | | | | | | | | | Simplify things a bit for atomic, gets rid of some bookkeeping, and makes the code cleaner. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp4: drop attached planes tableRob Clark2014-11-16
| | | | | | | | | | | | | | | | | | Simplify things a bit for atomic, gets rid of some bookkeeping, and makes the code cleaner. TODO move iterator macro somewhere common. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp4: don't care about fb in crtcRob Clark2014-11-16
| | | | | | | | | | | | | | | | | | Since we are configuring things via MDP4_PIPE regs in the plane, it seems like setting the dimensions of the primary plane on the OVLP/DMA regs in crtc is unnecessary. This will make life easier when we want to do a nofb modeset. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp5: drop private primary ptrRob Clark2014-11-16
| | | | | | | | | | | | Since primary-plane support in core, we can just use crtc->primary. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp4: drop private primary ptrRob Clark2014-11-16
| | | | | | | | | | | | Since primary-plane support in core, we can just use crtc->primary. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: Fix fbdev for 16- and 24-bit modes.Daniel Thompson2014-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently forcing the video mode from the kernel command line (for example video=HDMI-A-1:1280x720-16@60) does not correctly set the number of bits per pixel. This is due to a rather aggressive override in msm_fbdev_create(). This is a particular problem for Android bring up because the software EGL fallbacks don't support 32bpp. Since the overrides are actually the default values anyway then this problem can be trivially fixed by removing the overrides completely. Change was tested by dd'ing a test image to /dev/fb0 with no video= (still 32bpp), video=1920x1080-32@60, video=1920x1080-24@60 and video=1920x1080-16@60 . Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: David Airlie <airlied@linux.ie> Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: Allow exported dma-bufs to be mappedDaniel Thompson2014-11-16
| | | | | | | | | | | | | | | | | | | | | | Currently msm does not implement gem_prime_mmap. Without this it is not possible to draw onto a dma-buf from userspace (making its very hard to implement the Android rendering model). Fixing this is just a matter of adding a little boilerplate. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/hdmi: refactor bind/initRob Clark2014-11-16
| | | | | | | | | | | | | | | | | | | | | | | | Split up hdmi_init() into hdmi_init() (done at hdmi sub-device bind/probe time) and hdmi_modeset_init() done from master driver's modeset_init(). Anything that can fail due to dependencies on other drivers which may be missing or not probed yet should go in hdmi_init(), so that devm error/cleanup paths work properly. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: update generated headersRob Clark2014-11-16
| | | | | | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/adreno: slight init order cleanupRob Clark2014-11-16
| | | | | | | | | | | | | | | | | | Move anything that can fail after call to base class msm_gpu_init(). This way, if we fail, active_list has already been initialized so we don't trip 'WARN_ON(!list_empty(&gpu->active_list))' in msm_gpu_cleanup(). Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: select REGULATORRob Clark2014-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a potential error, spotted by Felipe with randconfig: ----- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c: In function ‘mdp4_kms_init’: drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:2: error: implicit declaration \ of function ‘devm_regulator_get_exclusive’ [-Werror=implicit-function-declaration] mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); ^ drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:16: error: assignment makes \ pointer from integer without a cast [-Werror] mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); ^ ----- Also add a brief comment explaining the use of _get_exclusive() Reported-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm: flip-work: change drm_flip_work_init prototypeBoris BREZILLON2014-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we're using lists instead of kfifo to store drm flip-work tasks we do not need the size parameter passed to drm_flip_work_init function anymore. Moreover this function cannot fail anymore, we can thus remove the return code. Modify drm_flip_work_init users to take account of these changes. [airlied: fixed two unused variable warnings] Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | gpu: drm: msm: drop owner assignment from platform_driversWolfram Sang2014-10-20
|/ | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* drm: Pass dma-buf as argument to gem_prime_import_sg_tableMaarten Lankhorst2014-09-30
| | | | | | Allows importing dma_reservation_objects from a dma-buf. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* drm: Extract <drm/drm_gem.h>Daniel Vetter2014-09-23
| | | | | | | | | | | v2: Don't forget git add, noticed by David. Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: backmerge tag 'v3.17-rc5' into drm-nextDave Airlie2014-09-15
|\ | | | | | | | | | | | | This is requested to get the fixes for intel and radeon into the same tree for future development work. i915_display.c: fix missing dev_priv conflict.
| * drm/msm: don't crash if no msm.vram paramRob Clark2014-09-11
| | | | | | | | | | | | | | | | If VRAM carveout is used, due to no IOMMU, we should have a default value for msm.vram so that we don't simply crash. Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/hdmi: fix build break on non-CCF platformsRob Clark2014-09-11
| | | | | | | | | | Reported-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: Change nested function to static functionMark Charlebois2014-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is currently a nested function in Russel King's tree for the msm HDMI driver. The last nested function was removed from the Linux kernel when the Thinkpad driver was fixed. I believe nested functions are not desired upstream, and it also breaks compilation with clang so here is a patch to change the nested function into static function. The patch works with both clang and gcc. Signed-off-by: Mark Charlebois <charlebm@gmail.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: Fix missing unlock on error in msm_fbdev_create()Wei Yongjun2014-08-26
| | | | | | | | | | | | | | | | Add the missing unlock before return from function msm_fbdev_create() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: fix compile error for non-dt buildsRob Clark2014-08-26
| | | | | | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm/mdp4: request vblank during modesetRob Clark2014-08-26
| | | | | | | | | | | | | | | | | | | | | | This avoids a problem seen with weston (for example) where the display gets stuck in "black screen" if starting weston first thing after boot. Possibly mdp5 needs something similar. The downstream android fbdev driver always requests DMA_E (or DMA_P) when display is active, rather than only enabling it on-demand as the drm driver does, which I believe has the same end result. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * drm/msm: avoid flood of kernel logs on faultsRob Clark2014-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 87e956e9 changed the fault handler to return -ENOSYS, which causes the iommu driver to print out a huge splat. Which wouldn't be quite so bad if nothing ever faulted. But seems like some EXA composite operations generate quite a lot of (seemingly harmless) faults. That is probably a userspace problem, but the huge increase in verbosity from iommu fault dumps makes things kind of unusable. We probably should actually log *some* message (not conditional on drm.debug). But ratelimit it. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm/adreno: push dump/show stuff to base classRob Clark2014-09-10
| | | | | | | | | | | | | | | | | | Add ptr to list of interesting registers to 'struct adreno_gpu' and use that to move most of the debugfs show and register dump bits down into adreno_gpu. This will avoid duplication as support for additional adreno generations is added. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm/adreno: bit of init refactoringRob Clark2014-09-10
| | | | | | | | | | | | | | Push a few bits down into adreno_gpu so they won't have to be duplicated as support for additional adreno generations is added. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm/adreno: move decision about what gpu to to loadRob Clark2014-09-10
| | | | | | | | | | | | | | Move this into into adreno_device, and decide based on gpu revision rather than just assuming a3xx. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm/adreno: split adreno device out into it's own fileRob Clark2014-09-10
| | | | | | | | | | | | | | We'd rather not duplicate these parts as support for additional gpu generations is added. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm/mdp4: add LVDS panel supportRob Clark2014-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LVDS panel support uses the LCDC (parallel) encoder. Unlike with HDMI, there is not a separate LVDS block, so no need to split things into a bridge+connector. Nor is there is anything re-used with mdp5. Note that there can be some regulators shared between HDMI and LVDS (in particular, on apq8064, ext_3v3p), so we should not use the _exclusive() variants of devm_regulator_get(). The drm_panel framework is used for panel-specific driver. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm/mdp4: fix blend setup with multiple crtcsRob Clark2014-09-10
| | | | | | | | | | | | | | | | | | In particular, blend_setup() should not overwrite the other crtc's mixer settings. Also, the encoder needs to be able to specify the mixer-id explicitly, since both LVDS and DTV use 'INTF_LVDC_DTV', so we cannot guess the mixer-id from the interface. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm: update generated headersRob Clark2014-09-10
| | | | | | | | | | | | | | In particular, pick up the definitions for a handful of LVDS related registers. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm: add driver->set_busid() callbackDavid Herrmann2014-09-10
|/ | | | | | | | | | | | | | One step closer to dropping all the drm_bus_* code: Add a driver->set_busid() callback and make all drivers use the generic helpers. Nouveau is the only driver that uses two different bus-types with the same drm_driver. This is totally broken if both buses are available on the same machine (unlikely, but lets be safe). Therefore, we create two different drivers for each platform during module_init() and set the set_busid() callback respectively. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/msm/hdmi: fix HDMI_MUX_EN gpio request typoBeeresh Gopal2014-08-04
| | | | | | | | | | HDMI_MUX_EN gpio is requested. If an error occurs, the same name should be printed (HDMI_MUX_EN) instead of HDMI_MUX_SEL (typo). Signed-off-by: Beeresh Gopal <gbeeresh@codeaurora.org> Signed-off-by: Stephane Viau <sviau@codeaurora.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/hdmi: enable lpm-mux if it is presentBeeresh Gopal2014-08-04
| | | | | | | | | | lpm-mux is programmed to enable HDMI connector on the docking station for S805 chipset based devices. Signed-off-by: Beeresh Gopal <gbeeresh@codeaurora.org> Signed-off-by: Stephane Viau <sviau@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/mdp5: add support for MDP5 v1.3Stephane Viau2014-08-04
| | | | | | | | | | | | | | | | | | | 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: fix potential deadlock in gpu initRob Clark2014-08-04
| | | | | | | | | | | | | Somewhere along the way, the firmware loader sprouted another lock dependency, resulting in possible deadlock scenario: &dev->struct_mutex --> &sb->s_type->i_mutex_key#2 --> &mm->mmap_sem which is problematic vs things like gem mmap. So introduce a separate mutex to synchronize gpu init. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: use upstream iommuRob Clark2014-08-04
| | | | | | | | | | | | | | | | | 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: no mmu is only error if not using vram carveoutRob Clark2014-08-04
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>