[Intel-xe] [Intel-gfx] [PATCH v2 3/6] drm/i915/display: Move display runtime info to display structure
Jani Nikula
jani.nikula at linux.intel.com
Tue May 23 12:45:36 UTC 2023
On Mon, 22 May 2023, Matt Roper <matthew.d.roper at intel.com> wrote:
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 9612c2ac4b00..7a8a12d12790 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -205,6 +205,7 @@ struct drm_i915_private {
>
> const struct intel_device_info __info; /* Use INTEL_INFO() to access. */
> struct intel_runtime_info __runtime; /* Use RUNTIME_INFO() to access. */
> + struct intel_display_runtime_info __display_runtime; /* Access with DISPLAY_RUNTIME_INFO() */
This could now live as a member of struct intel_display, dropping
another display only member from struct drm_i915_private.
AFAICT this can be a trivial movement patch on top, since almost all
access is via DISPLAY_RUNTIME_INFO().
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index dd874a4db604..9c781b703c7b 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -41,10 +41,9 @@
> #define PLATFORM(x) .platform = (x)
> #define GEN(x) \
> .__runtime.graphics.ip.ver = (x), \
> - .__runtime.media.ip.ver = (x), \
> - .__runtime.display.ip.ver = (x)
> + .__runtime.media.ip.ver = (x)
>
> -#define NO_DISPLAY .__runtime.pipe_mask = 0
> +static const struct intel_display_device_info no_display = { 0 };
I think just {} is preferred for empty init, and dodges issues with some
verbose compiler warnings with sub-struct init. Can also be fixed
afterwards if there's no other need to do a respin.
Acked-by: Jani Nikula <jani.nikula at intel.com>
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-xe
mailing list