diff mbox series

drm/i915/dmc: Eliminate remnant GEN<n> references

Message ID 20211217034141.198033-1-madhumitha.tolakanahalli.pradeep@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dmc: Eliminate remnant GEN<n> references | expand

Commit Message

Tolakanahalli Pradeep, Madhumitha Dec. 17, 2021, 3:41 a.m. UTC
Replace GEN<n> with DISPLAY_VER<n>, in line with the naming convention
followed in the i915 driver code.

Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dmc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Yokoyama, Caz Dec. 17, 2021, 9:37 p.m. UTC | #1
On Thu, 2021-12-16 at 19:41 -0800, Madhumitha Tolakanahalli Pradeep
wrote:
> Replace GEN<n> with DISPLAY_VER<n>, in line with the naming
> convention
> followed in the i915 driver code.
> 
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <
> madhumitha.tolakanahalli.pradeep@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dmc.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c
> b/drivers/gpu/drm/i915/display/intel_dmc.c
> index a69b28d65a9b..7616a3906b9e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> @@ -43,9 +43,9 @@
>  	__stringify(major) "_"		 \
>  	__stringify(minor) ".bin"
>  
> -#define GEN12_DMC_MAX_FW_SIZE		ICL_DMC_MAX_FW_SIZE
> +#define DISPLAY_VER13_DMC_MAX_FW_SIZE	0x20000
>  
> -#define GEN13_DMC_MAX_FW_SIZE		0x20000
> +#define DISPLAY_VER12_DMC_MAX_FW_SIZE	ICL_DMC_MAX_FW_SIZE
Why the order of GEN12/13 and VER12/13 is reversed?
Other than that, LGTM.
-caz

