drm/i915: add support for specifying DMC firmware override by module param
Subsystems (2)
PATCH 1/1 drm/i915: add support for specifying DMC firmware override by module param
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
---
Untested.
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_params.c +3 -0
@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,i915_param_named_unsafe (huc_firmware_path, charp,0400 ,"HuC firmware path to use instead of the default one" ); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 ,"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" );
drivers/gpu/drm/i915/intel_csr.c +7 -2
@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version; -if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) { required_version =GLK_CSR_VERSION_REQUIRED ;
@@ -451,7 +454,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ;
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Jani Nikula
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
Signed-off-by Jani Nikula <[email protected]>---
Untested.
Yeah, it kind of shows. It fails to compile :D
But if you chuck in:
param(char *, dmc_firmware_path, NULL) \
in i915_params.h
Things work correctly and you can use:
Quoted 53 lines
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_params.c +3
-0@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,i915_param_named_unsafe (huc_firmware_path, charp,0400 ,"HuC firmware path to use instead of the default one" ); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 ,"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" );drivers/gpu/drm/i915/intel_csr.c +7
-2@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version; -if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) { required_version =GLK_CSR_VERSION_REQUIRED ;@@ -451,7 +454,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ;Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · David Weinehall
Quoted 8 lines · Jani Nikula
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
Signed-off-by Jani Nikula <[email protected]>---
Untested.
Yeah, it kind of shows. It fails to compile :D
Oops. I was anxious to get the patch on the list in the heat of IRC discussion, and just added the disclaimer instead of doing this properly... *blush*
Quoted 11 lines
But if you chuck in:
param(char *, dmc_firmware_path, NULL) \in
i915_params.hThings work correctly and you can use:
Tested-by David Weinehall <[email protected]>Reviewed-by David Weinehall <[email protected]>
Thanks. But let's wait for more input on whether this is really what people want. Perhaps this is useful *regardless* of the outcome of the other discussions.
BR,
Jani.
Quoted 54 lines
Quoted 54 lines
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_params.c +3
-0@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,i915_param_named_unsafe (huc_firmware_path, charp,0400 ,"HuC firmware path to use instead of the default one" ); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 ,"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" );drivers/gpu/drm/i915/intel_csr.c +7
-2@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version; -if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) { required_version =GLK_CSR_VERSION_REQUIRED ;@@ -451,7 +454,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ;Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerQuoted 9 lines · Jani Nikula
Quoted 8 lines · David Weinehall
Quoted 7 lines · Jani Nikula
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
Signed-off-by Jani Nikula <[email protected]>---
Quoted 12 lines
Quoted 3 lines
Quoted 1 line
Untested.
Yeah, it kind of shows. It fails to compile :D
Oops. I was anxious to get the patch on the list in the heat of IRC discussion, and just added the disclaimer instead of doing this properly... *blush*
Quoted 4 lines
But if you chuck in:
param(char *, dmc_firmware_path, NULL) \
I think I already raised my suggestion earlier, but here it goes again. Maybe we should consider consolidating these into:
i915.firmware=guc:whatever.bin i915.firmware=dmc:whatever.bin
Then something like "i915.firmware=guc:disable" could be supported, too.
Regards, Joonas
Quoted 72 lines
Quoted 7 lines
in
i915_params.hThings work correctly and you can use:
Tested-by David Weinehall <[email protected]>Reviewed-by David Weinehall <[email protected]>Thanks. But let's wait for more input on whether this is really what people want. Perhaps this is useful *regardless* of the outcome of the other discussions.
BR,
Jani.Quoted 54 lines
Quoted 54 lines
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_params.c +3
-0@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,i915_param_named_unsafe (huc_firmware_path, charp,0400 ,"HuC firmware path to use instead of the default one" ); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 ,"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" );drivers/gpu/drm/i915/intel_csr.c +7
-2@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version; -if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) { required_version =GLK_CSR_VERSION_REQUIRED ;@@ -451,7 +454,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ;Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Joonas Lahtinen
Quoted 18 lines · Jani Nikula
Quoted 11 lines · David Weinehall
Quoted 8 lines · Jani Nikula
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
Signed-off-by Jani Nikula <[email protected]>---
Untested.
Yeah, it kind of shows. It fails to compile :D
Oops. I was anxious to get the patch on the list in the heat of IRC discussion, and just added the disclaimer instead of doing this properly... *blush*
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
But if you chuck in:
param(char *, dmc_firmware_path, NULL) \I think I already raised my suggestion earlier, but here it goes again. Maybe we should consider consolidating these into:
i915.firmware=guc:whatever.bin i915.firmware=dmc:whatever.bin
I don't think that's possible. I didn't double check but I think you only get one value from the module param code. Unless you roll your own modparam hooks, which is best avoided.
Quoted 2 lines
Then something like "i915.firmware=guc:disable" could be supported, too.
i915.dmc_firmware_path="" could mean disable.
BR,
Jani.
Quoted 75 lines
Regards, Joonas
Quoted 72 lines
Quoted 7 lines
in
i915_params.hThings work correctly and you can use:
Tested-by David Weinehall <[email protected]>Reviewed-by David Weinehall <[email protected]>Thanks. But let's wait for more input on whether this is really what people want. Perhaps this is useful *regardless* of the outcome of the other discussions.
BR,
Jani.Quoted 54 lines
Quoted 54 lines
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_params.c +3
-0@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,i915_param_named_unsafe (huc_firmware_path, charp,0400 ,"HuC firmware path to use instead of the default one" ); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 ,"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" );drivers/gpu/drm/i915/intel_csr.c +7
-2@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version; -if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) { required_version =GLK_CSR_VERSION_REQUIRED ;@@ -451,7 +454,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ;Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 47 lines
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Jani Nikula
Sent: Wednesday, November 22, 2017 8:20 AM
To: Joonas Lahtinen <[email protected]>; David Weinehall <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module paramQuoted 2 lines · Joonas Lahtinen
Quoted 1 line · Jani Nikula
On Tue, 21 Nov 2017, David Weinehall <[email protected]>
Quoted 17 lines · wrote:
Quoted 17 lines
Quoted 11 lines · Jani Nikula
Quoted 8 lines
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
Signed-off-by Jani Nikula <[email protected]>---
Untested.
Yeah, it kind of shows. It fails to compile :D
Oops. I was anxious to get the patch on the list in the heat of IRC discussion, and just added the disclaimer instead of doing this properly... *blush*
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
But if you chuck in:
param(char *, dmc_firmware_path, NULL) \I think I already raised my suggestion earlier, but here it goes again. Maybe we should consider consolidating these into:
i915.firmware=guc:whatever.bin i915.firmware=dmc:whatever.bin
I don't think that's possible. I didn't double check but I think you only get one value from the module param code. Unless you roll your own modparam hooks, which is best avoided.
Quoted 23 lines
Quoted 2 lines
Then something like "i915.firmware=guc:disable" could be supported, too.
i915.dmc_firmware_path="" could mean disable.
BR,
Jani.Quoted 14 lines
Regards, Joonas
Quoted 11 lines
Quoted 7 lines
in
i915_params.hThings work correctly and you can use:
Tested-by David Weinehall <[email protected]>Reviewed-by David Weinehall <[email protected]>Thanks. But let's wait for more input on whether this is really what people want. Perhaps this is useful *regardless* of the outcome of the other discussions.
I believe this patch is going to be useful anyway.... IT would make things a lot easier for testing purpose. I think we should get this merged.
Does anyone have any concerns?
Anusha
Quoted 67 lines
Quoted 10 lines
Quoted 10 lines
BR,
Jani.Quoted 6 lines
Quoted 6 lines
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_params.c i915_param_named_unsafe(guc_firmware_path, · line 171
Quoted 7 lines
drivers/gpu/drm/i915/i915_params.c +0
-0@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400, i915_param_named_unsafe(huc_firmware_path, charp,0400,
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/i915/i915_params.c +3
-0"HuC firmware path to use instead of the default one"); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 , "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");drivers/gpu/drm/i915/intel_csr.c +0
-0@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version;Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_csr.c +4
-1-if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) {
required_version=GLK_CSR_VERSION_REQUIRED; @@ -451,7+454,9
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
@@ void
intel_csr_ucode_init(struct drm_i915_private *dev_priv)drivers/gpu/drm/i915/intel_csr.c +3
-2if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ; --2.11.0
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi,
This patch could be really helpful.... Is there any issue with it? It's not merged yet.....
Regards,
Anusha
Quoted 136 lines
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Jani Nikula
Sent: Wednesday, November 22, 2017 8:20 AM
To: Joonas Lahtinen <[email protected]>; David Weinehall <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module paramQuoted 2 lines · Joonas Lahtinen
Quoted 1 line · Jani Nikula
On Tue, 21 Nov 2017, David Weinehall <[email protected]>
Quoted 17 lines · wrote:
Quoted 17 lines
Quoted 11 lines · Jani Nikula
Quoted 8 lines
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
Signed-off-by Jani Nikula <[email protected]>---
Untested.
Yeah, it kind of shows. It fails to compile :D
Oops. I was anxious to get the patch on the list in the heat of IRC discussion, and just added the disclaimer instead of doing this properly... *blush*
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
But if you chuck in:
param(char *, dmc_firmware_path, NULL) \I think I already raised my suggestion earlier, but here it goes again. Maybe we should consider consolidating these into:
i915.firmware=guc:whatever.bin i915.firmware=dmc:whatever.bin
I don't think that's possible. I didn't double check but I think you only get one value from the module param code. Unless you roll your own modparam hooks, which is best avoided.
Quoted 2 lines
Then something like "i915.firmware=guc:disable" could be supported, too.
i915.dmc_firmware_path="" could mean disable.
BR,
Jani.Quoted 25 lines
Regards, Joonas
Quoted 22 lines
Quoted 7 lines
in
i915_params.hThings work correctly and you can use:
Tested-by David Weinehall <[email protected]>Reviewed-by David Weinehall <[email protected]>Thanks. But let's wait for more input on whether this is really what people want. Perhaps this is useful *regardless* of the outcome of the other discussions.
BR,
Jani.Quoted 6 lines
Quoted 6 lines
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_params.c i915_param_named_unsafe(guc_firmware_path, · line 171
Quoted 7 lines
drivers/gpu/drm/i915/i915_params.c +0
-0@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400, i915_param_named_unsafe(huc_firmware_path, charp,0400,
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/i915/i915_params.c +3
-0"HuC firmware path to use instead of the default one"); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 , "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");drivers/gpu/drm/i915/intel_csr.c +0
-0@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version;Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_csr.c +4
-1-if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) {
required_version=GLK_CSR_VERSION_REQUIRED; @@ -451,7+454,9
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
@@ void
intel_csr_ucode_init(struct drm_i915_private *dev_priv)drivers/gpu/drm/i915/intel_csr.c +3
-2if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ; --2.11.0
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 24 lines · Jani Nikula
Quoted 11 lines · David Weinehall
Quoted 8 lines · Jani Nikula
Use i915.dmc_firmware_path to override default firmware for the platform and bypassing version checks.
Signed-off-by Jani Nikula <[email protected]>---
Untested.
Yeah, it kind of shows. It fails to compile :D
Oops. I was anxious to get the patch on the list in the heat of IRC discussion, and just added the disclaimer instead of doing this properly... *blush*
Quoted 7 lines
But if you chuck in:
param(char *, dmc_firmware_path, NULL) \in
i915_params.h
Quoted 8 lines
Quoted 4 lines
Things work correctly and you can use:
Tested-by David Weinehall <[email protected]>Reviewed-by David Weinehall <[email protected]>Thanks. But let's wait for more input on whether this is really what people want. Perhaps this is useful *regardless* of the outcome of the other discussions.
Fine by me. FWIW *we* (as in the PnP testing team) would definitely benefit if this patch got merged, since we'd be able to simplify automated testing of different versions of DMC.
Quoted 54 lines
BR,
Jani.Quoted 50 lines
Quoted 50 lines
--- drivers/gpu/drm/i915/i915_params.c | 3 +++ drivers/gpu/drm/i915/intel_csr.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_params.c +3
-0@@ -171,6 +171,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,i915_param_named_unsafe (huc_firmware_path, charp,0400 ,"HuC firmware path to use instead of the default one" ); +i915_param_named_unsafe (dmc_firmware_path, charp,0400 , +"DMC firmware path to use instead of the default one" ); +i915_param_named_unsafe (enable_dp_mst, bool,0600 ,"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" );drivers/gpu/drm/i915/intel_csr.c +7
-2@@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, csr->version = css_header->version; -if (IS_CANNONLAKE (dev_priv)) { +if (csr->fw_path == i915_modparams.dmc_firmware_path) { +/* Bypass version check for firmware override. */ + required_version = csr->version; + }else if (IS_CANNONLAKE (dev_priv)) { required_version =CNL_CSR_VERSION_REQUIRED ; }else if (IS_GEMINILAKE (dev_priv)) { required_version =GLK_CSR_VERSION_REQUIRED ;@@ -451,7 +454,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)if (!HAS_CSR (dev_priv))return ; -if (IS_CANNONLAKE (dev_priv)) +if (i915_modparams.dmc_firmware_path) + csr->fw_path = i915_modparams.dmc_firmware_path; +else if (IS_CANNONLAKE (dev_priv)) csr->fw_path =I915_CSR_CNL ;else if (IS_GEMINILAKE (dev_priv)) csr->fw_path =I915_CSR_GLK ;Signature · 1 line
2.11.0
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: add support for specifying DMC firmware override by module param
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915: add support for specifying DMC firmware override by module param
URL : https://patchwork.freedesktop.org/series/34157/
State : failure
== Summary ==
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
DESCEND objtool
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/compile.h
CHK kernel/config_data.h
CC [M] drivers/gpu/drm/i915/i915_params.o
In file included from ./include/linux/module.h:18:0,
from ./include/drm/drmP.h:59,
from drivers/gpu/drm/i915/i915_drv.h:47,
from drivers/gpu/drm/i915/i915_params.c:26:
drivers/gpu/drm/i915/i915_params.c: In function ‘__check_dmc_firmware_path’:
drivers/gpu/drm/i915/i915_params.c:32:48: error: ‘struct i915_params’ has no member named ‘dmc_firmware_path’; did you mean ‘guc_firmware_path’?
module_param_named_unsafe(name, i915_modparams.name, T, perm); \
^
./include/linux/moduleparam.h:347:68: note: in definition of macro ‘__param_check’
static inline type __always_unused *__check_##name(void) { return(p); }
^./include/linux/moduleparam.h:157:2: note: in expansion of macro ‘param_check_charp’
param_check_##type(name, &(value)); \
^~~~~~~~~~~~drivers/gpu/drm/i915/i915_params.c:32:2: note: in expansion of macro ‘module_param_named_unsafe’
module_param_named_unsafe(name, i915_modparams.name, T, perm); \
^~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/i915/i915_params.c:174:1: note: in expansion of macro ‘i915_param_named_unsafe’
i915_param_named_unsafe(dmc_firmware_path, charp, 0400,
^~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/i915/i915_params.c: At top level:drivers/gpu/drm/i915/i915_params.c:32:48: error: ‘struct i915_params’ has no member named ‘dmc_firmware_path’; did you mean ‘guc_firmware_path’?
module_param_named_unsafe(name, i915_modparams.name, T, perm); \
^
./include/linux/moduleparam.h:228:54: note: in definition of macro ‘__module_param_call’
VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } }
^~~./include/linux/moduleparam.h:158:2: note: in expansion of macro ‘module_param_cb_unsafe’
module_param_cb_unsafe(name, ¶m_ops_##type, &value, perm); \
^~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/i915/i915_params.c:32:2: note: in expansion of macro ‘module_param_named_unsafe’
module_param_named_unsafe(name, i915_modparams.name, T, perm); \
^~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/i915/i915_params.c:174:1: note: in expansion of macro ‘i915_param_named_unsafe’
i915_param_named_unsafe(dmc_firmware_path, charp, 0400,
^~~~~~~~~~~~~~~~~~~~~~~scripts/Makefile.build:314: recipe for target 'drivers/gpu/drm/i915/i915_params.o' failed make[4]: *** [drivers/gpu/drm/i915/i915_params.o] Error 1 scripts/Makefile.build:573: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:573: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:573: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1024: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx