drm/i915/csr: keep max firmware size together with firmare name and version
authorJani Nikula <jani.nikula@intel.com>
Wed, 26 Sep 2018 13:34:13 +0000 (16:34 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 27 Sep 2018 06:25:10 +0000 (09:25 +0300)
commitd8a5b7d79fb7de60d9f0b9c56ebd8ef9f507d362
treee6a36870303733e91464f1b4d318cfa89bdefe48
parent180e9d230efe7acad72a6a6ba47de82bcbc13fc4
drm/i915/csr: keep max firmware size together with firmare name and version

Move max firmware size to the same if ladder with firmware name and
required version. This allows us to detect the missing max size for a
platform without actually loading the firmware, and makes the whole
thing easier to maintain.

We need to move the power get earlier to allow for early return in the
missing platform case. While at it, extend the comment on why we return
with the reference held on errors.

We also need to move the module parameter override later to reuse the
max firmware size, which is independent of the override.

v2: Add comment on why we leak the wakeref on errors (Chris)

v3: Rebase

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180926133414.22073-2-jani.nikula@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_csr.c