1. 02 4月, 2014 2 次提交
    • M
      drm: Replace crtc fb with primary plane fb (v3) · f4510a27
      Matt Roper 提交于
      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: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      f4510a27
    • M
      drm/msm: Switch to universal plane API's · 2d82d188
      Matt Roper 提交于
      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: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      2d82d188
  2. 06 2月, 2014 2 次提交
    • R
      drm/msm/mdp4: cursor fixes · aa1b0e59
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      aa1b0e59
    • R
      drm/msm/mdp4: pageflip fixes · b69720c0
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      b69720c0
  3. 10 1月, 2014 4 次提交
  4. 02 11月, 2013 3 次提交
    • 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: rework inactive-work · edd4fc63
      Rob Clark 提交于
      Re-arrange things a bit so that we can get work requested after a bo
      fence passes, like pageflip, done before retiring bo's.  Without any
      sort of bo cache in userspace, some games can trigger hundred's of
      transient bo's, which can cause retire to take a long time (5-10ms).
      Obviously we want a bo cache.. but this cleanup will make things a
      bit easier for atomic as well and makes things a bit cleaner.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NDavid Brown <davidb@codeaurora.org>
      edd4fc63
    • 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
  5. 30 8月, 2013 1 次提交
  6. 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