1. 10 12月, 2014 6 次提交
  2. 09 12月, 2014 2 次提交
  3. 04 12月, 2014 2 次提交
  4. 02 12月, 2014 2 次提交
  5. 01 12月, 2014 1 次提交
  6. 27 11月, 2014 5 次提交
    • R
      drm/atomic: clear plane's CRTC and FB when shutting down · e5b5341c
      Rob Clark 提交于
      Otherwise we'd still end up w/ the plane attached to the CRTC, and
      seemingly active, but without an FB.  Which ends up going *boom*
      in the drivers.
      
      Slightly modified version of Daniel's irc suggestion.
      
      Note that the big problem isn't drivers going *boom* here (since we
      already have the situation of planes being left enabled when the crtc
      goes down). The real issue is that the core assumes the primary plane
      always goes down when calling ->set_config with a NULL mode. Ignoring
      that assumption leads to the legacy state pointers plane->fb/crtc
      getting out of sync with atomic, and that then leads to the subsequent
      *boom* all over the place.
      
      CC: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      [danvet: Drop my opinion of what's going sidewides here into the
      commit message as a note.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e5b5341c
    • D
      drm: Handle atomic state properly in kms getfoo ioctl · abd69c55
      Daniel Vetter 提交于
      So the problem with async commit (especially async modeset commit) is
      that the legacy pointers only get updated after the point of no
      return, in the async part of the modeset sequence. At least as
      implemented by the current helper functions. This is done in the
      set_routing_links function in drm_atomic_helper.c.
      
      Which also means that access isn't protected by locks but only
      coordinated by synchronizing with async workers. No problem thus far,
      until we lock at the getconnector/encoder ioctls.
      
      So fix this up by adding special cases for atomic drivers: For those
      we need to look at state objects. Unfortunately digging out the
      correct encoder->crtc link is a bit of work, so wrap this up in a
      helper function.
      
      Moving the assignments of connector->encoder and encoder->crtc earlier
      isn't a good idea because the point of the atomic helpers is that we
      stage the state updates. That way the disable functions can still
      inspect the links and rely upon them.
      
      v2: Extract full encoder->crtc lookup into helper (Rob).
      
      v3: Extract drm_connector_get_encoder too since - we need to always
      return state->best_encoder when there is a state otherwise we might
      return stale data if there's a pending async disable (and chase
      unlocked pointers, too). Same issue with encoder_get_crtc but there
      it's a bit more tricky to handle.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Lightly-Tested-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      abd69c55
    • R
      drm: use mode_object_find helpers · 933f622f
      Rob Clark 提交于
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      933f622f
    • R
      drm/msm: switch to atomic-helpers iterator macros · 93b02beb
      Rob Clark 提交于
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      93b02beb
    • R
      drm/atomic: track bitmask of planes attached to crtc · 6ddd388a
      Rob Clark 提交于
      Chasing plane->state->crtc of planes that are *not* part of the same
      atomic update is racy, making it incredibly awkward (or impossible) to
      do something simple like iterate over all planes and figure out which
      ones are attached to a crtc.
      
      Solve this by adding a bitmask of currently attached planes in the
      crtc-state.
      
      Note that the transitional helpers do not maintain the plane_mask.  But
      they only support the legacy ioctls, which have sufficient brute-force
      locking around plane updates that they can continue to loop over all
      planes to see what is attached to a crtc the old way.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      [danvet:
      - Drop comments about locking in set_crtc_for_plane since they're a
        bit misleading - we already should hold lock for the current crtc.
      - Also WARN_ON if get_state on the old crtc fails since that should
        have been done already.
      - Squash in fixup to check get_plane_state return value, reported by
        Dan Carpenter and acked by Rob Clark.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6ddd388a
  7. 25 11月, 2014 6 次提交
  8. 22 11月, 2014 3 次提交
  9. 21 11月, 2014 13 次提交
    • R
      drm/msm/mdp5: dpms(OFF) cleanups · d6ac4a84
      Rob Clark 提交于
      When disabling the interface (INTF), the change doesn't latch until next
      vblank, so we need to wait for vblank.
      
      Also, to be pedantic, in the crtc, set all the mixer stages to unused.
      It shouldn't really matter, since at this point we have already disabled
      the INTF and waited for necessary vblank.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d6ac4a84
    • R
      drm/msm/mdp5: atomic · ed851963
      Rob Clark 提交于
      Convert mdp5 over to atomic helpers.  Extend/wrap drm_plane_state to
      track plane zpos and to keep track of the needed when applying the
      atomic update.  In mdp5's plane->atomic_check() we also need to check
      for updates which require SMP reallocation, in order to trigger full
      modeset.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      ed851963
    • R
      drm/msm: atomic fixes · 3e2f29e4
      Rob Clark 提交于
      Fixes for a couple little issues found in testing.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      3e2f29e4
    • R
      drm/msm/mdp5: remove global mdp5_ctl_mgr · 32c0e3e2
      Rob Clark 提交于
      A bit cleaner.. and won't resulting in an attempt to kfree() a static
      global in unload path.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      32c0e3e2
    • R
      drm/msm/mdp5: don't use void * for opaque types · 42238da8
      Rob Clark 提交于
      For example, use 'struct mdp5_smp *' everywhere instead of 'void *', but
      only declare it as 'struct mdp5_smp;' in common headers, so the struct
      body is still private.  The accomplishes the desired modularity while
      still letting the compiler provide some type checking for us.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      42238da8
    • S
      drm/msm: add multiple CRTC and overlay support · 0deed25b
      Stephane Viau 提交于
      MDP5 currently support one single CRTC with its private pipe.
      This change allows the configuration of multiple CRTCs with
      the possibility to attach several public planes to these CRTCs.
      Signed-off-by: NStephane Viau <sviau@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0deed25b
    • R
      drm/msm/mdp5: set rate before enabling clk · ac7a5704
      Rob Clark 提交于
      Set a "safe" rate at first, in order to read out the hw revision.  And
      then after set the optimal value.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      ac7a5704
    • S
      drm/msm/mdp5: introduce mdp5_cfg module · 2e362e17
      Stephane Viau 提交于
      The hardware configuration modification from a version to another
      is quite consequent. Introducing a configuration module
      (mdp5_cfg) may make things more clear and easier to access when a
      new hardware version comes up.
      Signed-off-by: NStephane Viau <sviau@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      2e362e17
    • S
      drm/msm/mdp5: make SMP module dynamically configurable · bfcdfb0e
      Stephane Viau 提交于
      The Shared Memory Pool (SMP) has its own limitation, features and
      state. Some examples are:
       - the number of Memory Macro Block (MMB) and their size
       - the number of lines that can be fetched
       - the state of MMB currently allocated
       - the computation of number of blocks required per plane
       - client IDs ...
      
      In order to avoid private data to be overwritten by other modules,
      let's make these private to the SMP module.
      
      Some of these depend on the hardware configuration, let's add them
      to the mdp5_config struct.
      
      In some hw configurations, some MMBs are statically tied to RGB
      pipes and cannot be re-allocated dynamically. This change
      introduces the concept of MMB static usage and makes sure that
      dynamic MMB requests are dimensioned accordingly.
      
      A note on passing a pipe pointer, instead of client IDs:
      Client IDs are SMP-related information. Passing PIPE information
      to SMP lets SMP module to find out which SMP client(s) are used.
      This allows the SMP module to access the PIPE pointer, which can
      be used for FIFO watermark configuration.
      By the way, even though REG_MDP5_PIPE_REQPRIO_FIFO_WM_* registers
      are part of the PIPE registers, their functionality is to reflect
      the behavior of the SMP block. These registers access is now
      restricted to the SMP module.
      Signed-off-by: NStephane Viau <sviau@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      bfcdfb0e
    • R
      drm/msm/hdmi: remove useless kref · d1a717bd
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      d1a717bd
    • S
      drm/msm/mdp5: get the core clock rate from MDP5 config · 3f307963
      Stephane Viau 提交于
      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: NStephane Viau <sviau@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      3f307963
    • R
      drm/msm/mdp5: use irqdomains · f6a8eaca
      Rob Clark 提交于
      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: NRob Clark <robdclark@gmail.com>
      f6a8eaca
    • M
      drm/vmwgfx: Deletion of an unnecessary check before the function call "vfree" · a3a1a667
      Markus Elfring 提交于
      The vfree() function performes also input parameter validation. Thus the test
      around the call is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Reviewed-by: NThierry Reding <thierry.reding@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a3a1a667