From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 11/12] drm/i915: Sprinkle some FIXMEs about TGL+ DSI transcoder timing mess
Date: Mon, 20 Feb 2023 23:29:14 +0200 [thread overview]
Message-ID: <Y/PmKrpWeZEcfhBa@intel.com> (raw)
In-Reply-To: <20230213225258.2127-12-ville.syrjala@linux.intel.com>
On Tue, Feb 14, 2023 at 12:52:57AM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The DSI code has some local hacks to program TRANS_H/VBLANK on
> TGL+ (ICL DSI transcoders didn't have these registers). That
> will not work when we need to start using the delayed vblank
> (for DSB purposes). Too lazy to figure out what the is going
> on there, so just sprinkle FIXMEs in the hopes someone else
> will spot them eventually.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/icl_dsi.c | 7 ++++++-
> drivers/gpu/drm/i915/display/intel_display.c | 3 +++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index def3aff4d717..b5316715bb3b 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -957,7 +957,12 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,
> }
> }
>
> - /* program TRANS_VBLANK register, should be same as vtotal programmed */
> + /*
> + * program TRANS_VBLANK register, should be same as vtotal programmed
> + *
> + * FIXME get rid of these local hacks and do it right,
> + * this will not handle eg. delayed vblank correctly.
> + */
> if (DISPLAY_VER(dev_priv) >= 12) {
> for_each_dsi_port(port, intel_dsi->ports) {
> dsi_trans = dsi_port_to_transcoder(port);
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 92306246e907..4210ede5e52e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -2938,6 +2938,7 @@ static void intel_get_transcoder_timings(struct intel_crtc *crtc,
> adjusted_mode->crtc_hdisplay = REG_FIELD_GET(HACTIVE_MASK, tmp) + 1;
> adjusted_mode->crtc_htotal = REG_FIELD_GET(HTOTAL_MASK, tmp) + 1;
>
> + /* FIXME TGL+ DSI transcoders have this! */
Actually no. They do not. Only TRANS_VBLANK got added to the DSI
transcoders on TGL.
> if (!transcoder_is_dsi(cpu_transcoder)) {
> tmp = intel_de_read(dev_priv, TRANS_HBLANK(cpu_transcoder));
> adjusted_mode->crtc_hblank_start = REG_FIELD_GET(HBLANK_START_MASK, tmp) + 1;
> @@ -2952,6 +2953,7 @@ static void intel_get_transcoder_timings(struct intel_crtc *crtc,
> adjusted_mode->crtc_vdisplay = REG_FIELD_GET(VACTIVE_MASK, tmp) + 1;
> adjusted_mode->crtc_vtotal = REG_FIELD_GET(VTOTAL_MASK, tmp) + 1;
>
> + /* FIXME TGL+ DSI transcoders have this! */
> if (!transcoder_is_dsi(cpu_transcoder)) {
> tmp = intel_de_read(dev_priv, TRANS_VBLANK(cpu_transcoder));
> adjusted_mode->crtc_vblank_start = REG_FIELD_GET(VBLANK_START_MASK, tmp) + 1;
> @@ -2967,6 +2969,7 @@ static void intel_get_transcoder_timings(struct intel_crtc *crtc,
> adjusted_mode->crtc_vblank_end += 1;
> }
>
> + /* FIXME ADL+ DSI transcoders have this! */
This seems to be a lie too.
I dropped these two FIXMEs and pushed the rest. Thanks for the
review.
> if (DISPLAY_VER(dev_priv) >= 13 && !transcoder_is_dsi(cpu_transcoder))
> adjusted_mode->crtc_vblank_start =
> adjusted_mode->crtc_vdisplay +
> --
> 2.39.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-02-20 21:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 22:52 [Intel-gfx] [PATCH 00/12] drm/i915: Transcoder timing stuff Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 01/12] drm/i915: Rename intel_ddi_{enable, disable}_pipe_clock() Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 02/12] drm/i915: Flatten intel_ddi_{enable, disable}_transcoder_clock() Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 03/12] drm/i915: Give CPU transcoder timing registers TRANS_ prefix Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 04/12] drm/i915: s/PIPECONF/TRANSCONF/ Ville Syrjala
2023-02-14 10:05 ` Jani Nikula
2023-02-14 10:32 ` Ville Syrjälä
2023-02-14 10:52 ` Jani Nikula
2023-02-14 10:59 ` Ville Syrjälä
2023-02-13 22:52 ` [Intel-gfx] [PATCH 05/12] drm/i915: Dump blanking start/end Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 06/12] drm/i915: Define the "unmodified vblank" interrupt bit Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 07/12] drm/i915/psr: Stop clobbering TRANS_SET_CONTEXT_LATENCY Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 08/12] drm/i915: Add local adjusted_mode variable Ville Syrjala
2023-02-13 22:52 ` [Intel-gfx] [PATCH 09/12] drm/i915: Define transcoder timing register bitmasks Ville Syrjala
2023-02-14 10:32 ` Jani Nikula
2023-02-14 10:34 ` Jani Nikula
2023-02-14 10:57 ` Ville Syrjälä
2023-02-13 22:52 ` [Intel-gfx] [PATCH 10/12] drm/i915: Configure TRANS_SET_CONTEXT_LATENCY correctly on ADL+ Ville Syrjala
2023-02-16 14:28 ` Jani Nikula
2023-02-13 22:52 ` [Intel-gfx] [PATCH 11/12] drm/i915: Sprinkle some FIXMEs about TGL+ DSI transcoder timing mess Ville Syrjala
2023-02-14 10:35 ` Jani Nikula
2023-02-20 21:29 ` Ville Syrjälä [this message]
2023-02-13 22:52 ` [Intel-gfx] [PATCH 12/12] drm/i915: Remove pointless register read Ville Syrjala
2023-02-14 10:38 ` Jani Nikula
2023-02-13 23:24 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Transcoder timing stuff Patchwork
2023-02-13 23:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-02-14 2:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=Y/PmKrpWeZEcfhBa@intel.com \
--to=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).