From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/6] drm/i915: drop intel_device_info_dump()
Date: Wed, 2 Jan 2019 11:09:40 +0000 [thread overview]
Message-ID: <fda31c1d-91d9-4a85-a138-d565695374cf@linux.intel.com> (raw)
In-Reply-To: <87imz7l4re.fsf@intel.com>
On 02/01/2019 10:42, Jani Nikula wrote:
> On Wed, 02 Jan 2019, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
>> On 31/12/2018 14:56, Jani Nikula wrote:
>>> The debugfs, error state and regular dmesg logging dump needs seem to be
>>> different. Remove the generic dump function only used for the welcome
>>> message. This may be added back later when better abstractions are
>>> identified, but at the moment this seems to be the simplest considering
>>> the device info rework in progress. No longer rely on device info being
>>> a substruct of dev_priv.
>>
>> Why not just make intel_device_info_dump take dev_priv?
>
> I'm thinking the device info dumpers will need some refactoring in the
> future anyway to best suit all the needs of dmesg logging, debugfs, and
> error state dumping. The last one especially wants to use data copied to
> the error state instead of drm_i915_private.
>
> I admittedly took the easy way out here, and removed the function
> altogether because there's currently only one user. I didn't want to
> change now, and then change again later.
Okay, makes sense.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
> BR,
> Jani.
>
>>
>> Regards,
>>
>> Tvrtko
>>
>>>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/i915_drv.c | 8 +++++++-
>>> drivers/gpu/drm/i915/intel_device_info.c | 15 ---------------
>>> drivers/gpu/drm/i915/intel_device_info.h | 2 --
>>> 3 files changed, 7 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
>>> index 8d7a3a852c10..fe01d090f9bb 100644
>>> --- a/drivers/gpu/drm/i915/i915_drv.c
>>> +++ b/drivers/gpu/drm/i915/i915_drv.c
>>> @@ -1636,7 +1636,13 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv)
>>> if (drm_debug & DRM_UT_DRIVER) {
>>> struct drm_printer p = drm_debug_printer("i915 device info:");
>>>
>>> - intel_device_info_dump(INTEL_INFO(dev_priv), &p);
>>> + drm_printf(&p, "pciid=0x%04x rev=0x%02x platform=%s gen=%i\n",
>>> + INTEL_DEVID(dev_priv),
>>> + INTEL_REVID(dev_priv),
>>> + intel_platform_name(INTEL_INFO(dev_priv)->platform),
>>> + INTEL_GEN(dev_priv));
>>> +
>>> + intel_device_info_dump_flags(INTEL_INFO(dev_priv), &p);
>>> intel_device_info_dump_runtime(RUNTIME_INFO(dev_priv), &p);
>>> }
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
>>> index f35e8cff4b99..e0ce0c9791fc 100644
>>> --- a/drivers/gpu/drm/i915/intel_device_info.c
>>> +++ b/drivers/gpu/drm/i915/intel_device_info.c
>>> @@ -113,21 +113,6 @@ void intel_device_info_dump_runtime(const struct intel_runtime_info *info,
>>> info->cs_timestamp_frequency_khz);
>>> }
>>>
>>> -void intel_device_info_dump(const struct intel_device_info *info,
>>> - struct drm_printer *p)
>>> -{
>>> - struct drm_i915_private *dev_priv =
>>> - container_of(info, struct drm_i915_private, info);
>>> -
>>> - drm_printf(p, "pciid=0x%04x rev=0x%02x platform=%s gen=%i\n",
>>> - INTEL_DEVID(dev_priv),
>>> - INTEL_REVID(dev_priv),
>>> - intel_platform_name(info->platform),
>>> - info->gen);
>>> -
>>> - intel_device_info_dump_flags(info, p);
>>> -}
>>> -
>>> void intel_device_info_dump_topology(const struct sseu_dev_info *sseu,
>>> struct drm_printer *p)
>>> {
>>> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
>>> index f0e6d374d4ec..76735869e32d 100644
>>> --- a/drivers/gpu/drm/i915/intel_device_info.h
>>> +++ b/drivers/gpu/drm/i915/intel_device_info.h
>>> @@ -267,8 +267,6 @@ static inline void sseu_set_eus(struct sseu_dev_info *sseu,
>>> const char *intel_platform_name(enum intel_platform platform);
>>>
>>> void intel_device_info_runtime_init(struct drm_i915_private *dev_priv);
>>> -void intel_device_info_dump(const struct intel_device_info *info,
>>> - struct drm_printer *p);
>>> void intel_device_info_dump_flags(const struct intel_device_info *info,
>>> struct drm_printer *p);
>>> void intel_device_info_dump_runtime(const struct intel_runtime_info *info,
>>>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-01-02 11:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-31 14:56 [PATCH 0/6] drm/i915: start splitting off runtime device info Jani Nikula
2018-12-31 14:56 ` [PATCH 1/6] drm/i915: start moving runtime device info to a separate struct Jani Nikula
2019-01-02 9:27 ` Tvrtko Ursulin
2019-01-02 10:21 ` Jani Nikula
2018-12-31 14:56 ` [PATCH 2/6] drm/i915/reg: abstract display_mmio_offset access Jani Nikula
2019-01-02 9:37 ` Tvrtko Ursulin
2018-12-31 14:56 ` [PATCH 3/6] drm/i915: pass dev_priv to intel_device_info_runtime_init() Jani Nikula
2019-01-02 9:38 ` Tvrtko Ursulin
2018-12-31 14:56 ` [PATCH 4/6] drm/i915: always use INTEL_INFO() to access device info Jani Nikula
2019-01-02 9:58 ` Tvrtko Ursulin
2018-12-31 14:56 ` [PATCH 5/6] drm/i915: drop intel_device_info_dump() Jani Nikula
2019-01-02 10:02 ` Tvrtko Ursulin
2019-01-02 10:42 ` Jani Nikula
2019-01-02 11:09 ` Tvrtko Ursulin [this message]
2018-12-31 14:56 ` [PATCH 6/6] drm/i915: rename dev_priv info to __info to avoid usage Jani Nikula
2019-01-02 10:04 ` Tvrtko Ursulin
2019-01-02 10:44 ` Jani Nikula
2019-01-02 11:10 ` Tvrtko Ursulin
2018-12-31 15:07 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: start splitting off runtime device info Patchwork
2018-12-31 15:10 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-31 15:43 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-31 17:53 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-01 10:31 ` [PATCH 0/6] " Chris Wilson
2019-01-02 9:13 ` Jani Nikula
2019-01-02 10:17 ` Tvrtko Ursulin
2019-01-02 11:19 ` Jani Nikula
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=fda31c1d-91d9-4a85-a138-d565695374cf@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox