1. 16 7月, 2016 5 次提交
    • A
      drm/msm/mdp5: Remove old kms init/destroy funcs · 392ae6e0
      Archit Taneja 提交于
      With the new kms_init/destroy funcs in place for MDP5, we can get rid of
      the old kms funcs. Some members of the mdp5_kms struct also become
      redundant, so we remove those too.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      392ae6e0
    • A
      drm/msm/mdp5: Use the new hierarchy and drop old irq management · 0a6030d2
      Archit Taneja 提交于
      Call msm_mdss_init in msm_drv to set up top level registers/irq line.
      Start using the new kms_init2/destroy2 funcs to inititalize MDP5 KMS.
      
      With the MDSS interrupt and irqdomain set up, the old MDP5 irq code
      can be dropped.
      
      The mdp5_hw_init kms func now uses the platform device tied to MDP5
      instead of the one tied to the drm_device/MDSS.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0a6030d2
    • A
      drm/msm/mdp5: Create a separate MDP5 device · 1dd0a0b1
      Archit Taneja 提交于
      In order to have a tree-like device hierarchy between MDSS and its
      sub-blocks (MDP5, DSI, HDMI, eDP etc), we need to create a separate
      device/driver for MDP5. Currently, MDP5 and MDSS are squashed
      together are are tied to the top level platform_device, which is
      also the one used to create drm_device.
      
      The mdp5_kms_init code is split into two parts. The part where device
      resources are allocated are associated with the MDP5 driver's probe,
      the rest is executed later when we initialize modeset.
      
      With this change, unlike MDP4, the MDP5 platform_device isn't tied to
      the top level drm_device anymore. The top level drm_device is now
      associated with a platform device that corresponds to MDSS wrapper
      hardware.
      
      Create mdp5_init/destroy funcs that will be used by the MDP5 driver
      probe/remove. Use the HW_VERSION register in the MDP5 register address
      space. Both the MDSS and MDP VERSION registers give out identical
      version info.
      
      The older mdp5_kms_init code is left as is for now, this would be removed
      later when we have all the pieces to support the new device hierarchy.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      1dd0a0b1
    • A
      drm/msm: Get irq number within kms driver itself · a2b3a557
      Archit Taneja 提交于
      The driver gets the irq number using platform_get_irq on the main kms
      platform device. This works fine since both MDP4 and MDP5 currently
      have a flat device hierarchy. The platform device tied with the
      drm_device points to the MDP DT node in both cases.
      
      This won't work when MDP5 supports a tree-like hierarchy. In this
      case, the platform device tied to the top level drm_device is the
      MDSS DT node, and the irq we need for KMS is the one generated by
      MDP5, not MDSS.
      
      Get the irq number from the MDP4/5 kms driver itself. Each driver
      can later provide the irq number based on what device hierarchy it
      uses.
      
      While we're at it, call drm_irq_install only when we have a valid KMS
      driver.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      a2b3a557
    • A
      drm/msm: Drop the id_table in platform_driver · 6a5625d8
      Archit Taneja 提交于
      This isn't needed as we only support OF.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      6a5625d8
  2. 22 6月, 2016 1 次提交
    • D
      drm: Lobotomize set_busid nonsense for !pci drivers · a3257256
      Daniel Vetter 提交于
      We already have a fallback in place to fill out the unique from
      dev->unique, which is set to something reasonable in drm_dev_alloc.
      
      Which means we only need to have a special set_busid for pci devices,
      to be able to care the backwards compat code for drm 1.1 around, which
      libdrm still needs.
      
      While developing and testing this patch things blew up in really
      interesting ways, and the code is rather confusing in naming things
      between the kernel code, ioctl #defines and libdrm. For the next brave
      dragon slayer, document all this madness properly in the userspace
      interface section of gpu.tmpl.
      
      v2: Make drm_dev_set_unique static and update kerneldoc.
      
      v3: Entire rewrite, plus document what's going on for posterity in the
      gpu docbook uapi section.
      
      v4: Drop accidental amdgpu hunk (Emil).
      
      v5: Drop accidental omapdrm vblank counter change (Emil).
      
      v6: Rebase on top of the sphinx conversion.
      
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Cc: Emil Velikov <emil.l.velikov@gmail.com>
      Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> (virt_gpu)
      Reviewed-by: NEmil Velikov <emil.l.velikov@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      a3257256
  3. 21 6月, 2016 1 次提交
  4. 17 5月, 2016 1 次提交
  5. 08 5月, 2016 7 次提交
  6. 24 3月, 2016 1 次提交
    • R
      drm/msm: fix bug after preclose removal · 4016260b
      Rob Clark 提交于
      commit 53190c71
      Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
      AuthorDate: Mon Jan 25 22:16:49 2016 +0100
      Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
      CommitDate: Mon Feb 8 09:55:50 2016 +0100
      
          drm/msm: Nuke preclose hooks
      
      Left around the unused (and null) preclose fxn ptr, and things
      predictibly explode when you try to call that.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4016260b
  7. 04 3月, 2016 2 次提交
    • A
      drm/msm: rename hdmi symbols · fcda50c8
      Arnd Bergmann 提交于
      Global symbols in the kernel should be prefixed by the name
      of the subsystem and/or driver to avoid conflicts when all
      code is built-in.
      
      In this case, function names like 'hdmi_register' or 'hdmi_set_mode'
      are way too generic for an MSM specific DRM driver, so I'm renaming
      them all to msm_hdmi_* here.
      
      I also rename a lot of the 'static' symbols along with the global
      names for consistency, even though those are relatively harmless;
      they might only be slightly confusing when they show up in
      backtraces.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      fcda50c8
    • R
      drm/msm: fix small typo · 4313c744
      Rob Clark 提交于
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4313c744
  8. 03 3月, 2016 1 次提交
  9. 14 12月, 2015 2 次提交
  10. 23 10月, 2015 1 次提交
  11. 16 10月, 2015 1 次提交
  12. 07 10月, 2015 1 次提交
  13. 06 10月, 2015 1 次提交
    • T
      drm/irq: Use unsigned int pipe in public API · 88e72717
      Thierry Reding 提交于
      This continues the pattern started in commit cc1ef118 ("drm/irq:
      Make pipe unsigned and name consistent"). This is applied to the public
      APIs and driver callbacks, so pretty much all drivers need to be updated
      to match the new prototypes.
      
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Jianwei Wang <jianwei.wang.chn@gmail.com>
      Cc: Alison Wang <alison.wang@freescale.com>
      Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88e72717
  14. 16 8月, 2015 2 次提交
  15. 15 8月, 2015 1 次提交
  16. 30 7月, 2015 1 次提交
  17. 12 6月, 2015 2 次提交
    • R
      drm/msm: fix timeout calculation · 56c2da83
      Rob Clark 提交于
      The 'timeout' value comes from userspace (CLOCK_MONOTONIC), but
      converting this directly to jiffies doesn't take into account the
      initial jiffies count at boot, which may differ from the base time
      of CLOCK_MONOTONIC.
      
      TODO: add ktime_delta_jiffies() when rebasing on 4.1 and use that
      instead of ktime_sub/ktime_to_timespec/timespec_to_jiffies combo (as
      suggested by Arnd)
      
      v2: switch over from 'struct timespec' to ktime_t throughout, since
      'struct timespec' will be deprecated (as suggested by Arnd)
      v3: minor cosmetic tweaks
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      56c2da83
    • R
      drm/msm: add missing DRIVER_ATOMIC flag · a5436e1d
      Rob Clark 提交于
      Somehow this got lost when msm atomic support was first merged.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      a5436e1d
  18. 15 5月, 2015 1 次提交
    • R
      drm/msm: fix locking inconsistencies in gpu->destroy() · 774449eb
      Rob Clark 提交于
      In error paths, this was being called without struct_mutex held.
      Leading to panics like:
      
        msm 1a00000.qcom,mdss_mdp: No memory protection without IOMMU
        Kernel panic - not syncing: BUG!
        CPU: 0 PID: 1409 Comm: cat Not tainted 4.0.0-dirty #4
        Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
        Call trace:
        [<ffffffc000089c78>] dump_backtrace+0x0/0x118
        [<ffffffc000089da0>] show_stack+0x10/0x20
        [<ffffffc0006686d4>] dump_stack+0x84/0xc4
        [<ffffffc0006678b4>] panic+0xd0/0x210
        [<ffffffc0003e1ce4>] drm_gem_object_free+0x5c/0x60
        [<ffffffc000402870>] adreno_gpu_cleanup+0x60/0x80
        [<ffffffc0004035a0>] a3xx_destroy+0x20/0x70
        [<ffffffc0004036f4>] a3xx_gpu_init+0x84/0x108
        [<ffffffc0004018b8>] adreno_load_gpu+0x58/0x190
        [<ffffffc000419dac>] msm_open+0x74/0x88
        [<ffffffc0003e0a48>] drm_open+0x168/0x400
        [<ffffffc0003e7210>] drm_stub_open+0xa8/0x118
        [<ffffffc0001a0e84>] chrdev_open+0x94/0x198
        [<ffffffc000199f88>] do_dentry_open+0x208/0x310
        [<ffffffc00019a4c4>] vfs_open+0x44/0x50
        [<ffffffc0001aa26c>] do_last.isra.14+0x2c4/0xc10
        [<ffffffc0001aac38>] path_openat+0x80/0x5e8
        [<ffffffc0001ac354>] do_filp_open+0x2c/0x98
        [<ffffffc00019b60c>] do_sys_open+0x13c/0x228
        [<ffffffc00019b72c>] SyS_openat+0xc/0x18
        CPU1: stopping
      
      But there isn't any particularly good reason to hold struct_mutex for
      teardown, so just standardize on calling it without the mutex held and
      use the _unlocked() versions for GEM obj unref'ing
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      774449eb
  19. 14 5月, 2015 3 次提交
  20. 02 4月, 2015 3 次提交
  21. 02 2月, 2015 2 次提交