Skip to content

Commit 98c4ece

Browse files
committed
drm: xlnx: zynqmp_dpsub: Pass format info to zynqmp_disp_layer_set_format()
The zynqmp_disp_layer_set_format() function only needs format information, not a full plane state. Get the necessary info from the plane state in the caller and pass it to zynqmp_disp_layer_set_format(). This prepares for calling the function from non-DRM code. This doesn't introduce any functional change. Signed-off-by: Laurent Pinchart <[email protected]>
1 parent 457d718 commit 98c4ece

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/gpu/drm/xlnx/zynqmp_disp.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,15 +1037,13 @@ static void zynqmp_disp_layer_disable(struct zynqmp_disp_layer *layer)
10371037
/**
10381038
* zynqmp_disp_layer_set_format - Set the layer format
10391039
* @layer: The layer
1040-
* @state: The plane state
1040+
* @info: The format info
10411041
*
1042-
* Set the format for @layer based on @state->fb->format. The layer must be
1043-
* disabled.
1042+
* Set the format for @layer to @info. The layer must be disabled.
10441043
*/
10451044
static void zynqmp_disp_layer_set_format(struct zynqmp_disp_layer *layer,
1046-
struct drm_plane_state *state)
1045+
const struct drm_format_info *info)
10471046
{
1048-
const struct drm_format_info *info = state->fb->format;
10491047
unsigned int i;
10501048

10511049
layer->disp_fmt = zynqmp_disp_layer_find_format(layer, info->format);
@@ -1190,7 +1188,7 @@ zynqmp_disp_plane_atomic_update(struct drm_plane *plane,
11901188
if (old_state->fb)
11911189
zynqmp_disp_layer_disable(layer);
11921190

1193-
zynqmp_disp_layer_set_format(layer, new_state);
1191+
zynqmp_disp_layer_set_format(layer, new_state->fb->format);
11941192
}
11951193

11961194
zynqmp_disp_layer_update(layer, new_state);

0 commit comments

Comments
 (0)