On 2/9/2022 9:25 AM, Dmitry Baryshkov wrote:
Since layout is not cached anymore, drop comparison against previous
layout and corresponding EAGAIN handling.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
Isnt this preventing the usermode from programming the same address again?
I thought that this check is good in that way and has nothing to do with
the caching as such.
So its the other way around, by caching we are ensuring that we dont get
a new frame update for just updating the same src address.
---
drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 4 ----
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 5 +----
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c
index 440ae93d7bd1..5c7d739143f0 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c
@@ -927,10 +927,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;
}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index a521c0681af6..b2395f02f6d3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1061,10 +1061,7 @@ static void dpu_plane_sspp_atomic_update(struct drm_plane *plane)
memset(&pipe_cfg, 0, sizeof(struct dpu_hw_pipe_cfg));
ret = dpu_format_populate_layout(aspace, fb, &layout);
- if (ret == -EAGAIN) {
- DPU_DEBUG_PLANE(pdpu, "not updating same src addrs\n");
- update_src_addr = false;
- } else if (ret) {
+ if (ret) {
DPU_ERROR_PLANE(pdpu, "failed to get format layout, %d\n", ret);
update_src_addr = false;
}