Skip to content
  1. Apr 19, 2019
    • Jordan Crouse's avatar
      drm/msm/gpu: Attach to the GPU GX power domain · 9325d426
      Jordan Crouse authored
      
      
      99.999% of the time during normal operation the GMU is responsible
      for power and clock control on the GX domain and the CPU remains
      blissfully unaware. However, there is one situation where the CPU
      needs to get involved:
      
      The power sequencing rules dictate that the GX needs to be turned
      off before the CX so that the CX can be turned on before the GX
      during power up. During normal operation when the CPU is taking
      down the CX domain a stop command is sent to the GMU which turns
      off the GX domain and then the CPU handles the CX domain.
      
      But if the GMU happened to be unresponsive while the GX domain was
      left then the CPU will need to step in and turn off the GX domain
      before resetting the CX and rebooting the GMU. This unfortunately
      means that the CPU needs to be marginally aware of the GX domain
      even though it is expected to usually keep its hands off.
      
      To support this we create a semi-disabled GX power domain that
      does nothing to the hardware on power up but tries to shut it
      down normally on power down. In this method the reference counting
      is correct and we can step in with the pm_runtime_put() at the right
      time during the failure path.
      
      This patch sets up the connection to the GX power domain and does
      the magic to "enable" and disable it at the right points.
      
      Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      9325d426
    • Jordan Crouse's avatar
      drm/msm/a6xx: Remove unwanted regulator code · b94a6e37
      Jordan Crouse authored
      
      
      The GMU code currently has some misguided code to try to work around
      a hardware quirk that requires the power domains on the GPU be
      collapsed in a certain order. Upcoming patches will do this the
      right way so get rid of the unused and unwanted regulator
      code.
      
      Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      b94a6e37
    • Rob Clark's avatar
      drm/msm: add param to retrieve # of GPU faults (global) · 48dc4241
      Rob Clark authored
      
      
      For KHR_robustness, userspace wants to know two things, the count of GPU
      faults globally, and the count of faults attributed to a given context.
      This patch providees the former, and the next patch provides the latter.
      
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      Reviewed-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
      48dc4241
    • Rob Clark's avatar
      drm/msm/gpu: add per-process pagetables param · d674c963
      Rob Clark authored
      
      
      For now it always returns '0' (false), but once the iommu work is in
      place to enable per-process pagetables we can update the value returned.
      
      Userspace needs to know this to make an informed decision about exposing
      KHR_robustness.
      
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      Reviewed-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
      d674c963
  2. Apr 18, 2019
    • Wen Yang's avatar
      drm/msm: a5xx: fix possible object reference leak · 6cd5235c
      Wen Yang authored
      
      
      The call to of_get_child_by_name returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:57:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 47, but without a corresponding object release within this function.
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:66:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 47, but without a corresponding object release within this function.
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:118:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 47, but without a corresponding object release within this function.
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:57:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 51, but without a corresponding object release within this function.
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:66:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 51, but without a corresponding object release within this function.
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:118:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 51, but without a corresponding object release within this function.
      
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Jordan Crouse <jcrouse@codeaurora.org>
      Cc: Mamta Shukla <mamtashukla555@gmail.com>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Sharat Masetty <smasetty@codeaurora.org>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Cc: linux-kernel@vger.kernel.org (open list)
      Reviewed-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      6cd5235c
    • Douglas Anderson's avatar
      drm/msm: Cleanup A6XX opp-level reading · e1505f62
      Douglas Anderson authored
      
      
      The patch ("OPP: Add support for parsing the 'opp-level' property")
      adds an API enabling a cleaner way to read the opp-level.  Let's use
      the new API.
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      e1505f62
  3. Feb 19, 2019
  4. Jan 29, 2019
  5. Jan 24, 2019
  6. Dec 11, 2018
  7. Nov 29, 2018
    • Stephen Boyd's avatar
      drm: msm: Check cmd_db_read_aux_data() for failure · b601f731
      Stephen Boyd authored
      
      
      We need to check the call to cmd_db_read_aux_data() for the error case,
      so that we don't continue and use potentially uninitialized values for
      'pri_count' and 'sec_count'. Otherwise, we get the following compiler
      warnings:
      
         drivers/gpu/drm/msm/adreno/a6xx_gmu.c: In function 'a6xx_gmu_rpmh_arc_votes_init.isra.12':
         drivers/gpu/drm/msm/adreno/a6xx_gmu.c:943:12: warning: 'pri_count' is used uninitialized in this function [-Wuninitialized]
           pri_count >>= 1;
                     ^~~
         drivers/gpu/drm/msm/adreno/a6xx_gmu.c:948:12: warning: 'sec_count' may be used uninitialized in this function
      [-Wmaybe-uninitialized]
           sec_count >>= 1;
                     ^~~
      
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Cc: Jordan Crouse <jcrouse@codeaurora.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Jordan Crouse <jcrouse@codeaurora.org>
      Cc: Rob Clark <robdclark@gmail.com>
      Fixes: ed3cafa7 ("soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data()")
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Reviewed-by: default avatarAndy Gross <andy.gross@linaro.org>
      Acked-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      b601f731
  8. Nov 14, 2018
    • Stephen Boyd's avatar
      soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data() · ed3cafa7
      Stephen Boyd authored
      
      
      Let's change the function signature to return the pointer to memory or
      an error pointer on failure, and take an argument that lets us return
      the size of the aux data read. This way we can remove the
      cmd_db_read_aux_data_len() API entirely and also get rid of the memcpy
      operation from cmd_db to the caller. Updating the only user of this code
      shows that making this change allows us to remove a function and put the
      lookup where the user is.
      
      Cc: Mahesh Sivasubramanian <msivasub@codeaurora.org>
      Cc: Lina Iyer <ilina@codeaurora.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Jordan Crouse <jcrouse@codeaurora.org>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      ed3cafa7
  9. Oct 23, 2018
  10. Oct 09, 2018
  11. Oct 07, 2018
  12. Oct 04, 2018
Loading