Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vc4-kms commits backported #3138

Merged
merged 6 commits into from
Aug 9, 2019
Merged

Commits on Aug 8, 2019

  1. drm/vc4: Fix TILE_Y_OFFSET definitions

    Y_OFFSET field starts at bit 8 not 7.
    
    Signed-off-by: Eric Anholt <[email protected]>
    Signed-off-by: Boris Brezillon <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    anholt authored and 6by9 committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    305aa0b View commit details
    Browse the repository at this point in the history
  2. drm/vc4: Define missing PITCH0_SINK_PIX field

    This is needed to support X/Y negative placement of planes using
    T-format buffers.
    
    Signed-off-by: Eric Anholt <[email protected]>
    Signed-off-by: Boris Brezillon <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    anholt authored and 6by9 committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    adce7de View commit details
    Browse the repository at this point in the history
  3. drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic

    drm_atomic_helper_check_plane_state() takes care of checking the
    scaling capabilities and calculating the clipped X/Y offsets for us.
    
    Rely on this function instead of open-coding the logic.
    
    Incidentally, it seems to fix a problem we had with negative X/Y
    positioning of YUV planes.
    
    Signed-off-by: Boris Brezillon <[email protected]>
    Reviewed-by: Eric Anholt <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Boris Brezillon authored and 6by9 committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    a079440 View commit details
    Browse the repository at this point in the history
  4. drm/vc4: Move ->offsets[] adjustment out of setup_clipping_and_scaling()

    The offset adjustment depends on the framebuffer modified, so let's
    just move this operation in the DRM_FORMAT_MOD_LINEAR case inside
    vc4_plane_mode_set().
    
    This we'll be able to fix offset calculation for
    DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED and DRM_FORMAT_MOD_BROADCOM_SANDXXX.
    
    Signed-off-by: Boris Brezillon <[email protected]>
    Reviewed-by: Eric Anholt <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Boris Brezillon authored and 6by9 committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    59212e5 View commit details
    Browse the repository at this point in the history
  5. drm/vc4: Fix X/Y positioning of planes using T_TILES modifier

    X/Y positioning of T-format buffers is quite tricky and the current
    implementation was failing to position a plane using this format
    correctly when the CRTC X, Y or both X and Y offsets were negative.
    It was also failing when the SRC X/Y offsets were != 0.
    
    Signed-off-by: Boris Brezillon <[email protected]>
    Reviewed-by: Eric Anholt <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Boris Brezillon authored and 6by9 committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    e625fb6 View commit details
    Browse the repository at this point in the history
  6. drm/vc4: Fix NULL pointer dereference in the async update path

    vc4_plane_atomic_async_update() calls vc4_plane_atomic_check()
    which in turn calls vc4_plane_setup_clipping_and_scaling(), and since
    commit 58a6a36 ("drm/vc4: Use
    drm_atomic_helper_check_plane_state() to simplify the logic"), this
    function accesses plane_state->state which will be NULL when called
    from the async update path because we're passing the current plane
    state, and plane_state->state has been assigned to NULL in
    drm_atomic_helper_swap_state().
    
    Pass the new state instead of the current one (the new state has
    ->state set to a non-NULL value).
    
    Fixes: 58a6a36 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic")
    Signed-off-by: Boris Brezillon <[email protected]>
    Reviewed-by: Eric Anholt <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Boris Brezillon authored and 6by9 committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    dd60dd7 View commit details
    Browse the repository at this point in the history