@@ -1118,32 +1118,34 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
11181118}
11191119
11201120static void vc4_plane_atomic_async_update (struct drm_plane * plane ,
1121- struct drm_plane_state * state )
1121+ struct drm_atomic_state * state )
11221122{
1123+ struct drm_plane_state * new_plane_state = drm_atomic_get_new_plane_state (state ,
1124+ plane );
11231125 struct vc4_plane_state * vc4_state , * new_vc4_state ;
11241126
1125- swap (plane -> state -> fb , state -> fb );
1126- plane -> state -> crtc_x = state -> crtc_x ;
1127- plane -> state -> crtc_y = state -> crtc_y ;
1128- plane -> state -> crtc_w = state -> crtc_w ;
1129- plane -> state -> crtc_h = state -> crtc_h ;
1130- plane -> state -> src_x = state -> src_x ;
1131- plane -> state -> src_y = state -> src_y ;
1132- plane -> state -> src_w = state -> src_w ;
1133- plane -> state -> src_h = state -> src_h ;
1134- plane -> state -> src_h = state -> src_h ;
1135- plane -> state -> alpha = state -> alpha ;
1136- plane -> state -> pixel_blend_mode = state -> pixel_blend_mode ;
1137- plane -> state -> rotation = state -> rotation ;
1138- plane -> state -> zpos = state -> zpos ;
1139- plane -> state -> normalized_zpos = state -> normalized_zpos ;
1140- plane -> state -> color_encoding = state -> color_encoding ;
1141- plane -> state -> color_range = state -> color_range ;
1142- plane -> state -> src = state -> src ;
1143- plane -> state -> dst = state -> dst ;
1144- plane -> state -> visible = state -> visible ;
1145-
1146- new_vc4_state = to_vc4_plane_state (state );
1127+ swap (plane -> state -> fb , new_plane_state -> fb );
1128+ plane -> state -> crtc_x = new_plane_state -> crtc_x ;
1129+ plane -> state -> crtc_y = new_plane_state -> crtc_y ;
1130+ plane -> state -> crtc_w = new_plane_state -> crtc_w ;
1131+ plane -> state -> crtc_h = new_plane_state -> crtc_h ;
1132+ plane -> state -> src_x = new_plane_state -> src_x ;
1133+ plane -> state -> src_y = new_plane_state -> src_y ;
1134+ plane -> state -> src_w = new_plane_state -> src_w ;
1135+ plane -> state -> src_h = new_plane_state -> src_h ;
1136+ plane -> state -> src_h = new_plane_state -> src_h ;
1137+ plane -> state -> alpha = new_plane_state -> alpha ;
1138+ plane -> state -> pixel_blend_mode = new_plane_state -> pixel_blend_mode ;
1139+ plane -> state -> rotation = new_plane_state -> rotation ;
1140+ plane -> state -> zpos = new_plane_state -> zpos ;
1141+ plane -> state -> normalized_zpos = new_plane_state -> normalized_zpos ;
1142+ plane -> state -> color_encoding = new_plane_state -> color_encoding ;
1143+ plane -> state -> color_range = new_plane_state -> color_range ;
1144+ plane -> state -> src = new_plane_state -> src ;
1145+ plane -> state -> dst = new_plane_state -> dst ;
1146+ plane -> state -> visible = new_plane_state -> visible ;
1147+
1148+ new_vc4_state = to_vc4_plane_state (new_plane_state );
11471149 vc4_state = to_vc4_plane_state (plane -> state );
11481150
11491151 vc4_state -> crtc_x = new_vc4_state -> crtc_x ;
@@ -1187,23 +1189,25 @@ static void vc4_plane_atomic_async_update(struct drm_plane *plane,
11871189}
11881190
11891191static int vc4_plane_atomic_async_check (struct drm_plane * plane ,
1190- struct drm_plane_state * state )
1192+ struct drm_atomic_state * state )
11911193{
1194+ struct drm_plane_state * new_plane_state = drm_atomic_get_new_plane_state (state ,
1195+ plane );
11921196 struct vc4_plane_state * old_vc4_state , * new_vc4_state ;
11931197 int ret ;
11941198 u32 i ;
11951199
1196- ret = vc4_plane_mode_set (plane , state );
1200+ ret = vc4_plane_mode_set (plane , new_plane_state );
11971201 if (ret )
11981202 return ret ;
11991203
12001204 old_vc4_state = to_vc4_plane_state (plane -> state );
1201- new_vc4_state = to_vc4_plane_state (state );
1205+ new_vc4_state = to_vc4_plane_state (new_plane_state );
12021206 if (old_vc4_state -> dlist_count != new_vc4_state -> dlist_count ||
12031207 old_vc4_state -> pos0_offset != new_vc4_state -> pos0_offset ||
12041208 old_vc4_state -> pos2_offset != new_vc4_state -> pos2_offset ||
12051209 old_vc4_state -> ptr0_offset != new_vc4_state -> ptr0_offset ||
1206- vc4_lbm_size (plane -> state ) != vc4_lbm_size (state ))
1210+ vc4_lbm_size (plane -> state ) != vc4_lbm_size (new_plane_state ))
12071211 return - EINVAL ;
12081212
12091213 /* Only pos0, pos2 and ptr0 DWORDS can be updated in an async update
0 commit comments