]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/msm/dpu: drop EAGAIN check from dpu_format_populate_layout
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 16 Mar 2023 16:16:25 +0000 (19:16 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 6 Apr 2023 17:29:41 +0000 (20:29 +0300)
The pipe's layout is not cached, corresponding data structure is zeroed
out each time in the dpu_plane_sspp_atomic_update(), right before the
call to _dpu_plane_set_scanout() -> dpu_format_populate_layout().

Drop plane_addr comparison against previous layout and corresponding
EAGAIN handling.

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/527314/
Link: https://lore.kernel.org/r/20230316161653.4106395-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

index 1e9658537a65b0cf3d8361d4478e6b833b95ed1b..e366ab134249f2d3891fb48875ecd39ee38ad3dd 100644 (file)
@@ -929,8 +929,7 @@ int dpu_format_populate_layout(
                struct drm_framebuffer *fb,
                struct dpu_hw_fmt_layout *layout)
 {
-       uint32_t plane_addr[DPU_MAX_PLANES];
-       int i, ret;
+       int ret;
 
        if (!fb || !layout) {
                DRM_ERROR("invalid arguments\n");
@@ -951,9 +950,6 @@ int dpu_format_populate_layout(
        if (ret)
                return ret;
 
-       for (i = 0; i < DPU_MAX_PLANES; ++i)
-               plane_addr[i] = layout->plane_addr[i];
-
        /* Populate the addresses given the fb */
        if (DPU_FORMAT_IS_UBWC(layout->format) ||
                        DPU_FORMAT_IS_TILE(layout->format))
@@ -961,10 +957,6 @@ int dpu_format_populate_layout(
        else
                ret = _dpu_format_populate_addrs_linear(aspace, fb, layout);
 
-       /* check if anything changed */
-       if (!ret && !memcmp(plane_addr, layout->plane_addr, sizeof(plane_addr)))
-               ret = -EAGAIN;
-
        return ret;
 }
 
index 33bb600efde5cb8331bb851d9b18e75ad9a27bb0..b91c99f058024f8f5e46f551e8670f18aef3a4ea 100644 (file)
@@ -477,9 +477,7 @@ static void _dpu_plane_set_scanout(struct drm_plane *plane,
        int ret;
 
        ret = dpu_format_populate_layout(aspace, fb, &pipe_cfg->layout);
-       if (ret == -EAGAIN)
-               DPU_DEBUG_PLANE(pdpu, "not updating same src addrs\n");
-       else if (ret)
+       if (ret)
                DPU_ERROR_PLANE(pdpu, "failed to get format layout, %d\n", ret);
        else if (pdpu->pipe_hw->ops.setup_sourceaddress) {
                trace_dpu_plane_set_scanout(pdpu->pipe_hw->idx,