drm/i915/dgfx: Make failure to setup stolen non-fatal
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 16 Sep 2022 17:36:08 +0000 (10:36 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 22 Sep 2022 13:43:31 +0000 (06:43 -0700)
commitc40bd3b14f72446115241563ee0ce7273aa04f35
treef0d0b42143014b99821702a8efc8f7c65bb81fb5
parent3d99597c6496b9319f7522e0d073afab314d518a
drm/i915/dgfx: Make failure to setup stolen non-fatal

There is no reason to consider the setup of Data Stolen Memory fatal on
dgfx and non-fatal on integrated. Move the debug and error propagation
around so both have the same behavior: non-fatal. Before this change,
loading i915 on a system with TGL + DG2 would result in just TGL
succeeding the initialization (without stolen).

Now loading i915 on the same system with an injected failure in
i915_gem_init_stolen():

$ dmesg | grep stolen
i915 0000:00:02.0: [drm] Injected failure, disabling use of stolen memory
i915 0000:00:02.0: [drm:init_stolen_smem [i915]] Skip stolen region: failed to setup
i915 0000:03:00.0: [drm] Injected failure, disabling use of stolen memory
i915 0000:03:00.0: [drm:init_stolen_lmem [i915]] Skip stolen region: failed to setup

Both GPUs are still available:

$ sudo build/tools/lsgpu
card1                    Intel Dg2 (Gen12)                 drm:/dev/dri/card1
└─renderD129                                               drm:/dev/dri/renderD129
card0                    Intel Tigerlake (Gen12)           drm:/dev/dri/card0
└─renderD128                                               drm:/dev/dri/renderD128

Reviewed-by: Wayne Boyer <wayne.boyer@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220915-stolen-v2-3-20ff797de047@intel.com
drivers/gpu/drm/i915/gem/i915_gem_stolen.c