From: Jani Nikula <jani.nikula@intel.com>
To: Sean Paul <sean@poorly.run>,
Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Cc: David Airlie <airlied@linux.ie>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Maxime Ripard <mripard@kernel.org>,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [Intel-gfx] [ [PATCH v2 01/10] drm/print: introduce new struct drm_device based WARN* macros
Date: Wed, 22 Jan 2020 17:32:49 +0200 [thread overview]
Message-ID: <87blqvecbi.fsf@intel.com> (raw)
In-Reply-To: <CAMavQK+aXO5VMAwCu4jBbah6MkubnO+sUxd+av0A_=Ld_A9kzQ@mail.gmail.com>
On Wed, 22 Jan 2020, Sean Paul <sean@poorly.run> wrote:
> On Tue, Jan 14, 2020 at 10:49 PM Pankaj Bharadiya
> <pankaj.laxminarayan.bharadiya@intel.com> wrote:
>>
>> Add new struct drm_device based WARN* macros. These are modeled after
>> the core kernel device based WARN* macros. These would be preferred
>> over the regular WARN* macros, where possible.
>>
>> 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.
>>
>> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
>
> Acked-by: Sean Paul <sean@poorly.run>
Maarten and Maxime also provided their acks on IRC. Thanks for the
review and acks, I've pushed this to a topic branch, sent the pull
request for drm-misc-next [1], and pulled the same to
drm-intel-next-queued [2] to unblock further work there.
BR,
Jani.
[1] http://lore.kernel.org/r/87eevrecnf.fsf@intel.com
[2] 7c7d5b1ce739 ("Merge tag 'topic/drm-warn-2020-01-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next-queued")
>
>> ---
>> include/drm/drm_print.h | 29 +++++++++++++++++++++++++++++
>> 1 file changed, 29 insertions(+)
>>
>> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
>> index 8f99d389792d..894a0b9437e2 100644
>> --- a/include/drm/drm_print.h
>> +++ b/include/drm/drm_print.h
>> @@ -553,4 +553,33 @@ void __drm_err(const char *format, ...);
>> #define DRM_DEBUG_PRIME_RATELIMITED(fmt, ...) \
>> DRM_DEV_DEBUG_PRIME_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
>>
>> +/*
>> + * struct drm_device based WARNs
>> + *
>> + * drm_WARN*() acts like WARN*(), but with the key difference of
>> + * using device specific information so that we know from which device
>> + * warning is originating from.
>> + *
>> + * Prefer drm_device based drm_WARN* over regular WARN*
>> + */
>> +
>> +/* Helper for struct drm_device based WARNs */
>> +#define drm_WARN(drm, condition, format, arg...) \
>> + WARN(condition, "%s %s: " format, \
>> + dev_driver_string((drm)->dev), \
>> + dev_name((drm)->dev), ## arg)
>> +
>> +#define drm_WARN_ONCE(drm, condition, format, arg...) \
>> + WARN_ONCE(condition, "%s %s: " format, \
>> + dev_driver_string((drm)->dev), \
>> + dev_name((drm)->dev), ## arg)
>> +
>> +#define drm_WARN_ON(drm, x) \
>> + drm_WARN((drm), (x), "%s", \
>> + "drm_WARN_ON(" __stringify(x) ")")
>> +
>> +#define drm_WARN_ON_ONCE(drm, x) \
>> + drm_WARN_ONCE((drm), (x), "%s", \
>> + "drm_WARN_ON_ONCE(" __stringify(x) ")")
>> +
>> #endif /* DRM_PRINT_H_ */
>> --
>> 2.23.0
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-01-22 15:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 3:44 [Intel-gfx] [ [PATCH v2 00/10] drm: Introduce struct drm_device based WARN* and use them in i915 Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 01/10] drm/print: introduce new struct drm_device based WARN* macros Pankaj Bharadiya
2020-01-15 10:02 ` Jani Nikula
2020-01-21 8:39 ` Jani Nikula
2020-01-21 9:13 ` Sam Ravnborg
2020-01-22 13:30 ` Sean Paul
2020-01-22 15:32 ` Jani Nikula [this message]
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 02/10] drm/i915/display: Make WARN* drm specific where drm_device ptr is available Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 03/10] drm/i915/display: Make WARN* drm specific where drm_priv " Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 04/10] drm/i915/display: Make WARN* drm specific where encoder " Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 05/10] drm/i915/gem: Make WARN* drm specific where drm_priv " Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 06/10] drm/i915/gt: " Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 07/10] drm/i915/gvt: " Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 08/10] drm/i915/gvt: Make WARN* drm specific where vgpu " Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 09/10] drm/i915: Make WARN* drm specific where drm_priv " Pankaj Bharadiya
2020-01-15 3:44 ` [Intel-gfx] [ [PATCH v2 10/10] drm/i915: Make WARN* drm specific where uncore or stream " Pankaj Bharadiya
2020-01-15 4:11 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Introduce struct drm_device based WARN* and use them in i915 (rev2) Patchwork
2020-01-15 4:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-15 4:38 ` [Intel-gfx] ✗ Fi.CI.BUILD: warning " Patchwork
2020-01-17 11:31 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2020-01-22 16:22 ` [Intel-gfx] [ [PATCH v2 00/10] drm: Introduce struct drm_device based WARN* and use them in i915 Jani Nikula
2020-01-23 9:00 ` Bharadiya,Pankaj
2020-01-23 9:39 ` Jani Nikula
2020-01-27 8:14 ` Bharadiya,Pankaj
2020-01-27 9:01 ` Jani Nikula
-- strict thread matches above, loose matches on Subject: below --
2020-01-15 3:43 Pankaj Bharadiya
2020-01-15 3:43 ` [Intel-gfx] [ [PATCH v2 01/10] drm/print: introduce new struct drm_device based WARN* macros Pankaj Bharadiya
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=87blqvecbi.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mripard@kernel.org \
--cc=pankaj.laxminarayan.bharadiya@intel.com \
--cc=sam@ravnborg.org \
--cc=sean@poorly.run \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox