All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Subject: Re: [PATCH v3 1/2] drm/i915/display: Add MTL subplatforms definition
Date: Mon, 16 Dec 2024 13:18:04 +0200	[thread overview]
Message-ID: <8734inub9v.fsf@intel.com> (raw)
In-Reply-To: <20241213143408.3051070-2-dnyaneshwar.bhadane@intel.com>

On Fri, 13 Dec 2024, Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com> wrote:
> Separate MTL-U platform PCI ids in one define macro.
>
> Add the MTL U/ARL U as subplatform member in MTL platform description
> structure to use display.platform.<platform> from intel_display
> structure instead of IS_<PLATFORM>() in display code path.
>
> Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
> ---
>  .../drm/i915/display/intel_display_device.c   | 21 +++++++++++++++++++
>  .../drm/i915/display/intel_display_device.h   |  2 ++
>  include/drm/intel/pciids.h                    |  5 ++++-
>  3 files changed, 27 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
> index 68cb7f9b9ef3..5dc689a8b1ae 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> @@ -1357,6 +1357,16 @@ static const struct intel_display_device_info xe2_hpd_display = {
>  		BIT(PORT_TC1) | BIT(PORT_TC2) | BIT(PORT_TC3) | BIT(PORT_TC4),
>  };
>  
> +static const u16 arl_u_ids[] = {
> +	INTEL_ARL_U_IDS(ID),
> +	0
> +};
> +
> +static const u16 mtl_u_ids[] = {
> +	INTEL_MTL_U_IDS(ID),
> +	0
> +};

We don't have arrowlake platform definition. They're all just
meteorlakes. Do you actually need the mtl-u/arl-u distinction, or do you
just need mtl+arl vs. mtl-u+arl-u distinction?

I.e. could we just have 

static const u16 mtl_u_ids[] = {
	INTEL_MTL_U_IDS(ID),
	INTEL_ARL_U_IDS(ID),
	0
};

And call them all mtl-u?

> +
>  /*
>   * Do not initialize the .info member of the platform desc for GMD ID based
>   * platforms. Their display will be probed automatically based on the IP version
> @@ -1364,6 +1374,17 @@ static const struct intel_display_device_info xe2_hpd_display = {
>   */
>  static const struct platform_desc mtl_desc = {
>  	PLATFORM(meteorlake),
> +	.subplatforms = (const struct subplatform_desc[]) {
> +		{
> +			SUBPLATFORM(meteorlake, u),
> +			.pciidlist = mtl_u_ids,
> +		},
> +		{
> +			SUBPLATFORM(arrowlake, u),
> +			.pciidlist = arl_u_ids,

You're defining subplatfroms for meteorlake. All the platform parameters
for SUBPLATFORM() *must* match the PLATFORM() above.

> +		},
> +		{},
> +	}
>  };
>  
>  static const struct platform_desc lnl_desc = {
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 9a333d9e6601..87a614e2dfab 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -96,6 +96,8 @@ struct pci_dev;
>  	func(dg2_g12) \
>  	/* Display ver 14 (based on GMD ID) */ \
>  	func(meteorlake) \
> +	func(meteorlake_u) \
> +	func(arrowlake_u) \

The naming needs to be <platform>_<subplatform>. We don't have arrowlake
platform, so we can't have arrowlake_u.

Either we can just put all mtl+arl u's together in meteorlake_u, or we
define arl-u as meteorlake_arrowlake_u with meteorlake being the
platform and arrowlake_u the subplatform.

>  	/* Display ver 20 (based on GMD ID) */ \
>  	func(lunarlake) \
>  	/* Display ver 14.1 (based on GMD ID) */ \
> diff --git a/include/drm/intel/pciids.h b/include/drm/intel/pciids.h
> index c6518b0992cf..f29034ccb36c 100644
> --- a/include/drm/intel/pciids.h
> +++ b/include/drm/intel/pciids.h
> @@ -811,9 +811,12 @@
>  	INTEL_ARL_S_IDS(MACRO__, ## __VA_ARGS__)
>  
>  /* MTL */
> +#define INTEL_MTL_U_IDS(MACRO__, ...) \
> +	MACRO__(0x7D45, ## __VA_ARGS__)
> +
>  #define INTEL_MTL_IDS(MACRO__, ...) \
>  	MACRO__(0x7D40, ## __VA_ARGS__), \
> -	MACRO__(0x7D45, ## __VA_ARGS__), \
> +	INTEL_MTL_U_IDS(MACRO__, ## __VA_ARGS__), \
>  	MACRO__(0x7D55, ## __VA_ARGS__), \
>  	MACRO__(0x7D60, ## __VA_ARGS__), \
>  	MACRO__(0x7DD5, ## __VA_ARGS__)

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-12-16 11:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-13 14:34 [PATCH 0/2] drm/i915/cx0_phy: Update HDMI TMDS C20 algorithm value Dnyaneshwar Bhadane
2024-12-13 14:34 ` [PATCH v3 1/2] drm/i915/display: Add MTL subplatforms definition Dnyaneshwar Bhadane
2024-12-16 11:18   ` Jani Nikula [this message]
2024-12-17  7:16     ` Bhadane, Dnyaneshwar
2024-12-13 14:34 ` [PATCH v3 2/2] drm/i915/cx0_phy: Update HDMI TMDS C20 algorithm value Dnyaneshwar Bhadane
2024-12-13 15:12 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/cx0_phy: Update HDMI TMDS C20 algorithm value (rev3) Patchwork
2024-12-13 15:12 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-12-13 15:27 ` ✓ i915.CI.BAT: success " Patchwork
2024-12-13 20:46 ` ✗ i915.CI.Full: failure " Patchwork

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=8734inub9v.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dnyaneshwar.bhadane@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.