From: Rodrigo Vivi Date: Mon, 19 Dec 2016 19:05:47 +0000 (-0800) Subject: drm/i915: Simplify gem stolen initialization. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5af7edc5859abf7b38e3158bf078db831ec28853;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Simplify gem stolen initialization. Let's take usage of IS_LP to simplify the gem stolen initialization as suggest by Tvrtko. Also assume that all new LP platforms follows the chv+ and others bdw+. v2: Remove the wrong commit message about bxt and glk. (Ander) Cc: Ander Conselvan de Oliveira Cc: Imre Deak Cc: Mika Kuoppala Cc: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Vetter Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1482174347-24911-1-git-send-email-rodrigo.vivi@intel.com --- diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index 3d2422745aa9..98deaa7eeff6 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c @@ -454,13 +454,12 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv) &reserved_size); break; default: - if (IS_BROADWELL(dev_priv) || - IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) - bdw_get_stolen_reserved(dev_priv, &reserved_base, + if (IS_LP(dev_priv)) + chv_get_stolen_reserved(dev_priv, &reserved_base, &reserved_size); else - chv_get_stolen_reserved(dev_priv, &reserved_base, - &reserved_size); + bdw_get_stolen_reserved(dev_priv, &reserved_base, + &reserved_size); break; }