mbox series

[v2,00/12] drm/i915: Extend GEN renames to the rest of the driver

Message ID 20210413051002.92589-1-lucas.demarchi@intel.com (mailing list archive)
Headers show
Series drm/i915: Extend GEN renames to the rest of the driver | expand

Message

Lucas De Marchi April 13, 2021, 5:09 a.m. UTC
Like was done for the display part that parted ways with INTEL_GEN(),
replacing with DISPLAY_VER(), do a similar conversion for the rest of
the driver.

v1.1: Remove .ko that was incorrectly added as part of patch 11, making it
very big and not going through the mailing list. Sorry for those in CC
who received it.

v2:
  - Add "drm/i915/display: rename display version macros" to rename
    macro and repurpose it: s/IS_DISPLAY_RANGE/IS_DISPLAY_VER/ and convert
    the current users of IS_DISPLAY_VER to use direct comparison
  - Group display patches to easily apply independently

Lucas De Marchi (12):
  drm/i915/display: use DISPLAY_VER() on remaining users
  drm/i915: rename display.version to display.ver
  drm/i915/display: rename display version macros
  drm/i915: add macros for graphics and media versions
  drm/i915/gt: replace gen use in intel_engine_cs
  drm/i915/selftests: replace unused mask with simple version
  drm/i915/selftests: eliminate use of gen_mask
  drm/i915: finish removal of gen_mask
  drm/i915: eliminate remaining uses of intel_device_info->gen
  drm/i915: finish removal of gen from intel_device_info
  drm/i915: add media and display versions to device_info print
  drm/i915: split dgfx features from gen 12

 drivers/gpu/drm/i915/display/i9xx_plane.c     |  2 +-
 drivers/gpu/drm/i915/display/icl_dsi.c        |  4 +-
 drivers/gpu/drm/i915/display/intel_atomic.c   |  2 +-
 drivers/gpu/drm/i915/display/intel_audio.c    |  4 +-
 drivers/gpu/drm/i915/display/intel_bios.c     |  4 +-
 drivers/gpu/drm/i915/display/intel_bw.c       |  8 +--
 drivers/gpu/drm/i915/display/intel_cdclk.c    | 18 +++---
 drivers/gpu/drm/i915/display/intel_color.c    |  6 +-
 drivers/gpu/drm/i915/display/intel_crt.c      |  6 +-
 drivers/gpu/drm/i915/display/intel_crtc.c     |  4 +-
 drivers/gpu/drm/i915/display/intel_csr.c      |  2 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      | 26 ++++-----
 .../drm/i915/display/intel_ddi_buf_trans.c    |  8 +--
 drivers/gpu/drm/i915/display/intel_display.c  | 56 +++++++++----------
 .../drm/i915/display/intel_display_power.c    | 26 ++++-----
 drivers/gpu/drm/i915/display/intel_dp.c       |  8 +--
 drivers/gpu/drm/i915/display/intel_dpll.c     |  2 +-
 drivers/gpu/drm/i915/display/intel_dpll_mgr.c |  2 +-
 drivers/gpu/drm/i915/display/intel_fb.c       |  2 +-
 drivers/gpu/drm/i915/display/intel_fbc.c      | 20 +++----
 .../drm/i915/display/intel_fifo_underrun.c    |  4 +-
 drivers/gpu/drm/i915/display/intel_gmbus.c    |  4 +-
 drivers/gpu/drm/i915/display/intel_hdcp.c     |  2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c     |  4 +-
 drivers/gpu/drm/i915/display/intel_lvds.c     |  2 +-
 drivers/gpu/drm/i915/display/intel_overlay.c  | 10 ++--
 drivers/gpu/drm/i915/display/intel_panel.c    |  8 +--
 drivers/gpu/drm/i915/display/intel_pipe_crc.c |  4 +-
 drivers/gpu/drm/i915/display/intel_psr.c      |  4 +-
 drivers/gpu/drm/i915/display/intel_tc.c       |  6 +-
 drivers/gpu/drm/i915/display/intel_tv.c       |  6 +-
 .../drm/i915/display/skl_universal_plane.c    |  8 +--
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    | 22 ++++----
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     | 40 ++++++-------
 drivers/gpu/drm/i915/gt/selftest_engine_cs.c  | 18 +++---
 .../gpu/drm/i915/gt/selftest_workarounds.c    | 10 ++--
 drivers/gpu/drm/i915/i915_drv.c               |  4 +-
 drivers/gpu/drm/i915/i915_drv.h               | 41 ++++++++------
 drivers/gpu/drm/i915/i915_irq.c               | 10 ++--
 drivers/gpu/drm/i915/i915_pci.c               | 13 +++--
 drivers/gpu/drm/i915/intel_device_info.c      |  4 +-
 drivers/gpu/drm/i915/intel_device_info.h      |  6 +-
 drivers/gpu/drm/i915/intel_pm.c               | 48 ++++++++--------
 drivers/gpu/drm/i915/intel_uncore.c           |  8 ++-
 drivers/gpu/drm/i915/selftests/intel_uncore.c |  8 ++-
 .../gpu/drm/i915/selftests/mock_gem_device.c  |  2 +-
 46 files changed, 260 insertions(+), 246 deletions(-)

