From patchwork Fri Jan 30 18:49:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haixia Shi X-Patchwork-Id: 5752371 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 871479F358 for ; Fri, 30 Jan 2015 18:49:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8BBF2026F for ; Fri, 30 Jan 2015 18:49:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CD6F22025B for ; Fri, 30 Jan 2015 18:49:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E9F56E85F; Fri, 30 Jan 2015 10:49:19 -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 E31ED6E85F for ; Fri, 30 Jan 2015 10:49:17 -0800 (PST) Received: by mail-ig0-f171.google.com with SMTP id r10so5373809igi.4 for ; Fri, 30 Jan 2015 10:49:17 -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=BFYjyJHAUg42BpWXSx2+fGeSs6qRmSpMVH8+xUzVUFE=; b=g1Tl+c+/9CDENrCMIFSS8G9DNLbN0D20cVHxBB57+9ztpAheSIQqZo7YP1zKhxiN/+ ySqJH1X7tXf87WIsPuJzkOfij5OE93+AdtXxejTCVm9uvm0VFHEDoGLMwZ/Q7DLhpZnS rpBlySti/+pPc4l1XVVZRqQjTTwj/NpuwlNLs= 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=BFYjyJHAUg42BpWXSx2+fGeSs6qRmSpMVH8+xUzVUFE=; b=IPTk8c6ZqH+705lEnh+VXLb7byX0uemek1IusY/l6ql/FTMkBeHJkPQWeIvzvUCkEW WRMrmJV9YOVjw4hUsywmhewaOANdfsuqcHJoJ7lAX2a5UIKlCsPzV4JqELOy+8uPzdxZ Zsw+7OVdcL34ZN8hd0LmAVL083IHmOBAsOywEvWlzYrXA2v051UhSm6RdYXXwlx8R3MA i+Zk/3xzZJ/yh/gpa2xmbDq/1+4dmhqDdkOL7shd5S/9i5hI33XK0JOq19KpCIq68bmq 7lI8yxiod8uQbtJahUnPQ+bedBcmf9k0QDeSgSWW+dmomt+ke1r/ZASZjRQ9Jj0AW49+ v60A== X-Gm-Message-State: ALoCoQmx5vj+y+aOyE7F/c2c1XN3OJSTeaCTuU4GZXrvW3HzPkOtNUNp+DEGSXPIMXCpHYj20OUe X-Received: by 10.107.11.30 with SMTP id v30mr9195805ioi.70.1422643757639; Fri, 30 Jan 2015 10:49:17 -0800 (PST) Received: from localhost ([2620:0:1000:1600:4c85:5ef9:b599:2f24]) by mx.google.com with ESMTPSA id hi15sm1603158igb.19.2015.01.30.10.49.16 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 30 Jan 2015 10:49:16 -0800 (PST) From: Haixia Shi To: dri-devel Subject: [PATCH 2/2] drm/udl: fix excessive prefetch_range Date: Fri, 30 Jan 2015 10:49:09 -0800 Message-Id: <1422643749-24402-2-git-send-email-hshi@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1422643749-24402-1-git-send-email-hshi@chromium.org> References: <1422643749-24402-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 917dcb9..45f459f 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) {