diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-05-04 04:27:49 -0400 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-06-02 03:57:25 -0400 |
| commit | eecad4371d986f38b66202817e2b461ac3c64139 (patch) | |
| tree | fc0b74c3f8f416db3c53f1bc8bf8e19a04dc6c88 /drivers/gpu/drm/omapdrm/omap_plane.c | |
| parent | 3e1d65cdf84f88affa718396a392f9f9a0d8a5f6 (diff) | |
drm/omap: remove omap_framebuffer_get_formats()
We now get a fourcc array from dispc when asking for a plane's supported
pixel formats, so we can drop omap_framebuffer_get_formats() which was
used to convert between DSS and DRM pixel formats.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_plane.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 40747a625374..96c15e6d7397 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
| @@ -34,9 +34,6 @@ struct omap_plane { | |||
| 34 | struct drm_plane base; | 34 | struct drm_plane base; |
| 35 | enum omap_plane_id id; | 35 | enum omap_plane_id id; |
| 36 | const char *name; | 36 | const char *name; |
| 37 | |||
| 38 | uint32_t nformats; | ||
| 39 | uint32_t formats[32]; | ||
| 40 | }; | 37 | }; |
| 41 | 38 | ||
| 42 | static int omap_plane_prepare_fb(struct drm_plane *plane, | 39 | static int omap_plane_prepare_fb(struct drm_plane *plane, |
| @@ -294,6 +291,8 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, | |||
| 294 | struct omap_plane *omap_plane; | 291 | struct omap_plane *omap_plane; |
| 295 | enum omap_plane_id id; | 292 | enum omap_plane_id id; |
| 296 | int ret; | 293 | int ret; |
| 294 | u32 nformats; | ||
| 295 | const u32 *formats; | ||
| 297 | 296 | ||
| 298 | if (WARN_ON(idx >= ARRAY_SIZE(plane_idx_to_id))) | 297 | if (WARN_ON(idx >= ARRAY_SIZE(plane_idx_to_id))) |
| 299 | return ERR_PTR(-EINVAL); | 298 | return ERR_PTR(-EINVAL); |
| @@ -306,17 +305,17 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, | |||
| 306 | if (!omap_plane) | 305 | if (!omap_plane) |
| 307 | return ERR_PTR(-ENOMEM); | 306 | return ERR_PTR(-ENOMEM); |
| 308 | 307 | ||
| 309 | omap_plane->nformats = omap_framebuffer_get_formats( | 308 | formats = priv->dispc_ops->ovl_get_color_modes(id); |
| 310 | omap_plane->formats, ARRAY_SIZE(omap_plane->formats), | 309 | for (nformats = 0; formats[nformats]; ++nformats) |
| 311 | priv->dispc_ops->ovl_get_color_modes(id)); | 310 | ; |
| 312 | omap_plane->id = id; | 311 | omap_plane->id = id; |
| 313 | omap_plane->name = plane_id_to_name[id]; | 312 | omap_plane->name = plane_id_to_name[id]; |
| 314 | 313 | ||
| 315 | plane = &omap_plane->base; | 314 | plane = &omap_plane->base; |
| 316 | 315 | ||
| 317 | ret = drm_universal_plane_init(dev, plane, possible_crtcs, | 316 | ret = drm_universal_plane_init(dev, plane, possible_crtcs, |
| 318 | &omap_plane_funcs, omap_plane->formats, | 317 | &omap_plane_funcs, formats, |
| 319 | omap_plane->nformats, type, NULL); | 318 | nformats, type, NULL); |
| 320 | if (ret < 0) | 319 | if (ret < 0) |
| 321 | goto error; | 320 | goto error; |
| 322 | 321 | ||
