From patchwork Wed Oct 3 12:04:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10624725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1144013BB for ; Wed, 3 Oct 2018 12:04:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0233F28944 for ; Wed, 3 Oct 2018 12:04:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB1A828957; Wed, 3 Oct 2018 12:04:46 +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 9B8CA28944 for ; Wed, 3 Oct 2018 12:04:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 095706E471; Wed, 3 Oct 2018 12:04:40 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC5AA6E457 for ; Wed, 3 Oct 2018 12:04:20 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id y16so5835686wrw.3 for ; Wed, 03 Oct 2018 05:04:20 -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=zkcjvKqGnRafBMTcrPu9XmO37XMUE8EUZz4/WTmmTvs=; b=N6VBHbASwPBo6F45c/DJvqBSyd/Xy45pxAaylIwhD0b3rvppaPyJfTSogUSL/l06xW NhHqZpuhKBmgIfYLftCDthHjVdMOf/rSySVu38pJ5jGt0c4dkt1M/t643fd/coEu1SDT M5i+ihcSbSO9uv0KIP0TWvU235ogm4z5jNtqpQDplUNBWEi64WFiUjupbifjpS4wMOyo 7YGfvHEtBH2XCczjA0B1Yx98CCwxw+injWTE2k+WsT/mR2kItHLtNeEbzESlHOTkqHxk /py5VASnu73SyCDok5WB6ISlM1mjjOIHaxk1YQDKvO4ApMpz11+29C1h2rqJXqLcB5Np V/Ew== X-Gm-Message-State: ABuFfohLu9D2viSbOMMjyNy/hWoeowtRafYn8xoVzZj411PZZOGuwEu/ iShS8Ax3x0KUBcFGDCIFrJoZWWPzDwA= X-Google-Smtp-Source: ACcGV6316uQPYcrA//9Z36BjZw6YGaJqBSDaWMLQa0q8p5ziIqcwoPb0hA3Fl3DdCxXVxyB9O0G5Ag== X-Received: by 2002:adf:dcc7:: with SMTP id x7-v6mr1031079wrm.21.1538568259375; Wed, 03 Oct 2018 05:04:19 -0700 (PDT) Received: from localhost.localdomain ([95.144.165.37]) by smtp.gmail.com with ESMTPSA id f69-v6sm866657wmf.34.2018.10.03.05.04.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 05:04:18 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Wed, 3 Oct 2018 13:04:00 +0100 Message-Id: <20181003120406.6784-8-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181003120406.6784-1-tvrtko.ursulin@linux.intel.com> References: <20181003120406.6784-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [RFC 07/13] 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 8cbe58070561..7cf5fdf93583 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -343,6 +343,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 08165f6a0a84..1c376cf316ca 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.h +++ b/drivers/gpu/drm/i915/i915_gem_context.h @@ -163,6 +163,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;