Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 8/9] drm/i915/mtl: Add C10 phy programming for HDMI
Date: Thu, 13 Apr 2023 19:36:48 +0300	[thread overview]
Message-ID: <ZDgvoPOj/5/jZmEA@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20230412224925.1309815-9-radhakrishna.sripada@intel.com>

On Wed, Apr 12, 2023 at 03:49:24PM -0700, Radhakrishna Sripada wrote:
> [...]
> +/* Precomputed C10 HDMI PLL tables */
> +static const struct intel_c10pll_state mtl_c10_hdmi_25175 = {
> +	.clock = 25175,
> +	.tx = 0x10,
> +	.cmn = 0x1,
> +	.pll[0] = 0x34,
> +	.pll[1] = 0x00,
> +	.pll[2] = 0xB0,
> +	.pll[3] = 0x00,
> +	.pll[4] = 0x00,
> +	.pll[5] = 0x00,
> +	.pll[6] = 0x00,
> +	.pll[7] = 0x00,
> +	.pll[8] = 0x20,
> +	.pll[9] = 0xFF,
> +	.pll[10] = 0xFF,
> +	.pll[11] = 0x55,
> +	.pll[12] = 0xE5,
> +	.pll[13] = 0x55,
> +	.pll[14] = 0x55,
> +	.pll[15] = 0x0D,
> +	.pll[16] = 0x09,
> +	.pll[17] = 0x8F,
> +	.pll[18] = 0x84,
> +	.pll[19] = 0x23,
> +};

Something off with the above table, 
intel_c10pll_calc_port_clock() calculates 25200 clock rate for it. So
either .clock above needs to be the same rate, or the PLL params need to
be corrected for the 25175 rate.

> [...]
> @@ -690,9 +1315,20 @@ static void intel_c10pll_update_pll(struct intel_crtc_state *crtc_state,
>  static int intel_c10pll_calc_state(struct intel_crtc_state *crtc_state,
>  				   struct intel_encoder *encoder)
>  {
> +	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
>  	const struct intel_c10pll_state * const *tables;
> +	enum phy phy = intel_port_to_phy(i915, encoder->port);
>  	int i;
>  
> +	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) {
> +		if (intel_c10_phy_check_hdmi_link_rate(crtc_state->port_clock)
> +		    != MODE_OK) {
> +			drm_dbg_kms(&i915->drm, "Can't support HDMI link rate %d on phy %c.\n",
> +				    crtc_state->port_clock, phy_name(phy));
> +			return -EINVAL;
> +		}
> +	}

The above check is not needed, covered already by the loop later in
the function.

> +
>  	tables = intel_c10pll_tables_get(crtc_state, encoder);
>  	if (!tables)
>  		return -EINVAL;

  reply	other threads:[~2023-04-13 16:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 22:49 [Intel-gfx] [PATCH 0/9] drm/i915/mtl: Add Support for C10 phy Radhakrishna Sripada
2023-04-12 22:49 ` [Intel-gfx] [PATCH 1/9] drm/i915/mtl: Add DP rates Radhakrishna Sripada
2023-04-12 22:49 ` [Intel-gfx] [PATCH 2/9] drm/i915/mtl: Create separate reg file for PICA registers Radhakrishna Sripada
2023-04-12 22:49 ` [Intel-gfx] [PATCH 3/9] drm/i915/mtl: Add Support for C10 PHY message bus and pll programming Radhakrishna Sripada
2023-04-13 16:50   ` Imre Deak
2023-04-12 22:49 ` [Intel-gfx] [PATCH 4/9] drm/i915/mtl: Add vswing programming for C10 phys Radhakrishna Sripada
2023-04-13 15:57   ` Imre Deak
2023-04-12 22:49 ` [Intel-gfx] [PATCH 5/9] drm/i915/mtl: MTL PICA hotplug detection Radhakrishna Sripada
2023-04-12 22:49 ` [Intel-gfx] [PATCH 6/9] drm/i915/mtl/display: Implement DisplayPort sequences Radhakrishna Sripada
2023-04-13 16:17   ` Imre Deak
2023-04-12 22:49 ` [Intel-gfx] [PATCH 7/9] drm/i915/mtl: Initial DDI port setup Radhakrishna Sripada
2023-04-13 16:19   ` Imre Deak
2023-04-12 22:49 ` [Intel-gfx] [PATCH 8/9] drm/i915/mtl: Add C10 phy programming for HDMI Radhakrishna Sripada
2023-04-13 16:36   ` Imre Deak [this message]
2023-04-13 20:31     ` Sripada, Radhakrishna
2023-04-12 22:49 ` [Intel-gfx] [PATCH 9/9] drm/i915/display/mtl: Fill port width in DDI_BUF_/TRANS_DDI_FUNC_/PORT_BUF_CTL " Radhakrishna Sripada
2023-04-13 16:51   ` Imre Deak
2023-04-12 23:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/mtl: Add Support for C10 phy (rev2) Patchwork
2023-04-12 23:27 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-04-12 23:40 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-04-13 21:01 [Intel-gfx] [PATCH 0/9] drm/i915/mtl: Add Support for C10 phy Radhakrishna Sripada
2023-04-13 21:01 ` [Intel-gfx] [PATCH 8/9] drm/i915/mtl: Add C10 phy programming for HDMI Radhakrishna Sripada

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=ZDgvoPOj/5/jZmEA@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=radhakrishna.sripada@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