On 2023/7/11 0:46, Shengyu Qu wrote: > Hello Keith, >> + >> +static void vs_plane_atomic_update(struct drm_plane *plane, >> + struct drm_atomic_state *state) >> +{ >> + struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, >> + plane); >> + unsigned char i, num_planes; >> + struct drm_framebuffer *fb; >> + struct vs_plane *vs_plane = to_vs_plane(plane); >> + //struct drm_plane_state *state = plane->state; >> + struct vs_crtc *vs_crtc = to_vs_crtc(new_state->crtc); >> + struct vs_plane_state *plane_state = to_vs_plane_state(new_state); >> + //struct drm_format_name_buf *name = &plane_state->status.format_name; >> + >> + if (!new_state->fb || !new_state->crtc) >> + return; >> + >> + fb = new_state->fb; >> + >> + num_planes = vs_get_plane_number(fb); >> + >> + for (i = 0; i < num_planes; i++) { >> + struct vs_gem_object *vs_obj; >> + >> + vs_obj = vs_fb_get_gem_obj(fb, i); >> + vs_plane->dma_addr[i] = vs_obj->iova + fb->offsets[i]; > > There is a dcache flush operation here in downstream driver. Is that a cache coherence problem? > > Best regards, > > Shengyu > >> + } >> + >> + plane_state->status.src = drm_plane_state_src(new_state); >> + plane_state->status.dest = drm_plane_state_dest(new_state); >> + >> + vs_plane->funcs->update(vs_crtc->dev, vs_plane, plane, state); >> +} >>yes , You can find that the current situation is very professional. This problem exists at present, but the dma interface is not perfect at now, and the dma_sync_single_for_device interface needs to be implemented later. I will consider repairing this problem in the form of patch