summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 84d9bba)
raw | patch | inline | side by side (parent: 84d9bba)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Tue, 28 Apr 2015 11:01:35 +0000 (14:01 +0300) | ||
committer | Jyri Sarha <jsarha@ti.com> | |
Thu, 30 Apr 2015 07:19:46 +0000 (10:19 +0300) |
omap_framebuffer_unpin() check the return value of omap_gem_put_paddr()
and return immediately if omap_gem_put_paddr() fails.
This patch removes the check for the return value, and also removes the
return value of omap_framebuffer_unpin(), because:
* Nothing checks the return value of omap_framebuffer_unpin(), and even
something did check it, there's nothing the caller can do to handle
the error.
* If a omap_gem_put_paddr() fails, the framebuffer's other planes will
be left unreleased. So it's better to call omap_gem_put_paddr() for
all the planes, even if one would fail.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Karthik Ramanan <karthik.ramanan@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
and return immediately if omap_gem_put_paddr() fails.
This patch removes the check for the return value, and also removes the
return value of omap_framebuffer_unpin(), because:
* Nothing checks the return value of omap_framebuffer_unpin(), and even
something did check it, there's nothing the caller can do to handle
the error.
* If a omap_gem_put_paddr() fails, the framebuffer's other planes will
be left unreleased. So it's better to call omap_gem_put_paddr() for
all the planes, even if one would fail.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Karthik Ramanan <karthik.ramanan@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drivers/gpu/drm/omapdrm/omap_drv.h | patch | blob | history | |
drivers/gpu/drm/omapdrm/omap_fb.c | patch | blob | history |
index 2ab710a26a79febd46888f46afbdbe090a50999e..d62eebd49e82250b13fb38498a3bfcd0d4d10eaf 100644 (file)
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p);
int omap_framebuffer_pin(struct drm_framebuffer *fb);
-int omap_framebuffer_unpin(struct drm_framebuffer *fb);
+void omap_framebuffer_unpin(struct drm_framebuffer *fb);
void omap_framebuffer_update_scanout(struct drm_framebuffer *fb,
struct omap_drm_window *win, struct omap_overlay_info *info);
struct drm_connector *omap_framebuffer_get_next_connector(
index aa3f1b3fd36cb58a922b56b37aa6be9f41a047b9..ab626d8ef3cc65a9aaf0d811e01ad5fd0c37830a 100644 (file)
}
/* unpin, no longer being scanned out: */
-int omap_framebuffer_unpin(struct drm_framebuffer *fb)
+void omap_framebuffer_unpin(struct drm_framebuffer *fb)
{
struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb);
- int ret, i, n = drm_format_num_planes(fb->pixel_format);
+ int i, n = drm_format_num_planes(fb->pixel_format);
omap_fb->pin_count--;
if (omap_fb->pin_count > 0)
- return 0;
+ return;
for (i = 0; i < n; i++) {
struct plane *plane = &omap_fb->planes[i];
- ret = omap_gem_put_paddr(plane->bo);
- if (ret)
- goto fail;
+ omap_gem_put_paddr(plane->bo);
plane->paddr = 0;
}
-
- return 0;
-
-fail:
- return ret;
}
struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p)