diff mbox

[2/2] drm/udl: fix excessive prefetch_range

Message ID 1422468930-20592-2-git-send-email-hshi@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Haixia Shi Jan. 28, 2015, 6:15 p.m. UTC
The prefetch_range amount is already in number of bytes. Multiplying again by
bpp is unnecessary.

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Haixia Shi <hshi@chromium.org>
---
 drivers/gpu/drm/udl/udl_transfer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson Jan. 28, 2015, 8:56 p.m. UTC | #1
On Wed, Jan 28, 2015 at 10:15:30AM -0800, Haixia Shi wrote:
> The prefetch_range amount is already in number of bytes. Multiplying again by
> bpp is unnecessary.
> 
> Signed-off-by: Haixia Shi <hshi@chromium.org>
> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
> Tested-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/udl/udl_transfer.c b/drivers/gpu/drm/udl/udl_transfer.c
index eadddf9..91e4ae2 100644
--- a/drivers/gpu/drm/udl/udl_transfer.c
+++ b/drivers/gpu/drm/udl/udl_transfer.c
@@ -156,7 +156,7 @@  static void udl_compress_hline16(
 			min((int)(pixel_end - pixel) / bpp,
 			    (int)(cmd_buffer_end - cmd) / 2))) * bpp;
 
-		prefetch_range((void *) pixel, (cmd_pixel_end - pixel) * bpp);
+		prefetch_range((void *) pixel, cmd_pixel_end - pixel);
 		pixel_val16 = get_pixel_val16(pixel, bpp);
 
 		while (pixel < cmd_pixel_end) {