Comments

Jani Nikula April 13, 2021, 10:03 a.m. UTC | #1
On Mon, 12 Apr 2021, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> Like was done for the display part that parted ways with INTEL_GEN(),
> replacing with DISPLAY_VER(), do a similar conversion for the rest of
> the driver.
>
> v1.1: Remove .ko that was incorrectly added as part of patch 11, making it
> very big and not going through the mailing list. Sorry for those in CC
> who received it.
>
> v2:
>   - Add "drm/i915/display: rename display version macros" to rename
>     macro and repurpose it: s/IS_DISPLAY_RANGE/IS_DISPLAY_VER/ and convert
>     the current users of IS_DISPLAY_VER to use direct comparison
>   - Group display patches to easily apply independently

I like the direction here. Even as the version checks diversify, we
manage to simplify and reduce the macros.

I think we're going to have to queueu this via a topic branch, and merge
that to both drm-intel-next and drm-intel-gt-next. The next time the
branches can sync up is just too far away at this point, and the
conflicts may be really nasty to solve later.

That does mean having to solve the conflict with 70bfb30743d5
("drm/i915/display: Eliminate IS_GEN9_{BC,LP}") which is in din but not
dign. The topic branch would be based on:

$ git merge-base drm-intel/drm-intel-next drm-intel/drm-intel-gt-next
9c0fed84d5750e1eea6c664e073ffa2534a17743

There are two (crappy?) ideas to make that easier. 1) revert
70bfb30743d5 from din and add it to the topic branch instead, 2) don't
revert it but cherry-pick it to the topic branch also.

Cc: Joonas and Daniel for their input on this as well.


BR,
Jani.
Jani Nikula April 14, 2021, 8:08 a.m. UTC | #2
On Tue, 13 Apr 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Mon, 12 Apr 2021, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>> Like was done for the display part that parted ways with INTEL_GEN(),
>> replacing with DISPLAY_VER(), do a similar conversion for the rest of
>> the driver.
>>
>> v1.1: Remove .ko that was incorrectly added as part of patch 11, making it
>> very big and not going through the mailing list. Sorry for those in CC
>> who received it.
>>
>> v2:
>>   - Add "drm/i915/display: rename display version macros" to rename
>>     macro and repurpose it: s/IS_DISPLAY_RANGE/IS_DISPLAY_VER/ and convert
>>     the current users of IS_DISPLAY_VER to use direct comparison
>>   - Group display patches to easily apply independently
>
> I like the direction here. Even as the version checks diversify, we
> manage to simplify and reduce the macros.
>
> I think we're going to have to queueu this via a topic branch, and merge
> that to both drm-intel-next and drm-intel-gt-next. The next time the
> branches can sync up is just too far away at this point, and the
> conflicts may be really nasty to solve later.
>
> That does mean having to solve the conflict with 70bfb30743d5
> ("drm/i915/display: Eliminate IS_GEN9_{BC,LP}") which is in din but not
> dign. The topic branch would be based on:
>
> $ git merge-base drm-intel/drm-intel-next drm-intel/drm-intel-gt-next
> 9c0fed84d5750e1eea6c664e073ffa2534a17743
>
> There are two (crappy?) ideas to make that easier. 1) revert
> 70bfb30743d5 from din and add it to the topic branch instead, 2) don't
> revert it but cherry-pick it to the topic branch also.
>
> Cc: Joonas and Daniel for their input on this as well.

