All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/udl: fix line iterator in damage handling
@ 2016-09-23 10:36 David Herrmann
  2016-09-23 12:52 ` Eric Engestrom
  0 siblings, 1 reply; 2+ messages in thread
From: David Herrmann @ 2016-09-23 10:36 UTC (permalink / raw)
  To: dri-devel; +Cc: Jani Nikula, Daniel Vetter, poma

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 <noralf@tronnes.org>
    Date:   Thu Apr 28 17:18:37 2016 +0200

        drm/udl: Use drm_fb_helper deferred_io support

Tested-by: poma <poma@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
 drivers/gpu/drm/udl/udl_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index 9688bfa..611b6b9 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -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);
-- 
2.10.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/udl: fix line iterator in damage handling
  2016-09-23 10:36 [PATCH] drm/udl: fix line iterator in damage handling David Herrmann
@ 2016-09-23 12:52 ` Eric Engestrom
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Engestrom @ 2016-09-23 12:52 UTC (permalink / raw)
  To: David Herrmann; +Cc: Jani Nikula, Daniel Vetter, poma, dri-devel

On Fri, Sep 23, 2016 at 12:36:02PM +0200, David Herrmann wrote:
> 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 <noralf@tronnes.org>
>     Date:   Thu Apr 28 17:18:37 2016 +0200
> 
>         drm/udl: Use drm_fb_helper deferred_io support
> 
> Tested-by: poma <poma@gmail.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>

> ---
>  drivers/gpu/drm/udl/udl_fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
> index 9688bfa..611b6b9 100644
> --- a/drivers/gpu/drm/udl/udl_fb.c
> +++ b/drivers/gpu/drm/udl/udl_fb.c
> @@ -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);
> -- 
> 2.10.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-23 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 10:36 [PATCH] drm/udl: fix line iterator in damage handling David Herrmann
2016-09-23 12:52 ` Eric Engestrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.