From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>, Intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 07/12] drm/i915: Remove I915_READ8
Date: Tue, 11 Jun 2019 09:47:43 +0100 [thread overview]
Message-ID: <b0e35507-959c-1936-0f44-cefde0b9bb79@linux.intel.com> (raw)
In-Reply-To: <87ef45zf02.fsf@intel.com>
On 07/06/2019 14:44, Jani Nikula wrote:
> On Fri, 07 Jun 2019, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
>> On 07/06/2019 14:11, Jani Nikula wrote:
>>> On Fri, 07 Jun 2019, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>
>>>> Only a few call sites remain which have been converted to uncore mmio
>>>> accessors and so the macro can be removed.
>>>>
>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> I have some reservations about this one and patch 11. Again, I'm fine
>>> with nuking I915_READ8 and I915_READ_NOTRACE (in patch 11). I think
>>> they're special cases and it's okay if they grow into a bit longer lines
>>> or multiple lines.
>>>
>>> The problem is converting regular I915_READ and I915_WRITE in display
>>> code while at it.
>>>
>>> I don't think en masse conversion of them to intel_uncore_read and
>>> intel_uncore_write directly is going to happen in display code, because
>>> there's too much code that gets turned too ugly with the increase in
>>> function name length and the extra passed parameter. I think many of
>>> those places are pretty ugly as it is already. That's my feeling anyway.
>>>
>>> I understand your reasoning is to avoid the mixed use of intel_uncore_*
>>
>> Exactly.
>>
>>> and I915_*. But I fear using intel_uncore_read and intel_uncore_write
>>> now is going to promote their use all over the place, and *that* will
>>> lead to mixed use. Which is not optimal if the overall feeling is that
>>> we need to come up with a shorter function/macro for display code reads
>>> and writes.
>>
>> I am fine with the argument that you may desire something shorter for
>> display. But I don't think converting whole functions would create any
>> more future mixed use than converting functions partially.
>>
>> Btw have you seen the latest RFC from Daniele?
>
> Yes, but haven't had the time to digest it.
>
>> That would allow that you
>> only replace the assignemnts at the top of functions perhaps like from:
>>
>> struct intel_uncore *uncore = &dev_priv->uncore;
>>
>> to:
>>
>> struct intel_uncore *uncore = &dev_priv->display_uncore;
>>
>> But sure, if you desire shorter accessors then lets first have a
>> definitive decision of that.
>
> If there were display accessors they might just take i915 as pointer:
>
> #define FOO_READ(i915, reg) intel_uncore_read(&i915->display_uncore, reg)
>
> Dunno.
>
>>
>>> I presume Ville has something to say about the gt vs. display stuff as
>>> well; does the whole series make that harder? I hope not, because I do
>>> like the rest of what's being done here.
>>
>> It doesn't make it harder. I can easily drop the bits you don't like if
>> that will be the final decision. In fact, I should probably do that
>> straight away if that would unblock the remaining two patches because
>> then I can proceed with other refactorings on top.
>
> Hum, you know what, it's not *that* big of a deal. Ack on the whole
> series, we can tidy up later on if needed.
>
> I guess I'd like to get Ville's ack on the series too. Ville?
So I have patches 7 & 11 with acks from Jani and no r-b here.
Depending on the opinion from Ville I can either ask for upgrade to r-b,
or refactor them to minimize intel_uncore_read/write in favour of
leaving the affected functions mixed (I915_READ/WRITE +
intel_uncore_"more-exotic-accessors".
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-06-11 8:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 12:08 [RFC 00/12] Legacy mmio accessor macro pruning Tvrtko Ursulin
2019-06-07 12:08 ` [RFC 01/12] drm/i915: Eliminate unused mmio accessors Tvrtko Ursulin
2019-06-07 12:08 ` [RFC 02/12] drm/i915: Convert i915_reg_read_ioctl to use explicit " Tvrtko Ursulin
2019-06-07 12:08 ` [RFC 03/12] drm/i915: Convert icl_get_stolen_reserved to uncore " Tvrtko Ursulin
2019-06-07 12:08 ` [RFC 04/12] drm/i915: Convert gem_record_fences " Tvrtko Ursulin
2019-06-07 12:08 ` [RFC 05/12] drm/i915: Convert intel_read_wm_latency " Tvrtko Ursulin
2019-06-07 12:08 ` [RFC 06/12] drm/i915: Remove I915_READ64 and I915_READ64_32x2 Tvrtko Ursulin
2019-06-07 12:44 ` Jani Nikula
2019-06-07 12:08 ` [RFC 07/12] drm/i915: Remove I915_READ8 Tvrtko Ursulin
2019-06-07 13:11 ` Jani Nikula
2019-06-07 13:19 ` Tvrtko Ursulin
2019-06-07 13:44 ` Jani Nikula
2019-06-11 8:47 ` Tvrtko Ursulin [this message]
2019-06-11 8:59 ` Jani Nikula
2019-06-11 8:58 ` Jani Nikula
2019-06-07 12:08 ` [RFC 08/12] drm/i915: Remove I915_POSTING_READ_FW Tvrtko Ursulin
2019-06-07 12:48 ` Jani Nikula
2019-06-07 12:08 ` [RFC 09/12] drm/i915: Remove POSTING_READ16 Tvrtko Ursulin
2019-06-07 12:49 ` Jani Nikula
2019-06-07 12:08 ` [RFC 10/12] drm/i915: Remove I915_WRITE_NOTRACE Tvrtko Ursulin
2019-06-07 12:50 ` Jani Nikula
2019-06-07 12:08 ` [RFC 11/12] drm/i915: Remove I915_READ_NOTRACE Tvrtko Ursulin
2019-06-11 8:57 ` Jani Nikula
2019-06-07 12:08 ` [RFC 12/12] drm/i915: Remove I915_READ16 and I915_WRITE16 Tvrtko Ursulin
2019-06-07 12:59 ` Jani Nikula
2019-06-07 14:36 ` ✗ Fi.CI.CHECKPATCH: warning for Legacy mmio accessor macro pruning Patchwork
2019-06-07 15:04 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-10 9:57 ` ✓ Fi.CI.IGT: " Patchwork
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=b0e35507-959c-1936-0f44-cefde0b9bb79@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