Bläddra i källkod

drm/sun4i: Save newly created layer in layers array in sun4i_layers_init

sun4i_layers_init allocates an array to store pointers to newly created
layers returned by sun4i_layer_init_one(), but fails to actually store
them. But it actually returns the empty array to unsuspecting users.

Save the pointers in the array, so that they may be used later.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Chen-Yu Tsai 9 år sedan
förälder
incheckning
903795d60f
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      drivers/gpu/drm/sun4i/sun4i_layer.c

+ 1 - 0
drivers/gpu/drm/sun4i/sun4i_layer.c

@@ -183,6 +183,7 @@ struct sun4i_layer **sun4i_layers_init(struct drm_device *drm)
 				   SUN4I_BACKEND_ATTCTL_REG0_LAY_PIPESEL(plane->pipe));
 
 		layer->id = i;
+		layers[i] = layer;
 	};
 
 	return layers;