>  
>  #define ADLP_DMC_PATH			DMC_PATH(adlp, 2, 14)
>  #define ADLP_DMC_VERSION_REQUIRED	DMC_VERSION(2, 14)
> @@ -684,23 +684,23 @@ void intel_dmc_ucode_init(struct
> drm_i915_private *dev_priv)
>  	if (IS_ALDERLAKE_P(dev_priv)) {
>  		dmc->fw_path = ADLP_DMC_PATH;
>  		dmc->required_version = ADLP_DMC_VERSION_REQUIRED;
> -		dmc->max_fw_size = GEN13_DMC_MAX_FW_SIZE;
> +		dmc->max_fw_size = DISPLAY_VER13_DMC_MAX_FW_SIZE;
>  	} else if (IS_ALDERLAKE_S(dev_priv)) {
>  		dmc->fw_path = ADLS_DMC_PATH;
>  		dmc->required_version = ADLS_DMC_VERSION_REQUIRED;
> -		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> +		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
>  	} else if (IS_DG1(dev_priv)) {
>  		dmc->fw_path = DG1_DMC_PATH;
>  		dmc->required_version = DG1_DMC_VERSION_REQUIRED;
> -		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> +		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
>  	} else if (IS_ROCKETLAKE(dev_priv)) {
>  		dmc->fw_path = RKL_DMC_PATH;
>  		dmc->required_version = RKL_DMC_VERSION_REQUIRED;
> -		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> +		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
>  	} else if (DISPLAY_VER(dev_priv) >= 12) {
>  		dmc->fw_path = TGL_DMC_PATH;
>  		dmc->required_version = TGL_DMC_VERSION_REQUIRED;
> -		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> +		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
>  	} else if (DISPLAY_VER(dev_priv) == 11) {
>  		dmc->fw_path = ICL_DMC_PATH;
>  		dmc->required_version = ICL_DMC_VERSION_REQUIRED;
Tolakanahalli Pradeep, Madhumitha Dec. 23, 2021, 3:18 a.m. UTC | #2
On Fri, 2021-12-17 at 21:37 +0000, Yokoyama, Caz wrote:
> On Thu, 2021-12-16 at 19:41 -0800, Madhumitha Tolakanahalli Pradeep
> wrote:
> > Replace GEN<n> with DISPLAY_VER<n>, in line with the naming
> > convention
> > followed in the i915 driver code.
> > 
> > Signed-off-by: Madhumitha Tolakanahalli Pradeep <
> > madhumitha.tolakanahalli.pradeep@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dmc.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c
> > b/drivers/gpu/drm/i915/display/intel_dmc.c
> > index a69b28d65a9b..7616a3906b9e 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> > @@ -43,9 +43,9 @@
> >         __stringify(major) "_"           \
> >         __stringify(minor) ".bin"
> >  
> > -#define GEN12_DMC_MAX_FW_SIZE          ICL_DMC_MAX_FW_SIZE
> > +#define DISPLAY_VER13_DMC_MAX_FW_SIZE  0x20000
> >  
> > -#define GEN13_DMC_MAX_FW_SIZE          0x20000
> > +#define DISPLAY_VER12_DMC_MAX_FW_SIZE  ICL_DMC_MAX_FW_SIZE
> Why the order of GEN12/13 and VER12/13 is reversed?
> Other than that, LGTM.
> -caz

I had first defined GEN13 below GEN12, interchanged them to follow
the usual convention of latest-gen-first.

- Madhumitha

> >  
> >  #define ADLP_DMC_PATH                  DMC_PATH(adlp, 2, 14)
> >  #define ADLP_DMC_VERSION_REQUIRED      DMC_VERSION(2, 14)
> > @@ -684,23 +684,23 @@ void intel_dmc_ucode_init(struct
> > drm_i915_private *dev_priv)
> >         if (IS_ALDERLAKE_P(dev_priv)) {
> >                 dmc->fw_path = ADLP_DMC_PATH;
> >                 dmc->required_version = ADLP_DMC_VERSION_REQUIRED;
> > -               dmc->max_fw_size = GEN13_DMC_MAX_FW_SIZE;
> > +               dmc->max_fw_size = DISPLAY_VER13_DMC_MAX_FW_SIZE;
> >         } else if (IS_ALDERLAKE_S(dev_priv)) {
> >                 dmc->fw_path = ADLS_DMC_PATH;
> >                 dmc->required_version = ADLS_DMC_VERSION_REQUIRED;
> > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> >         } else if (IS_DG1(dev_priv)) {
> >                 dmc->fw_path = DG1_DMC_PATH;
> >                 dmc->required_version = DG1_DMC_VERSION_REQUIRED;
> > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> >         } else if (IS_ROCKETLAKE(dev_priv)) {
> >                 dmc->fw_path = RKL_DMC_PATH;
> >                 dmc->required_version = RKL_DMC_VERSION_REQUIRED;
> > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> >         } else if (DISPLAY_VER(dev_priv) >= 12) {
> >                 dmc->fw_path = TGL_DMC_PATH;
> >                 dmc->required_version = TGL_DMC_VERSION_REQUIRED;
> > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> >         } else if (DISPLAY_VER(dev_priv) == 11) {
> >                 dmc->fw_path = ICL_DMC_PATH;
> >                 dmc->required_version = ICL_DMC_VERSION_REQUIRED;
Yokoyama, Caz Jan. 4, 2022, 7:16 p.m. UTC | #3
Reviewed-by: Caz Yokoyama <caz.yokoyama@intel.com>
-caz

On Thu, 2021-12-23 at 03:18 +0000, Tolakanahalli Pradeep, Madhumitha
wrote:
> On Fri, 2021-12-17 at 21:37 +0000, Yokoyama, Caz wrote:
> > On Thu, 2021-12-16 at 19:41 -0800, Madhumitha Tolakanahalli Pradeep
> > wrote:
> > > Replace GEN<n> with DISPLAY_VER<n>, in line with the naming
> > > convention
> > > followed in the i915 driver code.
> > > 
> > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <
> > > madhumitha.tolakanahalli.pradeep@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_dmc.c | 14 +++++++-------
> > >  1 file changed, 7 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c
> > > b/drivers/gpu/drm/i915/display/intel_dmc.c
> > > index a69b28d65a9b..7616a3906b9e 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> > > @@ -43,9 +43,9 @@
> > >         __stringify(major) "_"           \
> > >         __stringify(minor) ".bin"
> > >  
> > > -#define GEN12_DMC_MAX_FW_SIZE          ICL_DMC_MAX_FW_SIZE
> > > +#define DISPLAY_VER13_DMC_MAX_FW_SIZE  0x20000
> > >  
> > > -#define GEN13_DMC_MAX_FW_SIZE          0x20000
> > > +#define DISPLAY_VER12_DMC_MAX_FW_SIZE  ICL_DMC_MAX_FW_SIZE
> > Why the order of GEN12/13 and VER12/13 is reversed?
> > Other than that, LGTM.
> > -caz
> 
> I had first defined GEN13 below GEN12, interchanged them to follow
> the usual convention of latest-gen-first.
> 
> - Madhumitha
> 
> > >  
> > >  #define ADLP_DMC_PATH                  DMC_PATH(adlp, 2, 14)
> > >  #define ADLP_DMC_VERSION_REQUIRED      DMC_VERSION(2, 14)
> > > @@ -684,23 +684,23 @@ void intel_dmc_ucode_init(struct
> > > drm_i915_private *dev_priv)
> > >         if (IS_ALDERLAKE_P(dev_priv)) {
> > >                 dmc->fw_path = ADLP_DMC_PATH;
> > >                 dmc->required_version =
> > > ADLP_DMC_VERSION_REQUIRED;
> > > -               dmc->max_fw_size = GEN13_DMC_MAX_FW_SIZE;
> > > +               dmc->max_fw_size = DISPLAY_VER13_DMC_MAX_FW_SIZE;
> > >         } else if (IS_ALDERLAKE_S(dev_priv)) {
> > >                 dmc->fw_path = ADLS_DMC_PATH;
> > >                 dmc->required_version =
> > > ADLS_DMC_VERSION_REQUIRED;
> > > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> > >         } else if (IS_DG1(dev_priv)) {
> > >                 dmc->fw_path = DG1_DMC_PATH;
> > >                 dmc->required_version = DG1_DMC_VERSION_REQUIRED;
> > > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> > >         } else if (IS_ROCKETLAKE(dev_priv)) {
> > >                 dmc->fw_path = RKL_DMC_PATH;
> > >                 dmc->required_version = RKL_DMC_VERSION_REQUIRED;
> > > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> > >         } else if (DISPLAY_VER(dev_priv) >= 12) {
> > >                 dmc->fw_path = TGL_DMC_PATH;
> > >                 dmc->required_version = TGL_DMC_VERSION_REQUIRED;
> > > -               dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
> > > +               dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
> > >         } else if (DISPLAY_VER(dev_priv) == 11) {
> > >                 dmc->fw_path = ICL_DMC_PATH;
> > >                 dmc->required_version = ICL_DMC_VERSION_REQUIRED;
Lucas De Marchi Jan. 18, 2022, 9:37 p.m. UTC | #4
On Thu, Dec 23, 2021 at 03:18:57AM +0000, Tolakanahalli Pradeep, Madhumitha wrote:
>On Fri, 2021-12-17 at 21:37 +0000, Yokoyama, Caz wrote:
>> On Thu, 2021-12-16 at 19:41 -0800, Madhumitha Tolakanahalli Pradeep
>> wrote:
>> > Replace GEN<n> with DISPLAY_VER<n>, in line with the naming
>> > convention
>> > followed in the i915 driver code.
>> >
>> > Signed-off-by: Madhumitha Tolakanahalli Pradeep <
>> > madhumitha.tolakanahalli.pradeep@intel.com>

I was checking to apply this today, but BAT is failing on CI and it
didn't trigger the full run. Error seems unrelated and I don't think
this would trigger any error in the machines in CI, but I'd prefer to
merge this with a clean run.

Can you re-submit or trigger it again via patchwork if the patch still
applies?

thanks
Lucas De Marchi
Tolakanahalli Pradeep, Madhumitha Jan. 20, 2022, 3:31 a.m. UTC | #5
On Tue, 2022-01-18 at 13:37 -0800, Lucas De Marchi wrote:
> On Thu, Dec 23, 2021 at 03:18:57AM +0000, Tolakanahalli Pradeep,
> Madhumitha wrote:
> > On Fri, 2021-12-17 at 21:37 +0000, Yokoyama, Caz wrote:
> > > On Thu, 2021-12-16 at 19:41 -0800, Madhumitha Tolakanahalli
> > > Pradeep
> > > wrote:
> > > > Replace GEN<n> with DISPLAY_VER<n>, in line with the naming
> > > > convention
> > > > followed in the i915 driver code.
> > > > 
> > > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <
> > > > madhumitha.tolakanahalli.pradeep@intel.com>
> 
> I was checking to apply this today, but BAT is failing on CI and it
> didn't trigger the full run. Error seems unrelated and I don't think
> this would trigger any error in the machines in CI, but I'd prefer to
> merge this with a clean run.
> 
> Can you re-submit or trigger it again via patchwork if the patch
> still
> applies?
> 
> thanks
> Lucas De Marchi

The error does seem pretty random. I've triggered a rerun, awaiting
results.

Thanks!
- Madhumitha
Lucas De Marchi Jan. 20, 2022, 7:10 p.m. UTC | #6
On Thu, Jan 20, 2022 at 03:31:34AM +0000, Tolakanahalli Pradeep, Madhumitha wrote:
>On Tue, 2022-01-18 at 13:37 -0800, Lucas De Marchi wrote:
>> On Thu, Dec 23, 2021 at 03:18:57AM +0000, Tolakanahalli Pradeep,
>> Madhumitha wrote:
>> > On Fri, 2021-12-17 at 21:37 +0000, Yokoyama, Caz wrote:
>> > > On Thu, 2021-12-16 at 19:41 -0800, Madhumitha Tolakanahalli
>> > > Pradeep
>> > > wrote:
>> > > > Replace GEN<n> with DISPLAY_VER<n>, in line with the naming
>> > > > convention
>> > > > followed in the i915 driver code.
>> > > >
>> > > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <
>> > > > madhumitha.tolakanahalli.pradeep@intel.com>
>>
>> I was checking to apply this today, but BAT is failing on CI and it
>> didn't trigger the full run. Error seems unrelated and I don't think
>> this would trigger any error in the machines in CI, but I'd prefer to
>> merge this with a clean run.
>>
>> Can you re-submit or trigger it again via patchwork if the patch
>> still
>> applies?
>>
>> thanks
>> Lucas De Marchi
>
>The error does seem pretty random. I've triggered a rerun, awaiting
>results.

CI results are now clean. Pushed.

thanks
Lucas De Marchi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
index a69b28d65a9b..7616a3906b9e 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -43,9 +43,9 @@ 
 	__stringify(major) "_"		 \
 	__stringify(minor) ".bin"
 
-#define GEN12_DMC_MAX_FW_SIZE		ICL_DMC_MAX_FW_SIZE
+#define DISPLAY_VER13_DMC_MAX_FW_SIZE	0x20000
 
-#define GEN13_DMC_MAX_FW_SIZE		0x20000
+#define DISPLAY_VER12_DMC_MAX_FW_SIZE	ICL_DMC_MAX_FW_SIZE
 
 #define ADLP_DMC_PATH			DMC_PATH(adlp, 2, 14)
 #define ADLP_DMC_VERSION_REQUIRED	DMC_VERSION(2, 14)
@@ -684,23 +684,23 @@  void intel_dmc_ucode_init(struct drm_i915_private *dev_priv)
 	if (IS_ALDERLAKE_P(dev_priv)) {
 		dmc->fw_path = ADLP_DMC_PATH;
 		dmc->required_version = ADLP_DMC_VERSION_REQUIRED;
-		dmc->max_fw_size = GEN13_DMC_MAX_FW_SIZE;
+		dmc->max_fw_size = DISPLAY_VER13_DMC_MAX_FW_SIZE;
 	} else if (IS_ALDERLAKE_S(dev_priv)) {
 		dmc->fw_path = ADLS_DMC_PATH;
 		dmc->required_version = ADLS_DMC_VERSION_REQUIRED;
-		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
+		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
 	} else if (IS_DG1(dev_priv)) {
 		dmc->fw_path = DG1_DMC_PATH;
 		dmc->required_version = DG1_DMC_VERSION_REQUIRED;
-		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
+		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
 	} else if (IS_ROCKETLAKE(dev_priv)) {
 		dmc->fw_path = RKL_DMC_PATH;
 		dmc->required_version = RKL_DMC_VERSION_REQUIRED;
-		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
+		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
 	} else if (DISPLAY_VER(dev_priv) >= 12) {
 		dmc->fw_path = TGL_DMC_PATH;
 		dmc->required_version = TGL_DMC_VERSION_REQUIRED;
-		dmc->max_fw_size = GEN12_DMC_MAX_FW_SIZE;
+		dmc->max_fw_size = DISPLAY_VER12_DMC_MAX_FW_SIZE;
 	} else if (DISPLAY_VER(dev_priv) == 11) {
 		dmc->fw_path = ICL_DMC_PATH;
 		dmc->required_version = ICL_DMC_VERSION_REQUIRED;