[Intel-gfx] [PATCH 24/39] drm/i915: move mipi_mmio_base to display.dsi
Jani Nikula
jani.nikula at intel.com
Wed Aug 17 07:54:38 UTC 2022
On Wed, 17 Aug 2022, Lucas De Marchi <lucas.demarchi at intel.com> wrote:
> On Wed, Aug 17, 2022 at 10:00:01AM +0300, Jani Nikula wrote:
>>On Tue, 16 Aug 2022, Lucas De Marchi <lucas.demarchi at intel.com> wrote:
>>> On Thu, Aug 11, 2022 at 06:07:35PM +0300, Jani Nikula wrote:
>>>>-#define _MIPIA_DEVICE_READY (dev_priv->mipi_mmio_base + 0xb000)
>>>>-#define _MIPIC_DEVICE_READY (dev_priv->mipi_mmio_base + 0xb800)
>>>>+#define _MIPIA_DEVICE_READY (_MIPI_MMIO_BASE(dev_priv) + 0xb000)
>>>
>>> ugh, and I thought we wouldn't have so many implicit params anymore.
>>> Mind adding a "TODO: remove implicit dev_priv parameter" ?
>>
>>It's been on my private todo list like 10 years. :(
>
> and we are finally removing that from the todo list soon. right? :)
Maybe the perfect has been the enemy of the good here, too.
The simple thing to do is to just pass i915 to all register macros that
need it, and be done with it. It's a little bit of churn here and there,
not too bad.
But then some register macros need it, some don't, and it's all case by
case. What if we passed i915 to *all* register macros instead? Some
wouldn't need it and it would be all the same. But some could
benefit. See e.g. how HDCP_CONF() in intel_hdcp_regs.h adapts to
platforms. It's not really a style we use anywhere else, but should we
do that more instead of having it inline in code?
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list