Skip to content

Commit

Permalink
drm/sun4i: backend: Set a default zpos in our reset hook
Browse files Browse the repository at this point in the history
The plane state zpos value will be set only if there's an existing state
attached to the plane when creating the property.

However, this is not the case during the probe, and we therefore need to
put our default value in our reset hook.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b6a183234f0ad5a9a58c780c9cabbe29cbf40888.1516617243.git-series.maxime.ripard@free-electrons.com
  • Loading branch information
Maxime Ripard committed Jan 29, 2018
1 parent 098b338 commit 2bebcc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/sun4i/sun4i_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct sun4i_plane_desc {

static void sun4i_backend_layer_reset(struct drm_plane *plane)
{
struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
struct sun4i_layer_state *state;

if (plane->state) {
Expand All @@ -43,6 +44,7 @@ static void sun4i_backend_layer_reset(struct drm_plane *plane)
if (state) {
plane->state = &state->state;
plane->state->plane = plane;
plane->state->zpos = layer->id;
}
}

Expand Down

0 comments on commit 2bebcc4

Please sign in to comment.