[Intel-gfx] [PATCH 2/5] drm/i915: Notify user about outdated dmc firmware

Animesh Manna animesh.manna at intel.com
Thu Oct 8 02:41:05 PDT 2015



On 9/21/2015 2:00 PM, Mika Kuoppala wrote:
> Jani Nikula <jani.nikula at linux.intel.com> writes:
>
>> On Fri, 18 Sep 2015, Mika Kuoppala <mika.kuoppala at linux.intel.com> wrote:
>>> If csr/dmc firmware is known to be outdated, notify
>>> user.
>> What would break if we requested a firmware version that works? Or we've
>> made it so that we only request the major version because there's not
>> supposed to be changes like this between minor versions...?
>>
> I guess the question is more of a what should we do
> if there is only outdated (known bad) firmware available.
>
> Refuse to load and limb onwards, or return with error code
> on driver init.
>
> Latter would force firmware and version to be mandatory and the
> version to be tightly coupled to kernel driver version.

A softlink is used to use recommended firmware for dmc and the same information is published through 01.org for the firmware user.
Imo, we should not have this kind of hack in code which will change over time and this is responsibility of repo-owner to link correct recommended firmware for new kernel update.

-Animesh

> -Mika
>
>> BR,
>> Jani.
>>
>>
>>
>>> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/intel_csr.c | 9 +++++++++
>>>   1 file changed, 9 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
>>> index 58edc3f..73807c3 100644
>>> --- a/drivers/gpu/drm/i915/intel_csr.c
>>> +++ b/drivers/gpu/drm/i915/intel_csr.c
>>> @@ -45,6 +45,9 @@
>>>   
>>>   MODULE_FIRMWARE(I915_CSR_SKL);
>>>   
>>> +#define RECOMMENDED_FW_MAJOR		1
>>> +#define RECOMMENDED_FW_MINOR		21
>>> +
>>>   /*
>>>   * SKL CSR registers for DC5 and DC6
>>>   */
>>> @@ -387,6 +390,12 @@ static void finish_csr_load(const struct firmware *fw, void *context)
>>>   
>>>   	DRM_DEBUG_KMS("Finished loading %s v%u.%u\n", dev_priv->csr.fw_path,
>>>   		      csr->dmc_ver_major, csr->dmc_ver_minor);
>>> +
>>> +	if (csr->dmc_ver_major < RECOMMENDED_FW_MAJOR ||
>>> +	    csr->dmc_ver_minor < RECOMMENDED_FW_MINOR)
>>> +		DRM_INFO("Outdated dmc firmware found, please upgrade to %u.%u or newer\n",
>>> +			 RECOMMENDED_FW_MAJOR, RECOMMENDED_FW_MINOR);
>>> +
>>>   out:
>>>   	if (fw_loaded)
>>>   		intel_runtime_pm_put(dev_priv);
>>> -- 
>>> 2.1.4
>>>
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>> -- 
>> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



More information about the Intel-gfx mailing list