All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH 3/4] drm/i915/dsi: Adjust crtc_clock for burst_mode_ratio
Date: Sat,  1 Dec 2018 12:31:47 +0100	[thread overview]
Message-ID: <20181201113148.23184-3-hdegoede@redhat.com> (raw)
In-Reply-To: <20181201113148.23184-1-hdegoede@redhat.com>

On devices with a burst_mode_ratio which is not 100 (1:1), the pclk
will have a different value then drm_display_mode.clock .

On a Prowise PT301 tablet where vbt.lfp_lvds_vbt_mode.clock is 66100 and
burst_mode_ratio is 130 this leads to the following errors:

[drm:pipe_config_err [i915]] *ERROR* mismatch in
pixel_rate (expected 66100, found 86458)
[drm:pipe_config_err [i915]] *ERROR* mismatch in
base.adjusted_mode.crtc_clock (expected 66100, found 86458)
[drm:pipe_config_err [i915]] *ERROR* mismatch in
port_clock (expected 66100, found 86458)

This commit makes intel_dsi_compute_config() set
pipe_config.adjusted_mode.crtc_clock, taking the burst_mode_ratio into
account fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/i915/vlv_dsi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c
index c21cbfa9653c..d72ccf557a9c 100644
--- a/drivers/gpu/drm/i915/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/vlv_dsi.c
@@ -347,6 +347,10 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder,
 			return false;
 	}
 
+	adjusted_mode->crtc_clock =
+		DIV_ROUND_UP(adjusted_mode->crtc_clock *
+					 intel_dsi->burst_mode_ratio, 100);
+
 	pipe_config->clock_set = true;
 
 	return true;
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-12-01 11:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-01 11:31 [PATCH 1/4] drm/i915/dsi: Fix pipe_bpp for handling for 6 bpc pixel-formats Hans de Goede
2018-12-01 11:31 ` [PATCH 2/4] drm/i915/dsi: Enable dithering for 6 bpc panels Hans de Goede
2019-01-15 14:55   ` Ville Syrjälä
2019-01-21  9:54     ` Hans de Goede
2018-12-01 11:31 ` Hans de Goede [this message]
2019-01-15 15:00   ` [PATCH 3/4] drm/i915/dsi: Adjust crtc_clock for burst_mode_ratio Ville Syrjälä
2019-01-21 14:26     ` Hans de Goede
2019-01-21 15:30       ` Hans de Goede
2018-12-01 11:31 ` [PATCH 4/4] drm/i915/dsi: Call drm_connector_cleanup on vlv_dsi_init error exit path Hans de Goede
2019-01-25 21:05   ` Ville Syrjälä
2018-12-01 12:01 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915/dsi: Fix pipe_bpp for handling for 6 bpc pixel-formats Patchwork
2018-12-01 12:20 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-01 22:45 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-15 14:51 ` [PATCH 1/4] " Ville Syrjälä
2019-01-21  9:53   ` Hans de Goede
2019-04-05  6:34 ` Jani Nikula
2019-04-05  6:59   ` [Intel-gfx] " Saarinen, Jani

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=20181201113148.23184-3-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=rodrigo.vivi@intel.com \
    --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 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.