I've created the topic branch topic/intel-gen-to-ver where the series
should be applied.

However, for the reasons above, it does not apply as-is, and the merge
will conflict slightly.

Also, I think Ville's fixes [1] should land on the topic branch *first*
because they need to be propagated to drm-intel-next-fixes.


BR,
Jani.


[1] https://lore.kernel.org/intel-gfx/20210412054607.18133-1-ville.syrjala@linux.intel.com/
Jani Nikula April 14, 2021, 10:06 a.m. UTC | #3
On Wed, 14 Apr 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Tue, 13 Apr 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> On Mon, 12 Apr 2021, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>>> Like was done for the display part that parted ways with INTEL_GEN(),
>>> replacing with DISPLAY_VER(), do a similar conversion for the rest of
>>> the driver.
>>>
>>> v1.1: Remove .ko that was incorrectly added as part of patch 11, making it
>>> very big and not going through the mailing list. Sorry for those in CC
>>> who received it.
>>>
>>> v2:
>>>   - Add "drm/i915/display: rename display version macros" to rename
>>>     macro and repurpose it: s/IS_DISPLAY_RANGE/IS_DISPLAY_VER/ and convert
>>>     the current users of IS_DISPLAY_VER to use direct comparison
>>>   - Group display patches to easily apply independently
>>
>> I like the direction here. Even as the version checks diversify, we
>> manage to simplify and reduce the macros.
>>
>> I think we're going to have to queueu this via a topic branch, and merge
>> that to both drm-intel-next and drm-intel-gt-next. The next time the
>> branches can sync up is just too far away at this point, and the
>> conflicts may be really nasty to solve later.
>>
>> That does mean having to solve the conflict with 70bfb30743d5
>> ("drm/i915/display: Eliminate IS_GEN9_{BC,LP}") which is in din but not
>> dign. The topic branch would be based on:
>>
>> $ git merge-base drm-intel/drm-intel-next drm-intel/drm-intel-gt-next
>> 9c0fed84d5750e1eea6c664e073ffa2534a17743
>>
>> There are two (crappy?) ideas to make that easier. 1) revert
>> 70bfb30743d5 from din and add it to the topic branch instead, 2) don't
>> revert it but cherry-pick it to the topic branch also.
>>
>> Cc: Joonas and Daniel for their input on this as well.
>
> I've created the topic branch topic/intel-gen-to-ver where the series
> should be applied.
>
> However, for the reasons above, it does not apply as-is, and the merge
> will conflict slightly.
>
> Also, I think Ville's fixes [1] should land on the topic branch *first*
> because they need to be propagated to drm-intel-next-fixes.

I went ahead and:

* Created the topic branch topic/intel-gen-to-ver with the merge-base
  mentioned above.

* Cherry-picked 70bfb30743d5 on the topic branch to avoid major
  conflicts, as suggested by Daniel on IRC.

* Reviewed and applied Ville's series [1] on the topic branch.

* Reviewed and applied this series on the topic branch.

  - There were a couple of tiny conflicts between patch 3 and Ville's
    series, and I fixed the conflicts while applying.

  - I also fixed my comment nitpicks while applying.

  - I usually refrain from doing any changes while applying, but in this
    case I considered the changes very small, and did not want to delay
    this any further.

Please chime in now if you have issues with this series! Explicit acks
would be much appreciated; they can be added to the topic merge commit.

I hope to send the pull request and get this merged by Thursday, to
avoid creating more conflicts.


BR,
Jani.

>
>
> [1] https://lore.kernel.org/intel-gfx/20210412054607.18133-1-ville.syrjala@linux.intel.com/
Joonas Lahtinen April 14, 2021, 11:17 a.m. UTC | #4
+ Tvrtko

Quoting Jani Nikula (2021-04-14 13:06:42)
> On Wed, 14 Apr 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> > On Tue, 13 Apr 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >> On Mon, 12 Apr 2021, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> >>> Like was done for the display part that parted ways with INTEL_GEN(),
> >>> replacing with DISPLAY_VER(), do a similar conversion for the rest of
> >>> the driver.
> >>>
> >>> v1.1: Remove .ko that was incorrectly added as part of patch 11, making it
> >>> very big and not going through the mailing list. Sorry for those in CC
> >>> who received it.
> >>>
> >>> v2:
> >>>   - Add "drm/i915/display: rename display version macros" to rename
> >>>     macro and repurpose it: s/IS_DISPLAY_RANGE/IS_DISPLAY_VER/ and convert
> >>>     the current users of IS_DISPLAY_VER to use direct comparison
> >>>   - Group display patches to easily apply independently
> >>
> >> I like the direction here. Even as the version checks diversify, we
> >> manage to simplify and reduce the macros.
> >>
> >> I think we're going to have to queueu this via a topic branch, and merge
> >> that to both drm-intel-next and drm-intel-gt-next. The next time the
> >> branches can sync up is just too far away at this point, and the
> >> conflicts may be really nasty to solve later.
> >>
> >> That does mean having to solve the conflict with 70bfb30743d5
> >> ("drm/i915/display: Eliminate IS_GEN9_{BC,LP}") which is in din but not
> >> dign. The topic branch would be based on:
> >>
> >> $ git merge-base drm-intel/drm-intel-next drm-intel/drm-intel-gt-next
> >> 9c0fed84d5750e1eea6c664e073ffa2534a17743
> >>
> >> There are two (crappy?) ideas to make that easier. 1) revert
> >> 70bfb30743d5 from din and add it to the topic branch instead, 2) don't
> >> revert it but cherry-pick it to the topic branch also.
> >>
> >> Cc: Joonas and Daniel for their input on this as well.
> >
> > I've created the topic branch topic/intel-gen-to-ver where the series
> > should be applied.
> >
> > However, for the reasons above, it does not apply as-is, and the merge
> > will conflict slightly.
> >
> > Also, I think Ville's fixes [1] should land on the topic branch *first*
> > because they need to be propagated to drm-intel-next-fixes.
> 
> I went ahead and:
> 
> * Created the topic branch topic/intel-gen-to-ver with the merge-base
>   mentioned above.
> 
> * Cherry-picked 70bfb30743d5 on the topic branch to avoid major
>   conflicts, as suggested by Daniel on IRC.
> 
> * Reviewed and applied Ville's series [1] on the topic branch.
> 
> * Reviewed and applied this series on the topic branch.
> 
>   - There were a couple of tiny conflicts between patch 3 and Ville's
>     series, and I fixed the conflicts while applying.
> 
>   - I also fixed my comment nitpicks while applying.
> 
>   - I usually refrain from doing any changes while applying, but in this
>     case I considered the changes very small, and did not want to delay
>     this any further.
> 
> Please chime in now if you have issues with this series! Explicit acks
> would be much appreciated; they can be added to the topic merge commit.

I think GT_VER() would be preferred over the more ambiguous GRAPHICS_VER()
and would better align with the attempt to consolidate the naming
difference between display and GT.

The GPU as whole is referred to as Intel Graphics, so otherwise will be
easy to draw wrong conclusions for 3rd parties looking at the code.

With GT_VER() or something else more distinctive this is:

Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas

> 
> I hope to send the pull request and get this merged by Thursday, to
> avoid creating more conflicts.
> 
> 
> BR,
> Jani.
> 
> >
> >
> > [1] https://lore.kernel.org/intel-gfx/20210412054607.18133-1-ville.syrjala@linux.intel.com/
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center