diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index e2e935813cc4..932e96b75528 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c | |||
| @@ -178,8 +178,10 @@ cleanup: | |||
| 178 | static int omap_modeset_init_properties(struct drm_device *dev) | 178 | static int omap_modeset_init_properties(struct drm_device *dev) |
| 179 | { | 179 | { |
| 180 | struct omap_drm_private *priv = dev->dev_private; | 180 | struct omap_drm_private *priv = dev->dev_private; |
| 181 | unsigned int num_planes = priv->dispc_ops->get_num_ovls(); | ||
| 181 | 182 | ||
| 182 | priv->zorder_prop = drm_property_create_range(dev, 0, "zorder", 0, 3); | 183 | priv->zorder_prop = drm_property_create_range(dev, 0, "zorder", 0, |
| 184 | num_planes - 1); | ||
| 183 | if (!priv->zorder_prop) | 185 | if (!priv->zorder_prop) |
| 184 | return -ENOMEM; | 186 | return -ENOMEM; |
| 185 | 187 | ||
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 334ee431c981..a55e7db7e445 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
| @@ -291,6 +291,7 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, | |||
| 291 | u32 possible_crtcs) | 291 | u32 possible_crtcs) |
| 292 | { | 292 | { |
| 293 | struct omap_drm_private *priv = dev->dev_private; | 293 | struct omap_drm_private *priv = dev->dev_private; |
| 294 | unsigned int num_planes = priv->dispc_ops->get_num_ovls(); | ||
| 294 | struct drm_plane *plane; | 295 | struct drm_plane *plane; |
| 295 | struct omap_plane *omap_plane; | 296 | struct omap_plane *omap_plane; |
| 296 | enum omap_plane_id id; | 297 | enum omap_plane_id id; |
| @@ -324,6 +325,7 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, | |||
| 324 | drm_plane_helper_add(plane, &omap_plane_helper_funcs); | 325 | drm_plane_helper_add(plane, &omap_plane_helper_funcs); |
| 325 | 326 | ||
| 326 | omap_plane_install_properties(plane, &plane->base); | 327 | omap_plane_install_properties(plane, &plane->base); |
| 328 | drm_plane_create_zpos_property(plane, 0, 0, num_planes - 1); | ||
| 327 | 329 | ||
| 328 | return plane; | 330 | return plane; |
| 329 | 331 | ||
