1. 07 2月, 2017 3 次提交
    • A
      drm/msm/mdp5: Misc cursor plane bits · 5798c8e0
      Archit Taneja 提交于
      These are various changes added in preparation for cursor planes:
      
      - Add a pipe_cursor block for 8x96 in mdp5_cfg.
      - Add a new pipe CAP called MDP_PIPE_CAP_CURSOR. Use this to ensure we
        assign a cursor SSPP for a drm_plane with type DRM_PLANE_TYPE_CURSOR.
      - Update mdp5_ctl_blend_mask/ext_blend_mask funcs to incorporate cursor
        SSPPs.
      - In mdp5_ctl_blend, iterate through MAX_STAGES instead of stage_cnt,
        we need to do this because we can now have empty stages in between.
      - In mdp5_crtc_atomic_check, make sure that the cursor plane has the
        highest zorder, and stage the cursor plane to the maximum stage #
        present on the HW.
      - Create drm_crtc_funcs that doesn't try to implement cursors using the
        older LM cursor HW.
      - Pass drm_plane_type in mdp5_plane_init instead of a bool telling
        whether plane is primary or not.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      5798c8e0
    • A
      drm/msm/mdp5: Configure COLOR3_OUT propagation · 829200ac
      Archit Taneja 提交于
      In MDP5 Layer Mixer HW, the blender output is only the blended color
      components (i.e R, G and B, or COLOR0/1/2 in MDP5 HW terminology). This
      is fed to the BG input of the next blender. We also need to provide an
      alpha (COLOR3) value for the BG input at the next stage.
      
      This is configured via using the REG_MDP5_LM_BLEND_COLOR_OUT register.
      For each stage, we can propagate either the BG or FG alpha to the next
      stage.
      
      The approach taken by the driver is to propagate FG alpha, if the plane
      staged on that blender has an alpha. If it doesn't, we try to propagate
      the base layer's alpha.
      
      This is borrowed from downstream MDP5 kernel driver. Without this, we
      don't see any cursor plane content.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      829200ac
    • A
      drm/msm/mdp5: Prepare CRTC/LM for empty stages · 106f9727
      Archit Taneja 提交于
      Use SSPP_NONE in mdp5_plane_pipe() if there is now hwpipe allocated for
      the drm_plane. Returning '0' means we are returning VIG0 pipe.
      
      Also, use the mdp5_pipe enum to pass around the stage array. Initialize
      the stage to SSPP_NONE by default.
      
      We do the above because 1) Cursor plane has to be staged at the topmost
      blender of the LM, which can result in empty stages in between 2) In
      the future, when we support multiple LMs per CRTC. We could have stages
      which don't have any pipe assigned to them.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      106f9727
  2. 29 11月, 2016 1 次提交
    • R
      drm/msm: convert iova to 64b · 78babc16
      Rob Clark 提交于
      For a5xx the gpu is 64b so we need to change iova to 64b everywhere.  On
      the display side, iova is still 32b so it can ignore the upper bits.
      (Although all the armv8 devices have an iommu that can map 64b pa to 32b
      iova.)
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      78babc16
  3. 28 11月, 2016 4 次提交
    • 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: 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: 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
  4. 27 11月, 2016 1 次提交
    • R
      drm/msm/mdp5: handle non-fullscreen base plane case · 1455adbd
      Rob Clark 提交于
      If the bottom-most layer is not fullscreen, we need to use the BASE
      mixer stage for solid fill (ie. MDP5_CTL_BLEND_OP_FLAG_BORDER_OUT).  The
      blend_setup() code pretty much handled this already, we just had to
      figure this out in _atomic_check() and assign the stages appropriately.
      
      Also fix the case where there are zero enabled planes, where we also
      need to enable BORDER_OUT.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      1455adbd
  5. 02 11月, 2016 1 次提交
    • R
      drm/msm/mdp5: handle non-fullscreen base plane case · 31e4801a
      Rob Clark 提交于
      If the bottom-most layer is not fullscreen, we need to use the BASE
      mixer stage for solid fill (ie. MDP5_CTL_BLEND_OP_FLAG_BORDER_OUT).  The
      blend_setup() code pretty much handled this already, we just had to
      figure this out in _atomic_check() and assign the stages appropriately.
      
      Also fix the case where there are zero enabled planes, where we also
      need to enable BORDER_OUT.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      31e4801a
  6. 16 7月, 2016 1 次提交
  7. 02 6月, 2016 1 次提交
  8. 17 5月, 2016 1 次提交
  9. 02 5月, 2016 1 次提交
  10. 05 3月, 2016 1 次提交
  11. 03 3月, 2016 1 次提交
  12. 08 2月, 2016 1 次提交
  13. 11 12月, 2015 1 次提交
    • V
      drm: Pass 'name' to drm_crtc_init_with_planes() · f9882876
      Ville Syrjälä 提交于
      Done with coccinelle for the most part. However, it thinks '...' is
      part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder
      in its place and got rid of it with sed afterwards.
      
      I didn't convert drm_crtc_init() since passing the varargs through
      would mean either cpp macros or va_list, and I figured we don't
      care about these legacy functions enough to warrant the extra pain.
      
      @@
      identifier dev, crtc, primary, cursor, funcs;
      @@
       int drm_crtc_init_with_planes(struct drm_device *dev,
                                     struct drm_crtc *crtc,
                                     struct drm_plane *primary, struct drm_plane *cursor,
                                     const struct drm_crtc_funcs *funcs
      +                              ,const char *name, int DOTDOTDOT
                                     )
      { ... }
      
      @@
      identifier dev, crtc, primary, cursor, funcs;
      @@
       int drm_crtc_init_with_planes(struct drm_device *dev,
                                     struct drm_crtc *crtc,
                                     struct drm_plane *primary, struct drm_plane *cursor,
                                     const struct drm_crtc_funcs *funcs
      +                              ,const char *name, int DOTDOTDOT
                                     );
      
      @@
      expression E1, E2, E3, E4, E5;
      @@
       drm_crtc_init_with_planes(E1, E2, E3, E4, E5
      +                          ,NULL
                                 )
      
      v2: Split crtc and plane changes apart
          Pass NULL for no-name instead of ""
          Leave drm_crtc_init() alone
      v3: Add ', or NULL...' to @name kernel doc (Jani)
          Annotate the function with __printf() attribute (Jani)
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449670771-2751-1-git-send-email-ville.syrjala@linux.intel.com
      f9882876
  14. 16 8月, 2015 3 次提交
  15. 27 7月, 2015 1 次提交
  16. 12 6月, 2015 3 次提交
    • H
      drm/msm/mdp5: Wait for PP_DONE irq for command mode CRTC atomic commit · 68cdbed9
      Hai Li 提交于
      CRTCs in DSI command mode data path should wait for pingpong done,
      instead of vblank, to finish atomic commit.
      
      This change is to enable PP_DONE irq on command mode CRTCs and wait for
      this irq happens before atomic commit completion.
      Signed-off-by: NHai Li <hali@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      68cdbed9
    • H
      drm/msm: Use customized function to wait for atomic commit done · 0a5c9aad
      Hai Li 提交于
      MDP FLUSH registers could indicate if the previous flush updates
      has taken effect at vsync boundary. Making use of this H/W feature
      can catch the vsync that happened between CRTC atomic_flush and
      *_wait_for_vblanks, to avoid unnecessary wait.
      
      This change allows kms CRTCs to use their own *_wait_for_commit_done
      functions to wait for FLUSH register cleared at vsync, before commit
      completion.
      Signed-off-by: NHai Li <hali@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0a5c9aad
    • R
      drm/msm/mdp5: fix for crash in disable path · e5989ee1
      Rob Clark 提交于
      Seems like disable can race with complete_flip() in process of disabling
      a crtc, leading to:
      
      [   49.065364] Call trace:
      [   49.071441] [<ffffffc00041d5a0>] mdp5_ctl_blend+0x20/0x1c0
      [   49.073788] [<ffffffc00041ebcc>] mdp5_crtc_disable+0x3c/0xa8
      [   49.079348] [<ffffffc0003e7854>] disable_outputs.isra.4+0x11c/0x220
      [   49.085164] [<ffffffc0003e7afc>] drm_atomic_helper_commit_modeset_disables+0x14/0x38
      [   49.091155] [<ffffffc000425c80>] complete_commit+0x40/0xb8
      [   49.099136] [<ffffffc0004260ac>] msm_atomic_commit+0x364/0x398
      [   49.104430] [<ffffffc00040a614>] drm_atomic_commit+0x3c/0x70
      [   49.110249] [<ffffffc0003e67b8>] drm_atomic_helper_set_config+0x1b0/0x3e0
      [   49.116065] [<ffffffc0003f99bc>] drm_mode_set_config_internal+0x64/0xf8
      [   49.122746] [<ffffffc0003fa624>] drm_framebuffer_remove+0xe4/0x128
      [   49.129171] [<ffffffc0003feaf8>] drm_mode_rmfb+0xc0/0x100
      [   49.135420] [<ffffffc0003efba8>] drm_ioctl+0x258/0x4d0
      [   49.140889] [<ffffffc0001b0388>] do_vfs_ioctl+0x338/0x5d0
      [   49.145921] [<ffffffc0001b06a8>] SyS_ioctl+0x88/0xa0
      
      It makes no sense to free the ctl without disabling all stages, so lets
      just move them together to avoid the crash.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      e5989ee1
  17. 02 4月, 2015 4 次提交
    • H
      drm/msm/mdp5: Enable DSI connector in msm drm driver · d5af49c9
      Hai Li 提交于
      This change adds the support in mdp5 kms driver for single
      and dual DSI. Dual DSI case depends on the framework API
      and sequence change to support dual data path.
      
      v1: Initial change
      v2: Address Rob Clark's comment
      - Separate command mode encoder to a new file mdp5_cmd_encoder.c
      - Rebase to not depend on msm_drm_sub_dev change
      Signed-off-by: NHai Li <hali@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d5af49c9
    • S
      drm/msm/mdp5: Add START signal to kick off certain pipelines · 389b09a1
      Stephane Viau 提交于
      Some interfaces (WB, DSI Command Mode) need to be kicked off
      through a START Signal. This signal needs to be sent at the right
      time and requests in some cases to keep track of the pipeline
      status (eg: whether pipeline registers are flushed AND output WB
      buffers are ready, in case of WB interface).
      Signed-off-by: NStephane Viau <sviau@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      389b09a1
    • S
      drm/msm/mdp5: Enhance operation mode for pipeline configuration · d145dd78
      Stephane Viau 提交于
      DSI and WB interfaces need a more complex pipeline configuration
      than the current mdp5_ctl_set_intf().
      
      For example, memory output connections need to be selected for
      WB. Interface mode (Video vs. Command modes) also need to be
      configured for DSI.
      
      This change takes care of configuring the whole pipeline as far
      as operation mode goes. DSI and WB interfaces will be added
      later.
      
      v2: rename macro to mdp5_cfg_intf_is_virtual() [pointed by Archit]
      Signed-off-by: NStephane Viau <sviau@codeaurora.org>
      [Remove temp bisectability hack -Rob]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d145dd78
    • S
      drm/msm/mdp5: only flush on a CRTC ->atomic_flush() · a73f3382
      Stephane Viau 提交于
      MDP5 hardware has some limitation and requires to avoid flushing
      registers more than once between two Vblanks.
      
      This change removes all FLUSH operations (except for HW cursor)
      beside the one coming from a CRTC's ->atomic_flush().
      
      This avoid this type of behavior (eg: CRTC + 1 plane overlay):
      
      	[drm:mdp5_crtc_vblank_irq] vblank
      	[drm:mdp5_ctl_commit] flush (20048)   CTL + LM0 + RGB0
      	[drm:mdp5_ctl_commit] flush (20040)   CTL + LM0
      	[drm:mdp5_crtc_vblank_irq] blank
      	[drm:mdp5_ctl_commit] flush (20049)   CTL + LM0 + RGB0 + VIG0
      	[drm:mdp5_crtc_vblank_irq] blank
      
      and replaces it by:
      
      	[drm:mdp5_crtc_vblank_irq] vblank
      	[drm:mdp5_ctl_commit] flush (20048)   CTL + LM0 + RGB0
      	[drm:mdp5_crtc_vblank_irq] blank
      	[drm:mdp5_ctl_commit] flush (20049)   CTL + LM0 + RGB0 + VIG0
      	[drm:mdp5_crtc_vblank_irq] blank
      
      Only *one* FLUSH is called between Vblanks interrupts.
      Signed-off-by: NStephane Viau <sviau@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      a73f3382
  18. 05 3月, 2015 4 次提交
  19. 02 2月, 2015 3 次提交
  20. 19 12月, 2014 2 次提交
  21. 10 12月, 2014 1 次提交
  22. 27 11月, 2014 1 次提交