Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module param
Hi, This patch could be really helpful Is there any issue with it? It's not merged yet. Regards, Anusha >-Original Message- >From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of >Jani Nikula >Sent: Wednesday, November 22, 2017 8:20 AM >To: Joonas Lahtinen <joonas.lahti...@linux.intel.com>; David Weinehall ><david.weineh...@linux.intel.com> >Cc: intel-gfx@lists.freedesktop.org >Subject: Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC >firmware override by module param > >On Wed, 22 Nov 2017, Joonas Lahtinen <joonas.lahti...@linux.intel.com> >wrote: >> On Tue, 2017-11-21 at 23:54 +0200, Jani Nikula wrote: >>> On Tue, 21 Nov 2017, David Weinehall <david.weineh...@linux.intel.com> >wrote: >>> > On Tue, Nov 21, 2017 at 01:51:29PM +0200, Jani Nikula wrote: >>> > > Use i915.dmc_firmware_path to override default firmware for the >>> > > platform and bypassing version checks. >>> > > >>> > > Signed-off-by: Jani Nikula <jani.nik...@intel.com> >>> > > >>> > > --- >>> > > >>> > > 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* >>> >>> > >>> > 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. > >> Then something like "i915.firmware=guc:disable" could be supported, >> too. > >i915.dmc_firmware_path="" could mean disable. > >BR, >Jani. > > >> >> Regards, Joonas >> >>> > >>> > in i915_params.h >>> > >>> > Things work correctly and you can use: >>> > >>> > Tested-by: David Weinehall <david.weineh...@linux.intel.com> >>> > Reviewed-by: David Weinehall <david.weineh...@linux.intel.com> >>> >>> 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. >>> >>> >>> > >>> > > --- >>> > > drivers/gpu/drm/i915/i915_params.c | 3 +++ >>> > > drivers/gpu/drm/i915/intel_csr.c | 9 +++-- >>> > > 2 files changed, 10 insertions(+), 2 deletions(-) >>> > > >>> > > diff --git a/drivers/gpu/drm/i915/i915_params.c >>> > > b/drivers/gpu/drm/i915/i915_params.c >>> > > index 3328147b4863..c11ad6d67fa9 100644 >>> > > --- a/drivers/gpu/drm/i915/i915_params.c >>> > > +++ b/drivers/gpu/drm/i915/i915_params.c >>> > > @@ -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)"); >>> > > >>> > > diff --git a/drivers/gpu/drm/i915/intel_csr.c >>> > > b/drivers/gpu/drm/i915/intel_csr.c >>> > > index 77d8b3d483ca..82db376ec7e1 100644 >>> > > --- a/drivers/gpu/drm/i915/intel_csr.c >>> > > +++ b/drivers/gpu/drm/i915/intel_csr.c >>> > > @@ -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)) { >>>
Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module param
>-Original Message- >From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of >Jani Nikula >Sent: Wednesday, November 22, 2017 8:20 AM >To: Joonas Lahtinen <joonas.lahti...@linux.intel.com>; David Weinehall ><david.weineh...@linux.intel.com> >Cc: intel-gfx@lists.freedesktop.org >Subject: Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC >firmware override by module param > >On Wed, 22 Nov 2017, Joonas Lahtinen <joonas.lahti...@linux.intel.com> >wrote: >> On Tue, 2017-11-21 at 23:54 +0200, Jani Nikula wrote: >>> On Tue, 21 Nov 2017, David Weinehall <david.weineh...@linux.intel.com> >wrote: >>> > On Tue, Nov 21, 2017 at 01:51:29PM +0200, Jani Nikula wrote: >>> > > Use i915.dmc_firmware_path to override default firmware for the >>> > > platform and bypassing version checks. >>> > > >>> > > Signed-off-by: Jani Nikula <jani.nik...@intel.com> >>> > > >>> > > --- >>> > > >>> > > 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* >>> >>> > >>> > 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. > >> Then something like "i915.firmware=guc:disable" could be supported, >> too. > >i915.dmc_firmware_path="" could mean disable. > >BR, >Jani. > > >> >> Regards, Joonas >> >>> > >>> > in i915_params.h >>> > >>> > Things work correctly and you can use: >>> > >>> > Tested-by: David Weinehall <david.weineh...@linux.intel.com> >>> > Reviewed-by: David Weinehall <david.weineh...@linux.intel.com> >>> >>> 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 >>> BR, >>> Jani. >>> >>> >>> > >>> > > --- >>> > > drivers/gpu/drm/i915/i915_params.c | 3 +++ >>> > > drivers/gpu/drm/i915/intel_csr.c | 9 +++-- >>> > > 2 files changed, 10 insertions(+), 2 deletions(-) >>> > > >>> > > diff --git a/drivers/gpu/drm/i915/i915_params.c >>> > > b/drivers/gpu/drm/i915/i915_params.c >>> > > index 3328147b4863..c11ad6d67fa9 100644 >>> > > --- a/drivers/gpu/drm/i915/i915_params.c >>> > > +++ b/drivers/gpu/drm/i915/i915_params.c >>> > > @@ -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)"); >>> > > >>> > > diff --git a/drivers/gpu/drm/i915/intel_csr.c >>> > > b/drivers/gpu/drm/i915/intel_csr.c >>> > > index 77d8b3d483ca..82db376ec7e1 100644 >>> > > --- a/drivers/gpu/drm/i915/intel_csr.c >>> > > +++ b/drivers/gpu/drm/i915/intel_csr.c >>> > > @@ -296,7 +296,10 @@ static uint32_t *parse_csr_fw(struct >>> > > drm_i915_private *dev_priv, >>> > > >>> > > csr->version = css_header->version; >>> > > >>> &g
Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module param
On Wed, 22 Nov 2017, Joonas Lahtinenwrote: > On Tue, 2017-11-21 at 23:54 +0200, Jani Nikula wrote: >> On Tue, 21 Nov 2017, David Weinehall wrote: >> > On Tue, Nov 21, 2017 at 01:51:29PM +0200, Jani Nikula wrote: >> > > Use i915.dmc_firmware_path to override default firmware for the platform >> > > and bypassing version checks. >> > > >> > > Signed-off-by: Jani Nikula >> > > >> > > --- >> > > >> > > 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* >> >> > >> > 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. > Then something like "i915.firmware=guc:disable" could be supported, > too. i915.dmc_firmware_path="" could mean disable. BR, Jani. > > Regards, Joonas > >> > >> > in i915_params.h >> > >> > Things work correctly and you can use: >> > >> > Tested-by: David Weinehall >> > Reviewed-by: David Weinehall >> >> 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. >> >> >> > >> > > --- >> > > drivers/gpu/drm/i915/i915_params.c | 3 +++ >> > > drivers/gpu/drm/i915/intel_csr.c | 9 +++-- >> > > 2 files changed, 10 insertions(+), 2 deletions(-) >> > > >> > > diff --git a/drivers/gpu/drm/i915/i915_params.c >> > > b/drivers/gpu/drm/i915/i915_params.c >> > > index 3328147b4863..c11ad6d67fa9 100644 >> > > --- a/drivers/gpu/drm/i915/i915_params.c >> > > +++ b/drivers/gpu/drm/i915/i915_params.c >> > > @@ -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)"); >> > > >> > > diff --git a/drivers/gpu/drm/i915/intel_csr.c >> > > b/drivers/gpu/drm/i915/intel_csr.c >> > > index 77d8b3d483ca..82db376ec7e1 100644 >> > > --- a/drivers/gpu/drm/i915/intel_csr.c >> > > +++ b/drivers/gpu/drm/i915/intel_csr.c >> > > @@ -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; >> > > -- >> > > 2.11.0 >> > > >> > > ___ >> > > Intel-gfx mailing list >> > > Intel-gfx@lists.freedesktop.org >> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx >> >> -- Jani Nikula, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module param
On Tue, Nov 21, 2017 at 11:54:16PM +0200, Jani Nikula wrote: > On Tue, 21 Nov 2017, David Weinehallwrote: > > On Tue, Nov 21, 2017 at 01:51:29PM +0200, Jani Nikula wrote: > >> Use i915.dmc_firmware_path to override default firmware for the platform > >> and bypassing version checks. > >> > >> Signed-off-by: Jani Nikula > >> > >> --- > >> > >> 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* > > > > > But if you chuck in: > > > > param(char *, dmc_firmware_path, NULL) \ > > > > in i915_params.h > > > > Things work correctly and you can use: > > > > Tested-by: David Weinehall > > Reviewed-by: David Weinehall > > 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. > BR, > Jani. > > > > > >> --- > >> drivers/gpu/drm/i915/i915_params.c | 3 +++ > >> drivers/gpu/drm/i915/intel_csr.c | 9 +++-- > >> 2 files changed, 10 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/i915/i915_params.c > >> b/drivers/gpu/drm/i915/i915_params.c > >> index 3328147b4863..c11ad6d67fa9 100644 > >> --- a/drivers/gpu/drm/i915/i915_params.c > >> +++ b/drivers/gpu/drm/i915/i915_params.c > >> @@ -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)"); > >> > >> diff --git a/drivers/gpu/drm/i915/intel_csr.c > >> b/drivers/gpu/drm/i915/intel_csr.c > >> index 77d8b3d483ca..82db376ec7e1 100644 > >> --- a/drivers/gpu/drm/i915/intel_csr.c > >> +++ b/drivers/gpu/drm/i915/intel_csr.c > >> @@ -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; > >> -- > >> 2.11.0 > >> > >> ___ > >> Intel-gfx mailing list > >> Intel-gfx@lists.freedesktop.org > >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Jani Nikula, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module param
On Tue, 2017-11-21 at 23:54 +0200, Jani Nikula wrote: > On Tue, 21 Nov 2017, David Weinehallwrote: > > On Tue, Nov 21, 2017 at 01:51:29PM +0200, Jani Nikula wrote: > > > Use i915.dmc_firmware_path to override default firmware for the platform > > > and bypassing version checks. > > > > > > Signed-off-by: Jani Nikula > > > > > > --- > > > > > > 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* > > > > > 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 > > > > in i915_params.h > > > > Things work correctly and you can use: > > > > Tested-by: David Weinehall > > Reviewed-by: David Weinehall > > 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. > > > > > > > --- > > > drivers/gpu/drm/i915/i915_params.c | 3 +++ > > > drivers/gpu/drm/i915/intel_csr.c | 9 +++-- > > > 2 files changed, 10 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/i915_params.c > > > b/drivers/gpu/drm/i915/i915_params.c > > > index 3328147b4863..c11ad6d67fa9 100644 > > > --- a/drivers/gpu/drm/i915/i915_params.c > > > +++ b/drivers/gpu/drm/i915/i915_params.c > > > @@ -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)"); > > > > > > diff --git a/drivers/gpu/drm/i915/intel_csr.c > > > b/drivers/gpu/drm/i915/intel_csr.c > > > index 77d8b3d483ca..82db376ec7e1 100644 > > > --- a/drivers/gpu/drm/i915/intel_csr.c > > > +++ b/drivers/gpu/drm/i915/intel_csr.c > > > @@ -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; > > > -- > > > 2.11.0 > > > > > > ___ > > > Intel-gfx mailing list > > > Intel-gfx@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- Joonas Lahtinen Open Source Technology Center Intel Corporation ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module param
On Tue, 21 Nov 2017, David Weinehallwrote: > On Tue, Nov 21, 2017 at 01:51:29PM +0200, Jani Nikula wrote: >> Use i915.dmc_firmware_path to override default firmware for the platform >> and bypassing version checks. >> >> Signed-off-by: Jani Nikula >> >> --- >> >> 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* > > But if you chuck in: > > param(char *, dmc_firmware_path, NULL) \ > > in i915_params.h > > Things work correctly and you can use: > > Tested-by: David Weinehall > Reviewed-by: David Weinehall 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. > >> --- >> drivers/gpu/drm/i915/i915_params.c | 3 +++ >> drivers/gpu/drm/i915/intel_csr.c | 9 +++-- >> 2 files changed, 10 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_params.c >> b/drivers/gpu/drm/i915/i915_params.c >> index 3328147b4863..c11ad6d67fa9 100644 >> --- a/drivers/gpu/drm/i915/i915_params.c >> +++ b/drivers/gpu/drm/i915/i915_params.c >> @@ -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)"); >> >> diff --git a/drivers/gpu/drm/i915/intel_csr.c >> b/drivers/gpu/drm/i915/intel_csr.c >> index 77d8b3d483ca..82db376ec7e1 100644 >> --- a/drivers/gpu/drm/i915/intel_csr.c >> +++ b/drivers/gpu/drm/i915/intel_csr.c >> @@ -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; >> -- >> 2.11.0 >> >> ___ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Jani Nikula, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: add support for specifying DMC firmware override by module param
On Tue, Nov 21, 2017 at 01:51:29PM +0200, Jani Nikula wrote: > Use i915.dmc_firmware_path to override default firmware for the platform > and bypassing version checks. > > Signed-off-by: Jani Nikula> > --- > > 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: Tested-by: David Weinehall Reviewed-by: David Weinehall > --- > drivers/gpu/drm/i915/i915_params.c | 3 +++ > drivers/gpu/drm/i915/intel_csr.c | 9 +++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_params.c > b/drivers/gpu/drm/i915/i915_params.c > index 3328147b4863..c11ad6d67fa9 100644 > --- a/drivers/gpu/drm/i915/i915_params.c > +++ b/drivers/gpu/drm/i915/i915_params.c > @@ -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)"); > > diff --git a/drivers/gpu/drm/i915/intel_csr.c > b/drivers/gpu/drm/i915/intel_csr.c > index 77d8b3d483ca..82db376ec7e1 100644 > --- a/drivers/gpu/drm/i915/intel_csr.c > +++ b/drivers/gpu/drm/i915/intel_csr.c > @@ -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; > -- > 2.11.0 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx