OSDN Git Service

drm/i915/dmc: extract fw_info and table walk from intel_package_header
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 7 Jun 2019 09:12:23 +0000 (02:12 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 17 Jun 2019 19:32:28 +0000 (12:32 -0700)
commit56b206bcdada2b95e9e5b303d663aa1b3228b5cf
tree0adda6355c5668040c1cb59a9beae968c49fa57d
parent8a6f9d5c172d1aa170754832d0214983ed51fa01
drm/i915/dmc: extract fw_info and table walk from intel_package_header

Move fw_info out of struct intel_package_header to allow it to grow more
easily in future. To make a cleaner move, let's also extract a function to
search the header for the dmc_offset.

While reviewing this code I wondered why we continued the search even
after finding a suitable firmware. Add a comment to explain we will
continue to try to find a more specific firmware version, even if this
is not required by the spec.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_csr.c