All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Matt Roper <matthew.d.roper@intel.com>,
	intel-xe@lists.freedesktop.org,
	Andrzej Hajda <andrzej.hajda@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 3/6] drm/i915/display: Move display runtime info to display structure
Date: Tue, 23 May 2023 15:45:36 +0300	[thread overview]
Message-ID: <87lehfkyhb.fsf@intel.com> (raw)
In-Reply-To: <20230522202314.3939499-4-matthew.d.roper@intel.com>

On Mon, 22 May 2023, Matt Roper <matthew.d.roper@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@intel.com>

-- 
Jani Nikula, Intel Open Source Graphics Center

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Matt Roper <matthew.d.roper@intel.com>,
	intel-xe@lists.freedesktop.org,
	Andrzej Hajda <andrzej.hajda@intel.com>
Subject: Re: [Intel-xe] [Intel-gfx] [PATCH v2 3/6] drm/i915/display: Move display runtime info to display structure
Date: Tue, 23 May 2023 15:45:36 +0300	[thread overview]
Message-ID: <87lehfkyhb.fsf@intel.com> (raw)
In-Reply-To: <20230522202314.3939499-4-matthew.d.roper@intel.com>

On Mon, 22 May 2023, Matt Roper <matthew.d.roper@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@intel.com>

-- 
Jani Nikula, Intel Open Source Graphics Center

  parent reply	other threads:[~2023-05-23 12:45 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 20:23 [Intel-gfx] [PATCH v2 0/6] i915: Move display identification/probing under display/ Matt Roper
2023-05-22 20:23 ` [Intel-xe] " Matt Roper
2023-05-22 20:23 ` [Intel-gfx] [PATCH v2 1/6] drm/i915/display: Move display device info to header " Matt Roper
2023-05-22 20:23   ` [Intel-xe] " Matt Roper
2023-05-22 20:23 ` [Intel-gfx] [PATCH v2 2/6] drm/i915: Convert INTEL_INFO()->display to a pointer Matt Roper
2023-05-22 20:23   ` [Intel-xe] " Matt Roper
2023-05-23  7:45   ` [Intel-gfx] " Andrzej Hajda
2023-05-23  7:45     ` [Intel-xe] " Andrzej Hajda
2023-05-23 12:47   ` [Intel-gfx] [Intel-xe] " Jani Nikula
2023-05-23 12:47     ` Jani Nikula
2023-05-22 20:23 ` [Intel-gfx] [PATCH v2 3/6] drm/i915/display: Move display runtime info to display structure Matt Roper
2023-05-22 20:23   ` [Intel-xe] " Matt Roper
2023-05-23  7:50   ` [Intel-gfx] " Andrzej Hajda
2023-05-23  7:50     ` [Intel-xe] " Andrzej Hajda
2023-05-23 12:45   ` Jani Nikula [this message]
2023-05-23 12:45     ` Jani Nikula
2023-05-22 20:23 ` [Intel-gfx] [PATCH v2 4/6] drm/i915/display: Make display responsible for probing its own IP Matt Roper
2023-05-22 20:23   ` [Intel-xe] " Matt Roper
2023-05-23  7:51   ` [Intel-gfx] " Andrzej Hajda
2023-05-23  7:51     ` [Intel-xe] " Andrzej Hajda
2023-05-23 12:58   ` [Intel-gfx] [Intel-xe] " Jani Nikula
2023-05-23 12:58     ` Jani Nikula
2023-05-22 20:23 ` [Intel-gfx] [PATCH v2 5/6] drm/i915/display: Handle GMD_ID identification in display code Matt Roper
2023-05-22 20:23   ` [Intel-xe] " Matt Roper
2023-05-23  8:03   ` [Intel-gfx] " Andrzej Hajda
2023-05-23  8:03     ` [Intel-xe] " Andrzej Hajda
2023-05-23 13:02   ` [Intel-gfx] [Intel-xe] " Jani Nikula
2023-05-23 13:02     ` Jani Nikula
2023-05-23 14:43     ` [Intel-gfx] " Matt Roper
2023-05-23 14:43       ` Matt Roper
2023-05-22 20:23 ` [Intel-gfx] [PATCH v2 6/6] drm/i915/display: Move feature test macros to intel_display_device.h Matt Roper
2023-05-22 20:23   ` [Intel-xe] " Matt Roper
2023-05-23  8:06   ` [Intel-gfx] " Andrzej Hajda
2023-05-23  8:06     ` [Intel-xe] " Andrzej Hajda
2023-05-22 21:08 ` [Intel-xe] ✗ CI.Patch_applied: failure for i915: Move display identification/probing under display/ (rev2) Patchwork
2023-05-22 21:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2023-05-22 21:36 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-05-22 21:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-05-23  6:28 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-05-23 13:07 ` [Intel-gfx] [PATCH v2 0/6] i915: Move display identification/probing under display/ Jani Nikula
2023-05-23 13:07   ` [Intel-xe] " 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=87lehfkyhb.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.