From patchwork Wed Oct 19 08:33:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9383717 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3E234607D0 for ; Wed, 19 Oct 2016 08:34:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 300552984F for ; Wed, 19 Oct 2016 08:34:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 242B829928; Wed, 19 Oct 2016 08:34:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CBE9D2984F for ; Wed, 19 Oct 2016 08:34:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F049B6E86C; Wed, 19 Oct 2016 08:34:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94BB56E86C for ; Wed, 19 Oct 2016 08:33:58 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id o81so2836959wma.3 for ; Wed, 19 Oct 2016 01:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=cRQCRZjsoQ5DHw6yYYsiiXRqQYCBvXl1Ffwxl8jwJ3g=; b=rMBWv6iq4dfajctEzWNKN/oxpMqmDF2o/yKc/c/W02ERAnT2TcttmpKZ1twuykRQwl 5zkyenrs7vf5Fs0ARDUyvhc1TVoH/XWEU0xXyi84FUR4tm4mzxSEJgjKdvN3FXXJnE1/ j2bz00C/k7J+3za/oMd9h9rUORqnvgy8PjO0QE6pGzVs4MyWEG68XOrWNbLpg6ThbBa4 HTDCnleAf2H5ub8HUBxqPoXdHPubXh0o9uiqAv5tWUjP5EeeA5A6KNpq3tD1chF/O0Z/ lUOCW0XL8H9SrYwyiI4CFd3+z1Puz6TnXB3X8lzoDGE/1DUfvMi2CxOMbN91+9/NybI6 jbSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=cRQCRZjsoQ5DHw6yYYsiiXRqQYCBvXl1Ffwxl8jwJ3g=; b=E/T7Aq0MRydHNJurVkQ6l4EctxMkJ3+iVell0qcMocataJrex/H9hmR4KfREWsVgf1 3txOw+1GWwW7C7t5JkiXBf56LoOD5PukmgMksiLszzQ/5oVV/Fnfx4w6jN04MpG1gnx7 wFkpeg9JLeUZ5uGx4P4TFVi98wpcrOggDsJGMzByAm+OWFQg+8Q1t+nvWl3MOhlPLWTy +q+JAGSYUK+d5P+O03WWMH/w0TaN6aKexbq9L1qFyXjsbkXWHYSyHf0xkRK0ZzkSFwGL SLBik6FgY06NwoUOCfqWlHpNDpFs09Ch+PluH5K0PsbroDCq+qDWgoT5+o8iFOeotodg naUQ== X-Gm-Message-State: AA6/9Rn5mi+GfTKEfArkZjn5dXb8QxqqzofcjEC+2cJYnqfgYrW4+mIVIHtdZK89LYhHaA== X-Received: by 10.194.248.43 with SMTP id yj11mr3395705wjc.81.1476866036987; Wed, 19 Oct 2016 01:33:56 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id t83sm3746883wmt.20.2016.10.19.01.33.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 01:33:55 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 19 Oct 2016 09:33:49 +0100 Message-Id: <20161019083349.10888-3-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161019083349.10888-1-chris@chris-wilson.co.uk> References: <20161019083349.10888-1-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 3/3] drm/i915/gvt: Remove defunct vmap_batch() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This code was removed from i915_cmd_parser.c but still an obsolete version wound up being duplicated into gvt/cmd_parser.c. Good riddance. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 38 ----------------------------------- 1 file changed, 38 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index a91405df394d..84759ef8bb17 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -1581,44 +1581,6 @@ static uint32_t find_bb_size(struct parser_exec_state *s) return bb_size; } -static u32 *vmap_batch(struct drm_i915_gem_object *obj, - unsigned int start, unsigned int len) -{ - int i; - void *addr = NULL; - struct sg_page_iter sg_iter; - int first_page = start >> PAGE_SHIFT; - int last_page = (len + start + 4095) >> PAGE_SHIFT; - int npages = last_page - first_page; - struct page **pages; - - pages = drm_malloc_ab(npages, sizeof(*pages)); - if (pages == NULL) { - DRM_DEBUG_DRIVER("Failed to get space for pages\n"); - goto finish; - } - - i = 0; - for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, - first_page) { - pages[i++] = sg_page_iter_page(&sg_iter); - if (i == npages) - break; - } - - addr = vmap(pages, i, 0, PAGE_KERNEL); - if (addr == NULL) { - DRM_DEBUG_DRIVER("Failed to vmap pages\n"); - goto finish; - } - -finish: - if (pages) - drm_free_large(pages); - return (u32 *)addr; -} - - static int perform_bb_shadow(struct parser_exec_state *s) { struct intel_shadow_bb_entry *entry_obj;