diff mbox

[2/3] drm/i915: Per-engine scratch VMA is mandatory

Message ID 20180119100005.9072-2-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tvrtko Ursulin Jan. 19, 2018, 10 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

We fail engine initialization if the scratch VMA cannot be created so
there is no point in error handle it later. If the initialization ordering
gets messed up, we can explode during development just as well.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson Jan. 19, 2018, 10:04 a.m. UTC | #1
Quoting Tvrtko Ursulin (2018-01-19 10:00:04)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> We fail engine initialization if the scratch VMA cannot be created so
> there is no point in error handle it later. If the initialization ordering
> gets messed up, we can explode during development just as well.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 334d44d415ab..74d7989389e1 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1416,7 +1416,7 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
>         unsigned int i;
>         int ret;
>  
> -       if (GEM_WARN_ON(engine->id != RCS || !engine->scratch))
> +       if (GEM_WARN_ON(engine->id != RCS))
>                 return -EINVAL;

I was going to say the same thing on the previous patch! Well I guess
that earns both an
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 334d44d415ab..74d7989389e1 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1416,7 +1416,7 @@  static int intel_init_workaround_bb(struct intel_engine_cs *engine)
 	unsigned int i;
 	int ret;
 
-	if (GEM_WARN_ON(engine->id != RCS || !engine->scratch))
+	if (GEM_WARN_ON(engine->id != RCS))
 		return -EINVAL;
 
 	switch (INTEL_GEN(engine->i915)) {