From patchwork Tue May 22 12:30:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10418585 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 DE50C60224 for ; Tue, 22 May 2018 12:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB56F289A2 for ; Tue, 22 May 2018 12:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDBAC28B7A; Tue, 22 May 2018 12:30:32 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 510E4289A2 for ; Tue, 22 May 2018 12:30:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41F416E110; Tue, 22 May 2018 12:30:31 +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 A9FD86E11F for ; Tue, 22 May 2018 12:30:29 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id a137-v6so16178665wme.1 for ; Tue, 22 May 2018 05:30:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cqIWUvqXPn+xmCdBGjuB3rOCZkH6xcju0ow3CD82W3c=; b=qDD8QUm+kc5d0fxJopVxZJsfgHbZOZuB1pgojLsTvpd5iexzC++QZKtRKb5vvUTRrY qG+8KUIUegOhfkeZSdjCoKHeqT4+hk2tC5mUS1iabpzdFHhs3f4Prf997WdFJRNdwH3Z nXqi6V89dLmAOYBz0CYH/GVO2wcd4tBrnX0z+8J0J588qUpG7iO6tliNJzrP2r/Banvh Sr18WswgS4FnJrrpvKSCKY/ZydcsXuXuvEezuOiiQ1W91ZHT3M4dUkat/5LNPtUEWXWo vRrRRIWRzIIYEvrT7w0FmKmpPwZ0iXDCdkDnDlYPJN+F67DCLQ5WaECPMe3DTFEUnzO3 zCqg== X-Gm-Message-State: ALKqPwde4JQPqfpZvFwgpIYc6LEHT3bIUIfZd9CZI4YylyfsBOShXe0l qsE7+lTgOeseoxGaK4166AqyKKR1 X-Google-Smtp-Source: AB8JxZqX/7C5Pknh791HmMAafdHtettEX0A2pnIbaV7Wdry7Y9vcXLTcM9JLbAiF/c8Eg5uXdT9CwQ== X-Received: by 2002:a1c:1f13:: with SMTP id f19-v6mr972692wmf.73.1526992228249; Tue, 22 May 2018 05:30:28 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id z63-v6sm22822227wrb.34.2018.05.22.05.30.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 05:30:27 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Tue, 22 May 2018 13:30:11 +0100 Message-Id: <20180522123020.31624-2-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180522123020.31624-1-tvrtko.ursulin@linux.intel.com> References: <20180522123020.31624-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [RFC 01/10] drm/i915: Store engine backpointer in the intel_context X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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 From: Tvrtko Ursulin It will become useful in a later patch. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_gem_context.c | 1 + drivers/gpu/drm/i915/i915_gem_context.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index b69b18ef8120..bff3788908e0 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -282,6 +282,7 @@ __create_hw_context(struct drm_i915_private *dev_priv, struct intel_context *ce = &ctx->__engine[n]; ce->gem_context = ctx; + ce->engine = dev_priv->engine[n]; } INIT_RADIX_TREE(&ctx->handles_vma, GFP_KERNEL); diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h index c3262b4dd2ee..74512c92a6a0 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.h +++ b/drivers/gpu/drm/i915/i915_gem_context.h @@ -150,6 +150,7 @@ struct i915_gem_context { /** engine: per-engine logical HW state */ struct intel_context { struct i915_gem_context *gem_context; + struct intel_engine_cs *engine; struct i915_vma *state; struct intel_ring *ring; u32 *lrc_reg_state;