]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/dmc: protect against loading wrong firmware
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 7 Jun 2019 09:12:30 +0000 (02:12 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 17 Jun 2019 19:32:34 +0000 (12:32 -0700)
commit6d61563e1f96c92cf9ab2a9c70f5759f7753c354
tree51ee6d2e591dde2134fc95217238e2860c0b7237
parenta7ce4d56af6353ca475a46bd2e19b0a89f9e2727
drm/i915/dmc: protect against loading wrong firmware

In intel_package_header version 2 there's a new field in the
fw_info table that must be 0, otherwise it's not the correct DMC
firmware. Add a check for version 2 or later.

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-10-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_csr.c