Skip to contentSkip to conversation

drm/udl: fix line iterator in damage handling

PATCH In review David Herrmann 2 participants 2 messages Sep 23, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/udl: fix line iterator in damage handling

The udl damage handler is supposed to render 'height' lines, but its iterator has an obvious typo that makes it miss most lines if the rectangle does not cover 0/0.

Fix the damage handler to correctly render all lines.

This is a fallout from:

commit e375882406d0cc24030746638592004755ed4ae0
Author: Noralf Trønnes <[email protected]>
Date: Thu Apr 28 17:18:37 2016 +0200

drm/udl: Use drm_fb_helper deferred_io support

---
 drivers/gpu/drm/udl/udl_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/udl/udl_fb.c +1 -1
index 9688bfa..611b6b9 100644
@@ -122,7 +122,7 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
 		return 0;
 	cmd = urb->transfer_buffer;
 
-	for (i = y; i < height ; i++) {
+	for (i = y; i < y + height ; i++) {
 		const int line_offset = fb->base.pitches[0] * i;
 		const int byte_offset = line_offset + (x * bpp);
 		const int dev_byte_offset = (fb->base.width * bpp * i) + (x * bpp);
Signature · 6 lines
2.10.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · David Herrmann

The udl damage handler is supposed to render 'height' lines, but its iterator has an obvious typo that makes it miss most lines if the rectangle does not cover 0/0.

Fix the damage handler to correctly render all lines.

This is a fallout from:

commit e375882406d0cc24030746638592004755ed4ae0
Author: Noralf Trønnes <[email protected]>
Date: Thu Apr 28 17:18:37 2016 +0200

Quoted 5 lines

drm/udl: Use drm_fb_helper deferred_io support

Quoted 19 lines
---
 drivers/gpu/drm/udl/udl_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/udl/udl_fb.c +1 -1
index 9688bfa..611b6b9 100644
@@ -122,7 +122,7 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
 		return 0;
 	cmd = urb->transfer_buffer;
 
-	for (i = y; i < height ; i++) {
+	for (i = y; i < y + height ; i++) {
 		const int line_offset = fb->base.pitches[0] * i;
 		const int byte_offset = line_offset + (x * bpp);
 		const int dev_byte_offset = (fb->base.width * bpp * i) + (x * bpp);
Signature · 1 line
2.10.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel