Skip to content

Commit bfe9276

Browse files
6by9pelwell
authored andcommitted
drm/vc4: Fix atomic_async_check to call the right mode_set function
vc4_plane_atomic_async_check was always calling vc4_plane_mode_set to validate and generate the dlist for the check. If async_check decided it had to fall back to a sync commit, then this GEN4/5 dlist could get used on GEN6. Call either vc4_plane_mode_set or vc6_plane_mode_set as appropriate. Fixes: 1ab1fbb ("drm/vc4: hvs: Support BCM2712 HVS") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent a14da0f commit bfe9276

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -2194,11 +2194,15 @@ static int vc4_plane_atomic_async_check(struct drm_plane *plane,
21942194
{
21952195
struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
21962196
plane);
2197+
struct vc4_dev *vc4 = to_vc4_dev(plane->dev);
21972198
struct vc4_plane_state *old_vc4_state, *new_vc4_state;
21982199
int ret;
21992200
u32 i;
22002201

2201-
ret = vc4_plane_mode_set(plane, new_plane_state);
2202+
if (vc4->gen >= VC4_GEN_6)
2203+
ret = vc6_plane_mode_set(plane, new_plane_state);
2204+
else
2205+
ret = vc4_plane_mode_set(plane, new_plane_state);
22022206
if (ret)
22032207
return ret;
22042208

0 commit comments

Comments
 (0)