1. 14 May, 2015 11 commits
    • Hai Li's avatar
      drm/msm/dsi: Simplify the code to get the number of read byte · ec1936eb
      Hai Li authored
      During cmd rx, only new versions of H/W provide register to read back
      the real number of byte returned by panel. For the old versions, reading
      this register will not get the right number. In fact, we only need to
      assume the returned data is the same size as we expected, because later
      we will check the data type to detect error.
      Signed-off-by: default avatarHai Li <hali@codeaurora.org>
      ec1936eb
    • Hai Li's avatar
      drm/msm: Attach assigned encoder to eDP and DSI connectors · 6f6b2879
      Hai Li authored
      drm_mode_connector_attach_encoder() function call is missing
      during eDP and DSI connector initialization. As a result,
      no encoder is returned by DRM_IOCTL_MODE_GETCONNECTOR system
      call. This change is to fix this issue.
      Signed-off-by: default avatarHai Li <hali@codeaurora.org>
      6f6b2879
    • Rob Clark's avatar
      drm/msm: setup vram after component_bind_all() · 13f15565
      Rob Clark authored
      First of all, we don't want -EPROBE_DEFER when trying to bind children
      to cause us to forget to free our vram.  And second we don't want vram
      allocation fail to trigger _unbind_all() before _bind_all().
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      13f15565
    • Rob Clark's avatar
      drm/msm/dsi: use pr_err_ratelimited · ff431fa4
      Rob Clark authored
      When things go badly we can get a lot of these error irqs.  Let's not
      DoS the user.
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      ff431fa4
    • Stephane Viau's avatar
      drm/msm: fix unbalanced DRM framebuffer init/destroy · 7194b62c
      Stephane Viau authored
      When msm_framebuffer_init() fails before calling drm_framebuffer_init(),
      drm_framebuffer_cleanup() [called in msm_framebuffer_destroy()]
      is still being called even though drm_framebuffer_init() was not
      called for that buffer. Thus a NULL pointer derefencing:
      
      [  247.529691] Unable to handle kernel NULL pointer dereference at virtual address 0000027c
      ...
      [  247.563996] PC is at __mutex_lock_slowpath+0x94/0x3a8
      ...
      [  247.823025] [<c07c3c78>] (__mutex_lock_slowpath) from [<c07c3fac>] (mutex_lock+0x20/0x3c)
      [  247.831186] [<c07c3fac>] (mutex_lock) from [<c0347cf0>] (drm_framebuffer_cleanup+0x18/0x38)
      [  247.839520] [<c0347cf0>] (drm_framebuffer_cleanup) from [<c036d138>] (msm_framebuffer_destroy+0x48/0x100)
      [  247.849066] [<c036d138>] (msm_framebuffer_destroy) from [<c036d580>] (msm_framebuffer_init+0x1e8/0x228)
      [  247.858439] [<c036d580>] (msm_framebuffer_init) from [<c036d630>] (msm_framebuffer_create+0x70/0x134)
      [  247.867642] [<c036d630>] (msm_framebuffer_create) from [<c03493ec>] (internal_framebuffer_create+0x67c/0x7b4)
      [  247.877537] [<c03493ec>] (internal_framebuffer_create) from [<c034ce34>] (drm_mode_addfb2+0x20/0x98)
      [  247.886650] [<c034ce34>] (drm_mode_addfb2) from [<c034071c>] (drm_ioctl+0x240/0x420)
      [  247.894378] [<c034071c>] (drm_ioctl) from [<c011df7c>] (do_vfs_ioctl+0x4e4/0x5a4)
      ...
      Signed-off-by: default avatarStephane Viau <sviau@codeaurora.org>
      [plus initialize msm_fb to NULL to -Rob]
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      7194b62c
    • Stephane Viau's avatar
      drm/msm/mdp5: Fix iteration on INTF config array · fe34464d
      Stephane Viau authored
      The current iteration in get_dsi_id_from_intf() is wrong:
      instead of iterating until hw_cfg->intf.count, we need to iterate
      until MDP5_INTF_NUM_MAX here.
      
      Let's take the example of msm8x16:
      
       hw_cfg->intf.count = 1
       intfs[0] = INTF_Disabled
       intfs[1] = INTF_DSI
      
      If we stop iterating once i reaches hw_cfg->intf.count (== 1),
      we will miss the test for intfs[1].
      
      Actually, this hw_cfg->intf.count entry is quite confusing and is not
      (or *should not be*) used anywhere else; let's remove it.
      Signed-off-by: default avatarStephane Viau <sviau@codeaurora.org>
      fe34464d
    • Hai Li's avatar
      651ad3f5
    • Julia Lawall's avatar
      drm/msm/dp: fix error return code · 6128f1be
      Julia Lawall authored
      Return a negative error code on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret; expression e1,e2;
      @@
      (
      if (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      6128f1be
    • Archit Taneja's avatar
      drm: msm: Fix build when legacy fbdev support isn't set · a2ca7789
      Archit Taneja authored
      The DRM_KMS_FB_HELPER config is selected only when DRM_MSM_FBDEV config is
      selected. The driver accesses drm_fb_helper_* functions even when legacy fbdev
      support is disabled in msm. Wrap around these functions with #ifdef checks to
      prevent build break.
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      a2ca7789
    • Stephane Viau's avatar
      drm/msm/dsi: Fix a couple more 64-bit build warnings · 981371f3
      Stephane Viau authored
      Avoid such errors at compilation time:
      	format '%d' expects argument of type 'int', but argument 3 has type 'size_t'
      Signed-off-by: default avatarStephane Viau <sviau@codeaurora.org>
      981371f3
    • Thierry Reding's avatar
      drm/msm: Fix a couple of 64-bit build warnings · fc99f97a
      Thierry Reding authored
      Avoid casts from pointers to fixed-size integers to prevent the compiler
      from warning. Print virtual memory addresses using %p instead. Also turn
      a couple of %d/%x specifiers into %zu/%zd/%zx to avoid further warnings
      due to mismatched format strings.
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
      fc99f97a
  2. 10 May, 2015 2 commits
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 332545b3
      Dave Airlie authored
      misc i915 fixes.
      
      * tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Drop PIPE-A quirk for 945GSE HP Mini
        drm/i915: Sink rate read should be saved in deca-kHz
        drm/i915/dp: there is no audio on port A
        drm/i915: Add missing MacBook Pro models with dual channel LVDS
        drm/i915: Assume dual channel LVDS if pixel clock necessitates it
      332545b3
    • Mario Kleiner's avatar
      drm: Zero out invalid vblank timestamp in drm_update_vblank_count. · fdb68e09
      Mario Kleiner authored
      Since commit 844b03f2 we make
      sure that after vblank irq off, we return the last valid
      (vblank count, vblank timestamp) pair to clients, e.g., during
      modesets, which is good.
      
      An overlooked side effect of that commit for kms drivers without
      support for precise vblank timestamping is that at vblank irq
      enable, when we update the vblank counter from the hw counter, we
      can't update the corresponding vblank timestamp, so now we have a
      totally mismatched timestamp for the new count to confuse clients.
      
      Restore old client visible behaviour from before Linux 3.17, but
      zero out the timestamp at vblank counter update (instead of disable
      as in original implementation) if we can't generate a meaningful
      timestamp immediately for the new vblank counter. This will fix
      this regression, so callers know they need to retry again later
      if they need a valid timestamp, but at the same time preserves
      the improvements made in the commit mentioned above.
      Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: <stable@vger.kernel.org> #v3.17+
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      fdb68e09
  3. 08 May, 2015 3 commits
  4. 07 May, 2015 11 commits
  5. 06 May, 2015 1 commit
  6. 05 May, 2015 3 commits
  7. 04 May, 2015 4 commits
  8. 03 May, 2015 5 commits