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>,
Lucas De Marchi <lucas.demarchi@intel.com>,
intel-xe@lists.freedesktop.org,
Andrzej Hajda <andrzej.hajda@intel.com>
Subject: Re: [Intel-gfx] [Intel-xe] [PATCH v2 2/6] drm/i915: Convert INTEL_INFO()->display to a pointer
Date: Tue, 23 May 2023 15:47:46 +0300 [thread overview]
Message-ID: <87ilcjkydp.fsf@intel.com> (raw)
In-Reply-To: <20230522202314.3939499-3-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/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 4e23be2995bf..d0bf626d0360 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -138,7 +138,7 @@ void intel_device_info_print(const struct intel_device_info *info,
>
> drm_printf(p, "has_pooled_eu: %s\n", str_yes_no(runtime->has_pooled_eu));
>
> -#define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, str_yes_no(info->display.name))
> +#define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, str_yes_no(info->display->name))
> DEV_INFO_DISPLAY_FOR_EACH_FLAG(PRINT_FLAG);
> #undef PRINT_FLAG
>
> @@ -388,6 +388,8 @@ mkwrite_device_info(struct drm_i915_private *i915)
> return (struct intel_device_info *)INTEL_INFO(i915);
> }
>
> +static const struct intel_display_device_info no_display = { 0 };
I think {} is preferred. Can be fixed afterwards if there's no other
reason to do a respin.
> +
> /**
> * intel_device_info_runtime_init - initialize runtime info
> * @dev_priv: the i915 device
> @@ -538,7 +540,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
> if (!HAS_DISPLAY(dev_priv)) {
> dev_priv->drm.driver_features &= ~(DRIVER_MODESET |
> DRIVER_ATOMIC);
> - memset(&info->display, 0, sizeof(info->display));
> + info->display = &no_display;
Nice!
Acked-by: Jani Nikula <jani.nikula@intel.com>
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-05-23 12:47 UTC|newest]
Thread overview: 22+ 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-gfx] [PATCH v2 1/6] drm/i915/display: Move display device info to header " 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-23 7:45 ` Andrzej Hajda
2023-05-23 12:47 ` Jani Nikula [this message]
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-23 7:50 ` Andrzej Hajda
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-23 7:51 ` Andrzej Hajda
2023-05-23 12:58 ` [Intel-gfx] [Intel-xe] " 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-23 8:03 ` Andrzej Hajda
2023-05-23 13:02 ` [Intel-gfx] [Intel-xe] " Jani Nikula
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-23 8:06 ` Andrzej Hajda
2023-05-22 21:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for i915: Move display identification/probing under display/ (rev2) 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
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=87ilcjkydp.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=lucas.demarchi@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox