[Intel-gfx] [PATCH v6 0/7] drm: Introduce struct drm_device based WARN* and use them in i915

Pankaj Bharadiya pankaj.laxminarayan.bharadiya at intel.com
Wed Feb 5 17:34:12 UTC 2020


Device specific dev_WARN and dev_WARN_ONCE macros available in kernel
include device information in the backtrace, so we know what device
the warnings originate from.

Similar to this, add new struct drm_device based drm_WARN* macros. These
macros include device information in the backtrace, so we know
what device the warnings originate from. Knowing the device specific
information in the backtrace would be helpful in development all
around.

This patch series aims to convert calls of WARN(), WARN_ON(),
WARN_ONCE() and WARN_ON_ONCE() in i915 driver to use the drm
device-specific variants automatically wherever struct device pointer
is available.

To do this, this patch series -
  - introduces new struct drm_device based WARN* macros
  - automatically converts WARN* with device specific dev_WARN*
    variants using coccinelle semantic patch scripts.

The goal is to convert all the calls of WARN* with drm_WARN* in i915,
but there are still cases where device pointer is not readily
available in some functions (or I missed them somehow) using WARN*
hence some manual churning is needed. Handle such remaining cases
separately later.

changes since v5:
   - rebase unmerged patches onto drm-tip
     (db0579be2554 drm-tip: 2020y-02m-05d-10h-51m-13s UTC integration manifest)

changes since v4:
   - Address Jani's comment
     - split major i915/display related conversions per file into
       seperate patches so that non conflicting patches can be
       merged.

changes since v3:
  - rebase pending unmerged patches on drm-tip
	(bc626bbb5b6e drm-tip: 2020y-01m-25d-14h-28m-41s UTC integration manifest)

changes since v2:
  - rebase pending unmerged patches on drm-tip

changes since v1:
  - Address Jani's review comments
    - Fix typo in comment of patch 0001
    - Get rid of helper functions
    - Split patches by directory

Changes since RFC at [1]
  - Introduce drm_WARN* macros and use them as suggested by Sam and Jani
  - Get rid of extra local variables

[1] https://patchwork.freedesktop.org/series/71668/


*** BLURB HERE ***

Pankaj Bharadiya (7):
  drm/i915/display/cdclk: Make WARN* drm specific where drm_priv ptr is
    available
  drm/i915/display/ddi: Make WARN* drm specific where drm_device ptr is
    available
  drm/i915/display/display: Make WARN* drm specific where drm_device ptr
    is available
  drm/i915/display/power: Make WARN* drm specific where drm_priv ptr is
    available
  drm/i915/display/dp: Make WARN* drm specific where drm_device ptr is
    available
  drm/i915/display/global_state: Make WARN* drm specific where
    drm_device ptr is available
  drm/i915/display/hdcp: Make WARN* drm specific where drm_priv ptr is
    available

 drivers/gpu/drm/i915/display/intel_cdclk.c    |  85 ++++---
 drivers/gpu/drm/i915/display/intel_ddi.c      |  92 ++++---
 drivers/gpu/drm/i915/display/intel_display.c  | 238 ++++++++++--------
 .../drm/i915/display/intel_display_power.c    | 174 +++++++------
 drivers/gpu/drm/i915/display/intel_dp.c       | 118 +++++----
 .../gpu/drm/i915/display/intel_global_state.c |   4 +-
 drivers/gpu/drm/i915/display/intel_hdcp.c     |  20 +-
 7 files changed, 417 insertions(+), 314 deletions(-)

-- 
2.23.0



More information about the dri-devel mailing list