drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL.
authorJyoti Yadav <jyoti.r.yadav@intel.com>
Fri, 31 Aug 2018 06:00:23 +0000 (02:00 -0400)
committerImre Deak <imre.deak@intel.com>
Fri, 31 Aug 2018 13:46:46 +0000 (16:46 +0300)
commita64f88874930be944f2c78c7df501d5d1d19becc
tree193d131b553a17c66217789d04901e2b267154e9
parent3f51b7e1f36a37cfc6ed281a231485e4e6b511c3
drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL.

This patch resolves the DMC FW loading issue.
Earlier DMC FW package have only one DMC FW for one stepping. But as such
there is no such restriction from Package side.
For ICL icl_dmc_ver1_07.bin binary package has DMC FW for 2 steppings.
So while reading the dmc_offset from package header, for 1st stepping
offset used to come 0x0 and was working fine till now.
But for second stepping and other steppings, offset is non zero number
and is in dwords. So we need to convert into bytes to fetch correct DMC
FW from correct place.

v2 : Added check for DMC FW max size for various gen. (Imre Deak)
v3 : Corrected naming convention for various gen. (Imre Deak)
v4 : Initialized max_fw_size to 0
v5 : Corrected DMC FW MAX_SIZE for various gen. (Imre Deak)
v6 : Fixed the typo issues.

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1535695223-4648-1-git-send-email-jyoti.r.yadav@intel.com
drivers/gpu/drm/i915/intel_csr.c