Re: [PATCH 06/10] drm/i915/display: rename intel_display_driver_* functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 Apr 2023, Gustavo Sousa <gustavo.sousa@xxxxxxxxx> wrote:
> Quoting Jani Nikula (2023-04-13 06:47:32)
>> Follow the usual naming conventions.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display.c  |  2 +-
>>  .../drm/i915/display/intel_display_driver.c   | 16 +++++++-------
>>  .../drm/i915/display/intel_display_driver.h   | 14 ++++++-------
>>  drivers/gpu/drm/i915/i915_driver.c            | 21 ++++++++++---------
>>  4 files changed, 27 insertions(+), 26 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
>> index 56e3aab7e1c6..f425e5ed155b 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display.c
>> @@ -833,7 +833,7 @@ void intel_display_finish_reset(struct drm_i915_private *i915)
>>                  * so need a full re-initialization.
>>                  */
>>                 intel_pps_unlock_regs_wa(i915);
>> -          intel_modeset_init_hw(i915);
>> +          intel_display_driver_init_hw(i915);
>>                 intel_clock_gating_init(i915);
>>                 intel_hpd_init(i915);
>>  
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
>> index f7805c6f1b63..45e425100385 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
>> @@ -72,7 +72,7 @@ bool intel_display_driver_probe_defer(struct pci_dev *pdev)
>>         return false;
>>  }
>>  
>> -void intel_modeset_init_hw(struct drm_i915_private *i915)
>> +void intel_display_driver_init_hw(struct drm_i915_private *i915)
>>  {
>>         struct intel_cdclk_state *cdclk_state;
>>  
>> @@ -170,7 +170,7 @@ static void intel_plane_possible_crtcs_init(struct drm_i915_private *dev_priv)
>>  }
>>  
>>  /* part #1: call before irq install */
>> -int intel_modeset_init_noirq(struct drm_i915_private *i915)
>> +int intel_display_driver_probe_noirq(struct drm_i915_private *i915)
>>  {
>>         int ret;
>>  
>> @@ -246,7 +246,7 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
>>  }
>>  
>>  /* part #2: call after irq install, but before gem init */
>> -int intel_modeset_init_nogem(struct drm_i915_private *i915)
>> +int intel_display_driver_probe_nogem(struct drm_i915_private *i915)
>>  {
>>         struct drm_device *dev = &i915->drm;
>>         enum pipe pipe;
>> @@ -281,7 +281,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)
>>         intel_fdi_pll_freq_update(i915);
>>  
>>         intel_update_czclk(i915);
>> -  intel_modeset_init_hw(i915);
>> +  intel_display_driver_init_hw(i915);
>>         intel_dpll_update_ref_clks(i915);
>>  
>>         intel_hdcp_component_init(i915);
>> @@ -318,7 +318,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)
>>  }
>>  
>>  /* part #3: call after gem init */
>> -int intel_modeset_init(struct drm_i915_private *i915)
>> +int intel_display_driver_probe(struct drm_i915_private *i915)
>>  {
>>         int ret;
>>  
>> @@ -382,7 +382,7 @@ void intel_display_driver_register(struct drm_i915_private *i915)
>>  }
>>  
>>  /* part #1: call before irq uninstall */
>> -void intel_modeset_driver_remove(struct drm_i915_private *i915)
>> +void intel_display_driver_remove(struct drm_i915_private *i915)
>>  {
>>         if (!HAS_DISPLAY(i915))
>>                 return;
>> @@ -402,7 +402,7 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915)
>>  }
>>  
>>  /* part #2: call after irq uninstall */
>> -void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915)
>> +void intel_display_driver_remove_noirq(struct drm_i915_private *i915)
>>  {
>>         if (!HAS_DISPLAY(i915))
>>                 return;
>> @@ -436,7 +436,7 @@ void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915)
>>  }
>>  
>>  /* part #3: call after gem init */
>> -void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915)
>> +void intel_display_driver_remove_nogem(struct drm_i915_private *i915)
>>  {
>>         intel_dmc_fini(i915);
>>  
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h
>> index 947b666575ee..aab498617b90 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_driver.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
>> @@ -12,14 +12,14 @@ struct drm_i915_private;
>>  struct pci_dev;
>>  
>>  bool intel_display_driver_probe_defer(struct pci_dev *pdev);
>> -void intel_modeset_init_hw(struct drm_i915_private *i915);
>> -int intel_modeset_init_noirq(struct drm_i915_private *i915);
>> -int intel_modeset_init_nogem(struct drm_i915_private *i915);
>> -int intel_modeset_init(struct drm_i915_private *i915);
>> +void intel_display_driver_init_hw(struct drm_i915_private *i915);
>> +int intel_display_driver_probe_noirq(struct drm_i915_private *i915);
>> +int intel_display_driver_probe_nogem(struct drm_i915_private *i915);
>> +int intel_display_driver_probe(struct drm_i915_private *i915);
>>  void intel_display_driver_register(struct drm_i915_private *i915);
>> -void intel_modeset_driver_remove(struct drm_i915_private *i915);
>> -void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915);
>> -void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915);
>> +void intel_display_driver_remove(struct drm_i915_private *i915);
>> +void intel_display_driver_remove_noirq(struct drm_i915_private *i915);
>> +void intel_display_driver_remove_nogem(struct drm_i915_private *i915);
>>  void intel_display_driver_unregister(struct drm_i915_private *i915);
>
> Looks like some comments need to be fixed now:
>
>   ❯ git grep -w -e intel_modeset_init_hw -e intel_modeset_init_noirq -e intel_modeset_init_nogem -e intel_modeset_init -e intel_modeset_driver_remove -e intel_modeset_driver_remove_noirq -e intel_modeset_driver_remove_nogem
>   i915_driver.c: *   - drive output discovery via intel_modeset_init()
>   i915_driver.c:   * Modeset enabling in intel_modeset_init_hw() also needs working
>   i915_irq.c:      * intel_modeset_driver_remove() calling us out of sequence.

