summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
diff options
context:
space:
mode:
authorLowry Li (Arm Technology China) <Lowry.Li@arm.com>2019-05-20 06:33:19 +0300
committerLiviu Dudau <Liviu.Dudau@arm.com>2019-06-19 13:42:17 +0300
commit109bd7d5f4c2db66541272e5a41aeabd6cfeef95 (patch)
tree172ac92b83c79be133915461c1b9e9ed6be87929 /drivers/gpu/drm/arm/display/komeda/komeda_plane.c
parent04e84545b9805f6a141fce0b1f05fb74551094fc (diff)
downloadlinux-109bd7d5f4c2db66541272e5a41aeabd6cfeef95.tar.xz
drm/komeda: Adds zorder support
- Creates the zpos property. - Implement komeda_crtc_normalize_zpos to replace drm_atomic_normalize_zpos, reasons as the following: 1. The drm_atomic_normalize_zpos allows to configure same zpos for different planes, but komeda doesn't support such configuration. 2. For further slave pipline case, Komeda need to calculate the max_slave_zorder, we will merge such calculation into komed_crtc_normalize_zpos to save a separated plane_state loop. 3. For feature none-scaling layer_split, which a plane_state will be assigned to two individual layers(left/right), which requires two normalize_zpos for this plane, plane_st->normalize_zpos will be used by left layer, normalize_zpos + 1 for right_layer. This patch series depends on: - https://patchwork.freedesktop.org/series/58710/ - https://patchwork.freedesktop.org/series/59000/ - https://patchwork.freedesktop.org/series/59002/ - https://patchwork.freedesktop.org/series/59747/ - https://patchwork.freedesktop.org/series/59915/ - https://patchwork.freedesktop.org/series/60083/ - https://patchwork.freedesktop.org/series/60698/ Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm/display/komeda/komeda_plane.c')
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_plane.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
index 9e049ee9014a..c0e381cee524 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
@@ -22,7 +22,7 @@ komeda_plane_init_data_flow(struct drm_plane_state *st,
memset(dflow, 0, sizeof(*dflow));
- dflow->blending_zorder = st->zpos;
+ dflow->blending_zorder = st->normalized_zpos;
/* if format doesn't have alpha, fix blend mode to PIXEL_NONE */
dflow->pixel_blend_mode = fb->format->has_alpha ?
@@ -345,6 +345,10 @@ static int komeda_plane_add(struct komeda_kms_dev *kms,
if (err)
goto cleanup;
+ err = drm_plane_create_zpos_property(plane, layer->base.id, 0, 8);
+ if (err)
+ goto cleanup;
+
return 0;
cleanup:
komeda_plane_destroy(plane);