@@ -145,7 +145,7 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
{
struct drm_device *dev = fb->base.dev;
struct udl_device *udl = dev->dev_private;
- int i, ret;
+ int i, ret = 0;
char *cmd;
cycles_t start_cycles, end_cycles;
int bytes_sent = 0;
@@ -189,11 +189,14 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
const int line_offset = fb->base.pitches[0] * i;
const int byte_offset = line_offset + (x * bpp);
- if (udl_render_hline(dev, bpp, &urb,
+ ret = udl_render_hline(dev, bpp, &urb,
(char *) fb->obj->vmapping,
&cmd, byte_offset, width * bpp,
- &bytes_identical, &bytes_sent))
+ &bytes_identical, &bytes_sent);
+ if (ret == 1) {
+ ret = -EAGAIN;
goto error;
+ }
}
if (cmd > (char *) urb->transfer_buffer) {
@@ -213,7 +216,7 @@ error:
>> 10)), /* Kcycles */
&udl->cpu_kcycles_used);
- return 0;
+ return ret;
}
static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)