From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>, <lucas.demarchi@intel.com>,
<ville.syrjala@linux.intel.com>,
<joonas.lahtinen@linux.intel.com>, <tursulin@ursulin.net>
Subject: Re: [PATCH v3 1/7] drm/i915/display: add intel_display -> drm_device backpointer
Date: Tue, 16 Apr 2024 12:05:22 -0400 [thread overview]
Message-ID: <Zh6hwjmUQyc_nseG@intel.com> (raw)
In-Reply-To: <aedbc76b3d01e25bea691b61a331f71a7c63f3b3.1712665176.git.jani.nikula@intel.com>
On Tue, Apr 09, 2024 at 03:26:43PM +0300, Jani Nikula wrote:
> As a baby step towards making struct intel_display the main data
> structure for display, add a backpointer to struct drm_device that can
> be used instead of &i915->drm.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
I needed that a few weeks ago when doing that display metrics,
willing to add a drm_debug without having to go through
drm_i915_private.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_core.h | 3 +++
> drivers/gpu/drm/i915/display/intel_display_device.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
> index db9b6492758e..368a4953bc1b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -282,6 +282,9 @@ struct intel_wm {
> };
>
> struct intel_display {
> + /* drm device backpointer */
> + struct drm_device *drm;
> +
> /* Display functions */
> struct {
> /* Top level crtc-ish functions */
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
> index b8903bd0e82a..120e209ee74a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> @@ -927,6 +927,9 @@ void intel_display_device_probe(struct drm_i915_private *i915)
> const struct intel_display_device_info *info;
> u16 ver, rel, step;
>
> + /* Add drm device backpointer as early as possible. */
> + i915->display.drm = &i915->drm;
> +
> if (HAS_GMD_ID(i915))
> info = probe_gmdid_display(i915, &ver, &rel, &step);
> else
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-04-16 16:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 12:26 [PATCH v3 0/7] drm/i915: better high level abstraction for display Jani Nikula
2024-04-09 12:26 ` [PATCH v3 1/7] drm/i915/display: add intel_display -> drm_device backpointer Jani Nikula
2024-04-16 16:05 ` Rodrigo Vivi [this message]
2024-04-09 12:26 ` [PATCH v3 2/7] drm/i915/display: add generic to_intel_display() macro Jani Nikula
2024-04-16 16:06 ` Rodrigo Vivi
2024-04-09 12:26 ` [PATCH v3 3/7] drm/i915: add generic __to_intel_display() Jani Nikula
2024-04-16 16:08 ` Rodrigo Vivi
2024-04-09 12:26 ` [PATCH v3 4/7] drm/xe/display: " Jani Nikula
2024-04-16 16:10 ` Rodrigo Vivi
2024-04-17 9:53 ` Jani Nikula
2024-04-17 13:04 ` Jani Nikula
2024-04-09 12:26 ` [PATCH v3 5/7] drm/i915/display: accept either i915 or display for feature tests Jani Nikula
2024-04-16 16:14 ` Rodrigo Vivi
2024-04-17 13:05 ` Jani Nikula
2024-04-09 12:26 ` [PATCH v3 6/7] drm/i915/de: allow intel_display and drm_i915_private for de functions Jani Nikula
2024-04-16 16:16 ` Rodrigo Vivi
2024-04-17 13:05 ` Jani Nikula
2024-04-09 12:26 ` [PATCH v3 7/7] drm/i915/quirks: convert struct drm_i915_private to struct intel_display Jani Nikula
2024-04-16 16:17 ` Rodrigo Vivi
2024-04-09 15:40 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: better high level abstraction for display (rev2) Patchwork
2024-04-09 15:40 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-04-09 15:54 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-10 17:22 ` ✓ Fi.CI.IGT: " Patchwork
2024-04-16 16:24 ` [PATCH v3 0/7] drm/i915: better high level abstraction for display Rodrigo Vivi
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=Zh6hwjmUQyc_nseG@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=lucas.demarchi@intel.com \
--cc=tursulin@ursulin.net \
--cc=ville.syrjala@linux.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