From: "Kahola, Mika" <mika.kahola@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use intel_hdmi_port_clock() more
Date: Fri, 5 Feb 2021 13:50:47 +0000 [thread overview]
Message-ID: <902d92aea0ed4130923bb5e4ec0e33ab@intel.com> (raw)
In-Reply-To: <20210204020846.2094-2-ville.syrjala@linux.intel.com>
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Thursday, February 4, 2021 4:09 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Use intel_hdmi_port_clock() more
>
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace the hand rolled intel_hdmi_port_clock() stuff with the real thing.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_hdmi.c | 27 ++++++++++++-----------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c
> b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 66e1ac3887c6..457a16c8803a 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2229,6 +2229,16 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
> return MODE_OK;
> }
>
> +static int intel_hdmi_port_clock(int clock, int bpc) {
> + /*
> + * Need to adjust the port link by:
> + * 1.5x for 12bpc
> + * 1.25x for 10bpc
> + */
> + return clock * bpc / 8;
> +}
> +
> static enum drm_mode_status
> intel_hdmi_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> @@ -2260,17 +2270,18 @@ intel_hdmi_mode_valid(struct drm_connector
> *connector,
> clock /= 2;
>
> /* check if we can do 8bpc */
> - status = hdmi_port_clock_valid(hdmi, clock, true, has_hdmi_sink);
> + status = hdmi_port_clock_valid(hdmi, intel_hdmi_port_clock(clock,
> 8),
> + true, has_hdmi_sink);
>
> if (has_hdmi_sink) {
> /* if we can't do 8bpc we may still be able to do 12bpc */
> if (status != MODE_OK && !HAS_GMCH(dev_priv))
> - status = hdmi_port_clock_valid(hdmi, clock * 3 / 2,
> + status = hdmi_port_clock_valid(hdmi,
> intel_hdmi_port_clock(clock,
> +12),
> true, has_hdmi_sink);
>
> /* if we can't do 8,12bpc we may still be able to do 10bpc */
> if (status != MODE_OK && INTEL_GEN(dev_priv) >= 11)
> - status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
> + status = hdmi_port_clock_valid(hdmi,
> intel_hdmi_port_clock(clock,
> +10),
> true, has_hdmi_sink);
> }
> if (status != MODE_OK)
> @@ -2378,16 +2389,6 @@ intel_hdmi_ycbcr420_config(struct
> intel_crtc_state *crtc_state,
> return intel_pch_panel_fitting(crtc_state, conn_state); }
>
> -static int intel_hdmi_port_clock(int clock, int bpc) -{
> - /*
> - * Need to adjust the port link by:
> - * 1.5x for 12bpc
> - * 1.25x for 10bpc
> - */
> - return clock * bpc / 8;
> -}
> -
> static int intel_hdmi_compute_bpc(struct intel_encoder *encoder,
> struct intel_crtc_state *crtc_state,
> int clock)
> --
> 2.26.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-02-05 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 2:08 [Intel-gfx] [PATCH 1/2] drm/i915: Index min_{cdclk, voltage_level}[] with pipe Ville Syrjala
2021-02-04 2:08 ` [Intel-gfx] [PATCH 2/2] drm/i915: Use intel_hdmi_port_clock() more Ville Syrjala
2021-02-05 13:50 ` Kahola, Mika [this message]
2021-02-04 4:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Index min_{cdclk, voltage_level}[] with pipe Patchwork
2021-02-04 7:43 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-02-05 13:49 ` [Intel-gfx] [PATCH 1/2] " Kahola, Mika
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=902d92aea0ed4130923bb5e4ec0e33ab@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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