Thanks, will fix.

BR,
Jani.

>
> --
> Gustavo Sousa
>
>>  
>>  #endif /* __INTEL_DISPLAY_DRIVER_H__ */
>> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
>> index 5ccb24498cbf..9d06dae47735 100644
>> --- a/drivers/gpu/drm/i915/i915_driver.c
>> +++ b/drivers/gpu/drm/i915/i915_driver.c
>> @@ -791,7 +791,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>>         if (ret < 0)
>>                 goto out_cleanup_mmio;
>>  
>> -  ret = intel_modeset_init_noirq(i915);
>> +  ret = intel_display_driver_probe_noirq(i915);
>>         if (ret < 0)
>>                 goto out_cleanup_hw;
>>  
>> @@ -799,7 +799,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>>         if (ret)
>>                 goto out_cleanup_modeset;
>>  
>> -  ret = intel_modeset_init_nogem(i915);
>> +  ret = intel_display_driver_probe_nogem(i915);
>>         if (ret)
>>                 goto out_cleanup_irq;
>>  
>> @@ -809,7 +809,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>>  
>>         intel_pxp_init(i915);
>>  
>> -  ret = intel_modeset_init(i915);
>> +  ret = intel_display_driver_probe(i915);
>>         if (ret)
>>                 goto out_cleanup_gem;
>>  
>> @@ -829,14 +829,14 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>>         i915_gem_driver_release(i915);
>>  out_cleanup_modeset2:
>>         /* FIXME clean up the error path */
>> -  intel_modeset_driver_remove(i915);
>> +  intel_display_driver_remove(i915);
>>         intel_irq_uninstall(i915);
>> -  intel_modeset_driver_remove_noirq(i915);
>> +  intel_display_driver_remove_noirq(i915);
>>         goto out_cleanup_modeset;
>>  out_cleanup_irq:
>>         intel_irq_uninstall(i915);
>>  out_cleanup_modeset:
>> -  intel_modeset_driver_remove_nogem(i915);
>> +  intel_display_driver_remove_nogem(i915);
>>  out_cleanup_hw:
>>         i915_driver_hw_remove(i915);
>>         intel_memory_regions_driver_release(i915);
>> @@ -872,16 +872,16 @@ void i915_driver_remove(struct drm_i915_private *i915)
>>  
>>         intel_gvt_driver_remove(i915);
>>  
>> -  intel_modeset_driver_remove(i915);
>> +  intel_display_driver_remove(i915);
>>  
>>         intel_irq_uninstall(i915);
>>  
>> -  intel_modeset_driver_remove_noirq(i915);
>> +  intel_display_driver_remove_noirq(i915);
>>  
>>         i915_reset_error_state(i915);
>>         i915_gem_driver_remove(i915);
>>  
>> -  intel_modeset_driver_remove_nogem(i915);
>> +  intel_display_driver_remove_nogem(i915);
>>  
>>         i915_driver_hw_remove(i915);
>>  
>> @@ -1244,7 +1244,8 @@ static int i915_drm_resume(struct drm_device *dev)
>>  
>>         i915_gem_resume(dev_priv);
>>  
>> -  intel_modeset_init_hw(dev_priv);
>> +  intel_display_driver_init_hw(dev_priv);
>> +
>>         intel_clock_gating_init(dev_priv);
>>         intel_hpd_init(dev_priv);
>>  
>> -- 
>> 2.39.2
>>

-- 
Jani Nikula, Intel Open Source Graphics Center




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux