From patchwork Wed Jan 28 21:41:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haixia Shi X-Patchwork-Id: 5731371 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA90A9F38B for ; Wed, 28 Jan 2015 21:41:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3F22201DD for ; Wed, 28 Jan 2015 21:41:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1FC292018E for ; Wed, 28 Jan 2015 21:41:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B8426E5E0; Wed, 28 Jan 2015 13:41:22 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by gabe.freedesktop.org (Postfix) with ESMTP id D511E6E5E0 for ; Wed, 28 Jan 2015 13:41:20 -0800 (PST) Received: by mail-ie0-f178.google.com with SMTP id rp18so25413401iec.9 for ; Wed, 28 Jan 2015 13:41:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eZ75o2EMZQElV2h8Hb5E1KUIoHQucR77GOhBQbo0QuM=; b=hjE5NlqoTLTQBZ33l9bjku2CBJ3zHXZpiH/pEO6DDmJbZv54QA/RatJgkjVeaDYfWV TokiTLYHvOkJw44FDiZw5xDmgGw+6Y3yg3ndDssQ/k8+5mvNR/kcMF60eTvpCSbrZFc0 LEujaG5CGgzBuSF0z8xoSiAQYCOFXOk0N20O0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eZ75o2EMZQElV2h8Hb5E1KUIoHQucR77GOhBQbo0QuM=; b=JRENCUZSwcuwRtvi0LsheXYo3uMfx+a7OlUR10rUL3/SEEz4zglrBpfYXnblT+EQY7 hcWd4bwe7UIao09e0LkwqsZ7jYEe2em0gy6FLhRtfny93NFadkshTHuohFiH4kwHgOC2 InDW/7wrinwCXeKl0zp1XEcjkRgiFtXBQVgG38X0ForeKRDvwHQOJVuCV0tkl8GFHtDV 8MfNq+wdr9NKDBU9DpKllI4EWTvDQURUtOp2kWoHVtQMeQukgwrW2zf/ld5TVNoymWSI oXG2snjxnMhiY14kvarEL3T9a4UA/vYkFokrUzr1E+/Q405Tg3u7cTCiNDiE0tuJxd2S SwXQ== X-Gm-Message-State: ALoCoQmXLZzysUMvnoJL4D4k49PrOcf3EP1vAkCmSS+JS1yY/sqbktwu8D3AVKaeph0LBuLIXhKV X-Received: by 10.50.117.68 with SMTP id kc4mr6290341igb.25.1422481280570; Wed, 28 Jan 2015 13:41:20 -0800 (PST) Received: from localhost ([2620:0:1000:1600:603d:d2f3:f7e8:f7e1]) by mx.google.com with ESMTPSA id qs3sm3386564igb.8.2015.01.28.13.41.19 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 28 Jan 2015 13:41:19 -0800 (PST) From: Haixia Shi To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/udl: fix excessive prefetch_range Date: Wed, 28 Jan 2015 13:41:13 -0800 Message-Id: <1422481273-14970-2-git-send-email-hshi@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1422481273-14970-1-git-send-email-hshi@chromium.org> References: <20150128211232.GJ25850@nuc-i3427.alporthouse.com> <1422481273-14970-1-git-send-email-hshi@chromium.org> Cc: Haixia Shi X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The prefetch_range amount is already in number of bytes. Multiplying again by bpp is unnecessary. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz Tested-by: Haixia Shi --- drivers/gpu/drm/udl/udl_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {