1. 16 9月, 2016 1 次提交
  2. 16 7月, 2016 4 次提交
    • M
      drm/msm: Delete unnecessary checks before drm_gem_object_unreference_unlocked() · e73a8569
      Markus Elfring 提交于
      The drm_gem_object_unreference_unlocked() function tests whether
      its argument is NULL and then returns immediately.
      Thus the test around the calls is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      e73a8569
    • A
      drm/msm: Call pm_runtime_enable/disable for newly created devices · cd792726
      Archit Taneja 提交于
      With the new device hierarchy for MDP5, we need to enable runtime PM
      for both the toplevel MDSS device and the MDP5 device itself. Enable
      runtime PM for the new devices.
      
      Since MDP4 and MDP5 now have different places where runtime PM is
      enabled, remove the previous pm_runtime_enable/disable calls, and
      squash them in the respective kms drivers.
      
      The new device hierarchy (as expressed in the DT bindings) has the GDSC
      tied only to the MDSS wrapper device. This GDSC needs to be enabled for
      accessing any register in the MDSS sub-blocks. Once every driver is
      runtime adapted, the GDSC will be enabled when any sub-block device
      calls runtime_get because of the parent-child relationship with MDSS.
      
      Until then, we call pm_runtime_get_sync() once for the MDSS device to
      ensure the GDSC is never disabled. This will be removed once all the
      drivers are runtime PM adapted.
      
      The error handling paths become a bit tricky when we call these runtime
      PM funcs. There doesn't seem to be any helper that checks if runtime PM
      is enabled already. Add bool variables in mdp4_kms/mdp5_kms structs to
      check if the driver had managed to call pm_runtime_enable before bailing
      out.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      cd792726
    • 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/mdp4: Clean up some MDP4 clocks · db9e44fb
      Archit Taneja 提交于
      Fix some issues with MDP4 clocks:
      
      - mdp4_dtv_encoder tries to get "src_clk", which is a RCG(TV_SRC) in
        MSM8960 and APQ8064. This isn't something the driver should access or
        configure. Instead of this, configure the "mdp_clk" (MDP_TV_CLK), a
        branch clock in MMCC that has the TV_SRC as its parent. Setting
        rate/enabling the "mdp_clk" will eventually configure "src_clk", which
        is what we want.
      - Rename "mdp_clk" to "tv_clk" because that's slightly less confusing.
      - Rename "mdp_axi_clk" to "bus_clk" because that's what we do elsewhere
        too.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      db9e44fb
  3. 02 6月, 2016 1 次提交
  4. 08 5月, 2016 1 次提交
    • A
      drm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver · ed19075b
      Archit Taneja 提交于
      The MDP4 driver tries to request and set voltages for regulators required
      by the DSI PLLs.
      
      Firstly, the MDP4 driver shouldn't manage the DSI regulators, this should
      be handled in the DSI driver. Secondly, it shouldn't try to set a fixed
      voltage for regulators. Voltage constraints should be specified on the
      regulator via DT and managed by the regulator core.
      
      Remove all the DSI PLL regulator related code from the MDP4 driver. It's
      managed in the DSI driver for MSM8960/APQ8064 already.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      ed19075b
  5. 04 3月, 2016 1 次提交
    • 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
  6. 03 3月, 2016 1 次提交
  7. 08 2月, 2016 1 次提交
  8. 14 12月, 2015 5 次提交
  9. 16 8月, 2015 2 次提交
  10. 12 6月, 2015 2 次提交
  11. 02 2月, 2015 1 次提交
    • R
      drm/msm: fix fallout of atomic dpms changes · 0b776d45
      Rob Clark 提交于
      As a result of atomic DPMS support, the various prepare/commit hooks get
      called in a way that msm dislikes.  We were expecting prepare/commit to
      bracket a modeset, which is no longer the case.  This was needed to hold
      various extra clk's (such as interface clks) on while we are touching
      registers, and in the case of mdp4 holding vblank enabled.
      
      The most straightforward way to deal with this, since we already have
      our own atomic_commit(), is to just handle prepare/commit internally to
      the driver (with some additional vfuncs for mdp4 vs mdp5), and switch
      everything over to instead use the new enable/disable hooks.  It doesn't
      really change too much, despite the code motion.  What used to be in the
      encoder/crtc dpms() fxns is split out into enable/disable.
      
      We should be able to drop our own enable-state tracking, as the atomic
      helpers should do this for us.  But keeping that for the short term for
      extra debugging as atomic stablizes.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0b776d45
  12. 17 11月, 2014 2 次提交
    • R
      drm/msm/hdmi: refactor bind/init · 067fef37
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      067fef37
    • R
      drm/msm: select REGULATOR · b7bbd640
      Rob Clark 提交于
      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: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      b7bbd640
  13. 10 9月, 2014 2 次提交
    • R
      drm/msm/mdp4: add LVDS panel support · 3e87599b
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      3e87599b
    • R
      drm/msm/mdp4: fix blend setup with multiple crtcs · d65bd0e4
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      d65bd0e4
  14. 04 8月, 2014 4 次提交
    • R
      drm/msm: use upstream iommu · 944fc36c
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      944fc36c
    • R
      drm/msm: fix BUG_ON() in error cleanup path · 036c1708
      Rob Clark 提交于
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      036c1708
    • R
      drm/msm/mdp4: add mdp axi clk · e8abb5b5
      Rob Clark 提交于
      Downstream kernel holds this clk via a fake-parent relationship.
      Upstream clock framework requires that we hold it explicitly.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      e8abb5b5
    • R
      drm/msm: DT support for 8960/8064 (v3) · 41e69778
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      41e69778
  15. 25 4月, 2014 1 次提交
    • R
      drm/msm/mdp4: cure for the cursor blues (v2) · 7d8d9f67
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      7d8d9f67
  16. 10 1月, 2014 6 次提交
    • R
      drm/msm: add hdmi support for apq8x74/mdp5 · dada25bd
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      dada25bd
    • R
      drm/msm: move irq utils to mdp_kms · 9e0efa63
      Rob Clark 提交于
      We'll want basically the same thing for mdp5, so refactor it out so it
      can be shared.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      9e0efa63
    • R
      drm/msm: mdp4_format -> mdp_format · 10a02eb6
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      10a02eb6
    • R
      drm/msm: move mdp4 -> mdp/mdp4 · 2e54a92f
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      2e54a92f
    • R
      drm/msm: add support for msm8060ab/bstem · e529c7e6
      Rob Clark 提交于
      This adds the necessary configuration for the APQ8060A SoC (dual-core
      krait + a320 gpu) as found on the bstem board.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      e529c7e6
    • R
      drm/msm: add support for non-IOMMU systems · 871d812a
      Rob Clark 提交于
      Add a VRAM carveout that is used for systems which do not have an IOMMU.
      
      The VRAM carveout uses CMA.  The arch code must setup a CMA pool for the
      device (preferrably in highmem.. a 256m-512m VRAM pool in lowmem is not
      cool).  The user can configure the VRAM pool size using msm.vram module
      param.
      
      Technically, the abstraction of IOMMU behind msm_mmu is not strictly
      needed, but it simplifies the GEM code a bit, and will be useful later
      when I add support for a2xx devices with GPUMMU, so I decided to keep
      this part.
      
      It appears to be possible to configure the GPU to restrict access to
      addresses within the VRAM pool, but this is not done yet.  So for now
      the GPU will refuse to load if there is no sort of mmu.  Once address
      based limits are supported and tested to confirm that we aren't giving
      the GPU access to arbitrary memory, this restriction can be lifted
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      871d812a
  17. 02 11月, 2013 2 次提交
    • R
      drm/msm/mdp4: page_flip cleanups/fixes · 2a2b8fa6
      Rob Clark 提交于
      There were a few potential problems with the original page_flip/vblank
      code in mdp4_crtc.
      
      1) We need vblank irq for a couple things, both completing flips and
         updating cursor.  We need to keep track of what work is pending so
         that (for example) a cursor update while we are still waiting for
         pageflip_cb (ie. pageflip requested from userspace, but still
         waiting for rendering to complete) would not prematurely trigger
         event to userspace.
      
      2) A preclose -> pageflip-cancel should not cancel a pageflip that
         was requested on a different file (ie. non-master closing should
         not cancel a pending pageflip).
      
      With these fixes, we no longer have problems w/ cursor not updating and
      with occasional hangs with userspace waiting for a pageflip that had
      been cancelled (launching XBMC from gnome-shell overview mode was a good
      way to trigger this, but now works reliably).
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      2a2b8fa6
    • R
      drm/msm: add plane support · a8623918
      Rob Clark 提交于
      Enable using VG1 and VG2 for planes.  Currently YUV/CSC or scaling is
      not enabled, but ARGB and xRGB blending is.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NDavid Brown <davidb@codeaurora.org>
      a8623918
  18. 28 9月, 2013 1 次提交
  19. 02 9月, 2013 1 次提交
  20. 25 8月, 2013 1 次提交
    • R
      drm/msm: basic KMS driver for snapdragon · c8afe684
      Rob Clark 提交于
      The snapdragon chips have multiple different display controllers,
      depending on which chip variant/version.  (As far as I can tell, current
      devices have either MDP3 or MDP4, and upcoming devices have MDSS.)  And
      then external to the display controller are HDMI, DSI, etc. blocks which
      may be shared across devices which have different display controller
      blocks.
      
      To more easily add support for different display controller blocks, the
      display controller specific bits are split out into a "kms" module,
      which provides the kms plane/crtc/encoder objects.
      
      The external HDMI, DSI, etc. blocks are part encoder, and part connector
      currently.  But I think I will pull in the drm_bridge patches from
      chromeos tree, and split them into a bridge+connector, with the
      registers that need to be set in modeset handled by the bridge.  This
      would remove the 'msm_connector' base class.  But some things need to be
      double checked to make sure I could get the correct ON/OFF sequencing..
      
      This patch adds support for mdp4 crtc (including hw cursor), dtv encoder
      (part of MDP4 block), and hdmi.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      c8afe684