All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
To: jani.nikula@linux.intel.com, daniel@ffwll.ch,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: pankaj.laxminarayan.bharadiya@intel.com
Subject: [Intel-gfx] [PATCH v7 0/8] drm: Introduce struct drm_device based WARN* and use them in i915
Date: Thu, 20 Feb 2020 22:24:59 +0530	[thread overview]
Message-ID: <20200220165507.16823-1-pankaj.laxminarayan.bharadiya@intel.com> (raw)

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 v6: 
   - rebase unmerged patches onto drm-tip
     (07350317e4b2 dm-tip: 2020y-02m-20d-12h-11m-40s UTC integration manifest)

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/


Pankaj Bharadiya (8):
  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/hdcp: Make WARN* drm specific where drm_priv ptr is available
  drm/i915/gvt: Make WARN* drm specific where drm_priv ptr is available
  drm/i915/gvt: Make WARN* drm specific where vgpu ptr is available

 drivers/gpu/drm/i915/display/intel_cdclk.c    |  84 ++++---
 drivers/gpu/drm/i915/display/intel_ddi.c      |  92 ++++---
 drivers/gpu/drm/i915/display/intel_display.c  | 237 ++++++++++--------
 .../drm/i915/display/intel_display_power.c    | 181 +++++++------
 drivers/gpu/drm/i915/display/intel_dp.c       | 120 +++++----
 drivers/gpu/drm/i915/display/intel_hdcp.c     |  20 +-
 drivers/gpu/drm/i915/gvt/aperture_gm.c        |   6 +-
 drivers/gpu/drm/i915/gvt/cfg_space.c          |  23 +-
 drivers/gpu/drm/i915/gvt/cmd_parser.c         |   4 +-
 drivers/gpu/drm/i915/gvt/display.c            |   6 +-
 drivers/gpu/drm/i915/gvt/dmabuf.c             |   4 +-
 drivers/gpu/drm/i915/gvt/edid.c               |  19 +-
 drivers/gpu/drm/i915/gvt/gtt.c                |  21 +-
 drivers/gpu/drm/i915/gvt/gvt.c                |   4 +-
 drivers/gpu/drm/i915/gvt/handlers.c           |  22 +-
 drivers/gpu/drm/i915/gvt/interrupt.c          |  15 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c              |  10 +-
 drivers/gpu/drm/i915/gvt/mmio.c               |  30 ++-
 drivers/gpu/drm/i915/gvt/mmio_context.c       |   8 +-
 drivers/gpu/drm/i915/gvt/scheduler.c          |   6 +-
 drivers/gpu/drm/i915/gvt/vgpu.c               |   6 +-
 21 files changed, 537 insertions(+), 381 deletions(-)

-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
To: jani.nikula@linux.intel.com, daniel@ffwll.ch,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v7 0/8] drm: Introduce struct drm_device based WARN* and use them in i915
Date: Thu, 20 Feb 2020 22:24:59 +0530	[thread overview]
Message-ID: <20200220165507.16823-1-pankaj.laxminarayan.bharadiya@intel.com> (raw)

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 v6: 
   - rebase unmerged patches onto drm-tip
     (07350317e4b2 dm-tip: 2020y-02m-20d-12h-11m-40s UTC integration manifest)

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/


Pankaj Bharadiya (8):
  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/hdcp: Make WARN* drm specific where drm_priv ptr is available
  drm/i915/gvt: Make WARN* drm specific where drm_priv ptr is available
  drm/i915/gvt: Make WARN* drm specific where vgpu ptr is available

 drivers/gpu/drm/i915/display/intel_cdclk.c    |  84 ++++---
 drivers/gpu/drm/i915/display/intel_ddi.c      |  92 ++++---
 drivers/gpu/drm/i915/display/intel_display.c  | 237 ++++++++++--------
 .../drm/i915/display/intel_display_power.c    | 181 +++++++------
 drivers/gpu/drm/i915/display/intel_dp.c       | 120 +++++----
 drivers/gpu/drm/i915/display/intel_hdcp.c     |  20 +-
 drivers/gpu/drm/i915/gvt/aperture_gm.c        |   6 +-
 drivers/gpu/drm/i915/gvt/cfg_space.c          |  23 +-
 drivers/gpu/drm/i915/gvt/cmd_parser.c         |   4 +-
 drivers/gpu/drm/i915/gvt/display.c            |   6 +-
 drivers/gpu/drm/i915/gvt/dmabuf.c             |   4 +-
 drivers/gpu/drm/i915/gvt/edid.c               |  19 +-
 drivers/gpu/drm/i915/gvt/gtt.c                |  21 +-
 drivers/gpu/drm/i915/gvt/gvt.c                |   4 +-
 drivers/gpu/drm/i915/gvt/handlers.c           |  22 +-
 drivers/gpu/drm/i915/gvt/interrupt.c          |  15 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c              |  10 +-
 drivers/gpu/drm/i915/gvt/mmio.c               |  30 ++-
 drivers/gpu/drm/i915/gvt/mmio_context.c       |   8 +-
 drivers/gpu/drm/i915/gvt/scheduler.c          |   6 +-
 drivers/gpu/drm/i915/gvt/vgpu.c               |   6 +-
 21 files changed, 537 insertions(+), 381 deletions(-)

-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2020-02-20 17:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 16:54 Pankaj Bharadiya [this message]
2020-02-20 16:54 ` [Intel-gfx] [PATCH v7 0/8] drm: Introduce struct drm_device based WARN* and use them in i915 Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 1/8] drm/i915/display/cdclk: Make WARN* drm specific where drm_priv ptr is available Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 2/8] drm/i915/display/ddi: Make WARN* drm specific where drm_device " Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 3/8] drm/i915/display/display: " Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 4/8] drm/i915/display/power: Make WARN* drm specific where drm_priv " Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 5/8] drm/i915/display/dp: Make WARN* drm specific where drm_device " Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 6/8] drm/i915/display/hdcp: Make WARN* drm specific where drm_priv " Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 7/8] drm/i915/gvt: " Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 16:55 ` [Intel-gfx] [PATCH v7 8/8] drm/i915/gvt: Make WARN* drm specific where vgpu " Pankaj Bharadiya
2020-02-20 16:55   ` Pankaj Bharadiya
2020-02-20 21:26 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Introduce struct drm_device based WARN* and use them in i915 (rev7) Patchwork
2020-02-20 22:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-02-23  7:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-02-23 16:09 ` [Intel-gfx] [PATCH v7 0/8] drm: Introduce struct drm_device based WARN* and use them in i915 Jani Nikula
2020-02-23 16:09   ` Jani Nikula
2020-02-24  9:57   ` Zhenyu Wang
2020-02-24  9:57     ` Zhenyu Wang
2020-02-24 11:11     ` Jani Nikula
2020-02-24 11:11       ` Jani Nikula
2020-02-24 11:01       ` Zhenyu Wang
2020-02-24 11:01         ` Zhenyu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200220165507.16823-1-pankaj.laxminarayan.bharadiya@intel.com \
    --to=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.