From patchwork Wed Jan 28 18:15:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haixia Shi X-Patchwork-Id: 5728881 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6840DBF440 for ; Wed, 28 Jan 2015 18:15:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B456E202EC for ; Wed, 28 Jan 2015 18:15:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DC654202E9 for ; Wed, 28 Jan 2015 18:15:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 562C06E442; Wed, 28 Jan 2015 10:15:40 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ig0-f171.google.com (mail-ig0-f171.google.com [209.85.213.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D04E6E442 for ; Wed, 28 Jan 2015 10:15:39 -0800 (PST) Received: by mail-ig0-f171.google.com with SMTP id r10so12322415igi.4 for ; Wed, 28 Jan 2015 10:15:38 -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=Jo75tIL3J8oH1N6hiVr+dyivN91JhVCELpcSPK9xkEaEjeqjXUwMW2ry01XtmwR2rB hlOfJ1dzUowqiSjaT7F0VqqfsA50xZn/hEi2EamGzB5EIkekbCt8YtPxXRP2xCgDXYwk RFHCtBKwLSB8ZNeEZys/imUZWSHo3UItgFpXs= 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=YTYtSLgQ5Ixk74cigL2g6lpMnUYCwUF1Bglh3nGMpDS10kCtotGbYe5SRMDKf36b97 CUFosvr/mY4uQPJX37VmvES5o93thFwA2clybAk7ioYzV+y0Iw9FLXAKr9qXUWRG3mWX WymIdCFjW3D7Bt4b+cEbLO1hsnBbgk5kqmQpftMU5IwBJNXiw1EVoxy63Vm2rGkmqFhz ou3eNFz03xGg0XRTPklRMTMyeDE85k8sTGTjuhNS52PAd3bsRXgGQ4dwvaCOURHaOy/v BvPiBIbhrpBWpcRNYWCqppwbuqgPBEB++fnYuwZNXOdBsFWIDi/B3o9AUNADC349SYZQ wx0Q== X-Gm-Message-State: ALoCoQkkza4gdcOGiWLw1dpPC4Q/tlsGNkRQyhKdCgA3NAlEuQVst0mSbH+DLAQ66odSE/TCIN0U X-Received: by 10.43.52.197 with SMTP id vn5mr4505234icb.64.1422468938881; Wed, 28 Jan 2015 10:15:38 -0800 (PST) Received: from localhost ([2620:0:1000:1600:fc0d:8d23:d42f:ba6f]) by mx.google.com with ESMTPSA id 15sm2873080ioq.8.2015.01.28.10.15.37 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 28 Jan 2015 10:15:38 -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 10:15:30 -0800 Message-Id: <1422468930-20592-2-git-send-email-hshi@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1422468930-20592-1-git-send-email-hshi@chromium.org> References: <1422468930-20592-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 Reviewed-by: Chris Wilson --- 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) {