mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
drm: omapdrm: omap_plane_setup() cannot fail, use WARN
With atomic modesetting, omap_plane_setup()'s return value is ignored as the functions using it cannot fail. dispc_ovl_setup(), called by omap_plane_setup(), can fail (but shouldn't). Instead of returning an error from omap_plane_setup() which gets ignored, return void and use WARN if dispc_ovl_setup() fails. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
0dce4d75c3
commit
d9157dfd04
@ -58,12 +58,11 @@ to_omap_plane_state(struct drm_plane_state *state)
|
|||||||
return container_of(state, struct omap_plane_state, base);
|
return container_of(state, struct omap_plane_state, base);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int omap_plane_setup(struct drm_plane *plane)
|
static void omap_plane_setup(struct drm_plane *plane)
|
||||||
{
|
{
|
||||||
struct omap_plane *omap_plane = to_omap_plane(plane);
|
struct omap_plane *omap_plane = to_omap_plane(plane);
|
||||||
struct drm_plane_state *state = plane->state;
|
struct drm_plane_state *state = plane->state;
|
||||||
struct omap_plane_state *omap_state = to_omap_plane_state(state);
|
struct omap_plane_state *omap_state = to_omap_plane_state(state);
|
||||||
struct drm_device *dev = plane->dev;
|
|
||||||
struct omap_overlay_info info;
|
struct omap_overlay_info info;
|
||||||
struct omap_drm_window win;
|
struct omap_drm_window win;
|
||||||
int ret;
|
int ret;
|
||||||
@ -72,7 +71,7 @@ static int omap_plane_setup(struct drm_plane *plane)
|
|||||||
|
|
||||||
if (!state->crtc) {
|
if (!state->crtc) {
|
||||||
dispc_ovl_enable(omap_plane->id, false);
|
dispc_ovl_enable(omap_plane->id, false);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
@ -123,14 +122,10 @@ static int omap_plane_setup(struct drm_plane *plane)
|
|||||||
/* and finally, update omapdss: */
|
/* and finally, update omapdss: */
|
||||||
ret = dispc_ovl_setup(omap_plane->id, &info, false,
|
ret = dispc_ovl_setup(omap_plane->id, &info, false,
|
||||||
omap_crtc_timings(state->crtc), false);
|
omap_crtc_timings(state->crtc), false);
|
||||||
if (ret) {
|
if (WARN_ON(ret))
|
||||||
dev_err(dev->dev, "dispc_ovl_setup failed: %d\n", ret);
|
return;
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
dispc_ovl_enable(omap_plane->id, true);
|
dispc_ovl_enable(omap_plane->id, true);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int omap_plane_prepare_fb(struct drm_plane *plane,
|
static int omap_plane_prepare_fb(struct drm_plane *plane,
|
||||||
|
Loading…
Reference in New Issue
Block a user