diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-05-29 04:03:15 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-06-12 15:52:51 -0400 |
commit | d9157dfd045f27f376edeab164203f1a68ba3ba4 (patch) | |
tree | 56602c5bcc9c44954d15e61e96ade1a3268957eb /drivers/gpu/drm/omapdrm/omap_plane.c | |
parent | 0dce4d75c3fc585387fbfc7ab2126118d86bf0f9 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_plane.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 448707669690..a8e617f9f2af 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
@@ -58,12 +58,11 @@ to_omap_plane_state(struct drm_plane_state *state) | |||
58 | return container_of(state, struct omap_plane_state, base); | 58 | return container_of(state, struct omap_plane_state, base); |
59 | } | 59 | } |
60 | 60 | ||
61 | static int omap_plane_setup(struct drm_plane *plane) | 61 | static void omap_plane_setup(struct drm_plane *plane) |
62 | { | 62 | { |
63 | struct omap_plane *omap_plane = to_omap_plane(plane); | 63 | struct omap_plane *omap_plane = to_omap_plane(plane); |
64 | struct drm_plane_state *state = plane->state; | 64 | struct drm_plane_state *state = plane->state; |
65 | struct omap_plane_state *omap_state = to_omap_plane_state(state); | 65 | struct omap_plane_state *omap_state = to_omap_plane_state(state); |
66 | struct drm_device *dev = plane->dev; | ||
67 | struct omap_overlay_info info; | 66 | struct omap_overlay_info info; |
68 | struct omap_drm_window win; | 67 | struct omap_drm_window win; |
69 | int ret; | 68 | int ret; |
@@ -72,7 +71,7 @@ static int omap_plane_setup(struct drm_plane *plane) | |||
72 | 71 | ||
73 | if (!state->crtc) { | 72 | if (!state->crtc) { |
74 | dispc_ovl_enable(omap_plane->id, false); | 73 | dispc_ovl_enable(omap_plane->id, false); |
75 | return 0; | 74 | return; |
76 | } | 75 | } |
77 | 76 | ||
78 | memset(&info, 0, sizeof(info)); | 77 | memset(&info, 0, sizeof(info)); |
@@ -123,14 +122,10 @@ static int omap_plane_setup(struct drm_plane *plane) | |||
123 | /* and finally, update omapdss: */ | 122 | /* and finally, update omapdss: */ |
124 | ret = dispc_ovl_setup(omap_plane->id, &info, false, | 123 | ret = dispc_ovl_setup(omap_plane->id, &info, false, |
125 | omap_crtc_timings(state->crtc), false); | 124 | omap_crtc_timings(state->crtc), false); |
126 | if (ret) { | 125 | if (WARN_ON(ret)) |
127 | dev_err(dev->dev, "dispc_ovl_setup failed: %d\n", ret); | 126 | return; |
128 | return ret; | ||
129 | } | ||
130 | 127 | ||
131 | dispc_ovl_enable(omap_plane->id, true); | 128 | dispc_ovl_enable(omap_plane->id, true); |
132 | |||
133 | return 0; | ||
134 | } | 129 | } |
135 | 130 | ||
136 | static int omap_plane_prepare_fb(struct drm_plane *plane, | 131 | static int omap_plane_prepare_fb(struct drm_plane *plane, |