1. 28 11月, 2016 11 次提交
    • R
      drm/msm/mdp5: handle SMP block allocations "atomically" · 49ec5b2e
      Rob Clark 提交于
      Previously, SMP block allocation was not checked in the plane's
      atomic_check() fxn, so we could fail allocation SMP block allocation at
      atomic_update() time.  Re-work the block allocation to request blocks
      during atomic_check(), but not update the hw until committing the atomic
      update.
      
      Since SMP blocks allocated at atomic_check() time, we need to manage the
      SMP state as part of mdp5_state (global atomic state).  This actually
      ends up significantly simplifying the SMP management, as the SMP module
      does not need to manage the intermediate state between assigning new
      blocks before setting flush bits and releasing old blocks after vblank.
      (The SMP registers and SMP allocation is not double-buffered, so newly
      allocated blocks need to be updated in kms->prepare_commit() released
      blocks in kms->complete_commit().)
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      49ec5b2e
    • R
      drm/msm/mdp5: dynamically assign hw pipes to planes · 4a0f012d
      Rob Clark 提交于
      (re)assign the hw pipes to planes based on required caps, and to handle
      situations where we could not modify an in-use plane (ie. SMP block
      reallocation).
      
      This means all planes advertise the superset of formats and properties.
      Userspace must (as always) use atomic TEST_ONLY step for atomic updates,
      as not all planes may be available for use on every frame.
      
      The mapping of hwpipe to plane is stored in mdp5_state, so that state
      updates are atomically committed in the same way that plane/etc state
      updates are managed.  This is needed because the mdp5_plane_state keeps
      a pointer to the hwpipe, and we don't want global state to become out
      of sync with the plane state if an atomic update fails, we hit deadlock/
      backoff scenario, etc.  The use of state_lock keeps multiple parallel
      updates which both re-assign hwpipes properly serialized.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4a0f012d
    • R
      drm/msm/mdp5: add skeletal mdp5_state · ac2a3fd3
      Rob Clark 提交于
      Add basic state duplication/apply mechanism.  Following commits will
      move actual global hw state into this.
      
      The state_lock allows multiple concurrent updates to proceed as long as
      they don't both try to alter global state.  The ww_mutex mechanism will
      trigger backoff in case of deadlock between multiple threads trying to
      update state.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NArchit Taneja <architt@codeaurora.org>
      ac2a3fd3
    • R
      drm/msm/mdp5: introduce mdp5_hw_pipe · c056b55d
      Rob Clark 提交于
      Split out the hardware pipe specifics from mdp5_plane.  To start, the hw
      pipes are statically assigned to planes, but next step is to assign the
      hw pipes during plane->atomic_check() based on requested caps (scaling,
      YUV, etc).  And then hw pipe re-assignment if required if required SMP
      blocks changes.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NArchit Taneja <architt@codeaurora.org>
      c056b55d
    • R
      drm/msm/mdp5: rip out mode_changed · f5903bad
      Rob Clark 提交于
      It wasn't really doing the right thing if, for example, position or
      height changed.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      f5903bad
    • R
      drm/msm/mdp5: don't be so casty · 6ff3ddca
      Rob Clark 提交于
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      6ff3ddca
    • R
      drm/msm/mdp5: drop mdp5_plane::name · 0002d30f
      Rob Clark 提交于
      Just use plane->name now that it is a thing.  In a following patch, once
      we dynamically assign hw pipes to planes, it won't make sense to name
      planes the way we do, so this also partly reduces churn in following
      patch.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0002d30f
    • R
      drm/msm/mdp5: nuke mdp5_plane_complete_flip() · a2100695
      Rob Clark 提交于
      We can do this all from mdp5_plane_complete_commit(), so simplify things
      a bit and drop mdp5_plane_complete_flip().
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      a2100695
    • R
      drm/msm/mdp5: drop mdp5_crtc::name · cee26588
      Rob Clark 提交于
      Plane's (pipes) can be assigned dynamically with atomic, so it doesn't
      make much sense to name the pipe after it's primary plane.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      cee26588
    • R
      drm/msm/mdp5: small rename · d3937111
      Rob Clark 提交于
      These are really plane-id's, not crtc-id's.  Only connection to CRTCs is
      that they are used as primary-planes.
      
      Current name is just legacy from when we only supported RGB/primary
      planes.  Lets pick a better name now.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d3937111
    • R
      drm/msm: support multiple address spaces · 667ce33e
      Rob Clark 提交于
      We can have various combinations of 64b and 32b address space, ie. 64b
      CPU but 32b display and gpu, or 64b CPU and GPU but 32b display.  So
      best to decouple the device iova's from mmap offset.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      667ce33e
  2. 27 11月, 2016 4 次提交
  3. 09 11月, 2016 2 次提交
  4. 22 10月, 2016 2 次提交
  5. 16 9月, 2016 1 次提交
  6. 19 8月, 2016 1 次提交
  7. 09 8月, 2016 1 次提交
  8. 16 7月, 2016 13 次提交
    • L
      drm/msm: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() · d13b33fa
      Laurent Pinchart 提交于
      The driver needs the number of bytes per pixel, not the bpp and depth
      info meant for fbdev compatibility. Use the right API.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d13b33fa
    • A
      drm/msm/mdp5: Update compatible strings for MDSS/MDP5 · 96a611b5
      Archit Taneja 提交于
      Introduce new compatible strings for the top level MDSS wrapper device,
      and the MDP5 device.
      
      Previously, the "qcom,mdp5" and "qcom,mdss_mdp" compatible strings
      were used to match the top level platform_device (which was also tied
      to the top level drm_device struct). Now, these strings are used
      to match the MDP5 platform device.
      
      Use "qcom,mdss" as the compatible string for top level MDSS device.
      This is now used to match the top level platform_device (which is
      tied to the drm_device struct).
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      96a611b5
    • A
      drm/msm/mdp5: Add missing mdp5_enable/disable calls · 7c8f0235
      Archit Taneja 提交于
      Since runtime PM isn't implemented yet, we need to call
      mdp5_enable/disable in a few more places. These would later be
      replaced by runtime PM get/put calls.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      7c8f0235
    • 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/mdp5: Update the register offsets of MDP5 sub-blocks · 031d63dd
      Archit Taneja 提交于
      The MDP5 sub-block register offsets are relative to the top level
      MDSS register address.
      
      Now that we have the start of MDP5 register address space, provide
      the offsets relative to that. This involves subtracting the offsets
      with 0x1000 or 0x100 depending on the MDP5 version.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      031d63dd
    • A
      drm/msm/mdp5: Use updated MDP5 register names · 7b59c7e4
      Archit Taneja 提交于
      Since MDSS registers were stuffed within the the MDP5 register
      space, we had an __offset_MDP() macro to identify the offset
      between the start of MDSS and MDP5 address spaces. This offset
      macro expected a MDP index argument, which didn't make much
      sense since we don't have multiple MDPs.
      
      The offset is no longer needed now that we have devices for the 2
      different register address spaces. Also, remove the "REG_MDP5_MDP_"
      prefix to "REG_MDP5_".
      
      Update the generated headers in mdp5.xml.h
      
      We generally update headers as a separate patch, but we need to
      do these together to prevent breaking build.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      7b59c7e4
    • 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: Prepare new kms_init funcs · aec095ec
      Archit Taneja 提交于
      With MDP5 as a new device, we need to do less for MDP when initializing
      modeset after all the components are bound.
      
      Create mdp5_kms_init2/destroy2 funcs that inits modeset. These will
      eventually replace the older kms_init/destroy funcs.
      
      In the new kms_init2, the platform_device used is the one corresponding
      to the new MDP5 platform_device. The new change here is that the irq is
      now retrieved using irq_of_parse_and_map(), since MDP5 is a child interrupt
      of the MDSS interrupt controller.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      aec095ec
    • 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/mdp5: Add MDSS top level driver · 990a4007
      Archit Taneja 提交于
      SoCs that contain MDP5 have a top level wrapper called MDSS that manages
      clocks, power and irq for the sub-blocks within it.
      
      Currently, the MDSS portions are stuffed into the MDP5 driver. This makes
      it hard to represent the DT bindings in the correct way. We create a top
      level MDSS helper that handles these parts. This is essentially moving out
      some of the mdp5_kms irq code and MDSS register space and keeping it as a
      separate entity. We haven't given any clocks to the top level MDSS yet,
      but a AHB clock would be added in the future to access registers.
      
      One thing to note is that the resources allocated by this helper are
      tied to the top level platform_device (the one that allocates the
      drm_device struct too). This device would be the parent to MDSS
      sub-blocks like MDP5, DSI, eDP etc.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      990a4007
    • 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/mdp5: Don't get source of MDP core clock · 0e0d9dfe
      Archit Taneja 提交于
      The driver expects DT to provide the parent to MDP core clock. The only
      operation done to the parent clock is to set a rate. This can be
      achieved by setting the rate on the core clock itsef. Don't try to
      get the parent clock anymore.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0e0d9dfe
  9. 02 6月, 2016 2 次提交
  10. 17 5月, 2016 1 次提交
  11. 02 5月, 2016 1 次提交
  12. 05 3月, 2016 1 次提交