From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com, Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 2/4] drm/i915/crt: split compute_config hook by platforms
Date: Thu, 12 Oct 2017 19:05:31 +0300 [thread overview]
Message-ID: <20171012160533.10438-2-jani.nikula@intel.com> (raw)
In-Reply-To: <20171012160533.10438-1-jani.nikula@intel.com>
Only the DDI hook has some actual content.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_crt.c | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 668e8c3e791d..437339f5d098 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -344,10 +344,25 @@ static bool intel_crt_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
+ return true;
+}
+
+static bool pch_crt_compute_config(struct intel_encoder *encoder,
+ struct intel_crtc_state *pipe_config,
+ struct drm_connector_state *conn_state)
+{
+ pipe_config->has_pch_encoder = true;
+
+ return true;
+}
+
+static bool hsw_crt_compute_config(struct intel_encoder *encoder,
+ struct intel_crtc_state *pipe_config,
+ struct drm_connector_state *conn_state)
+{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
- if (HAS_PCH_SPLIT(dev_priv))
- pipe_config->has_pch_encoder = true;
+ pipe_config->has_pch_encoder = true;
/* LPT FDI RX only supports 8bpc. */
if (HAS_PCH_LPT(dev_priv)) {
@@ -360,8 +375,7 @@ static bool intel_crt_compute_config(struct intel_encoder *encoder,
}
/* FDI must always be 2.7 GHz */
- if (HAS_DDI(dev_priv))
- pipe_config->port_clock = 135000 * 2;
+ pipe_config->port_clock = 135000 * 2;
return true;
}
@@ -959,11 +973,11 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
!dmi_check_system(intel_spurious_crt_detect))
crt->base.hpd_pin = HPD_CRT;
- crt->base.compute_config = intel_crt_compute_config;
if (HAS_DDI(dev_priv)) {
crt->base.port = PORT_E;
crt->base.get_config = hsw_crt_get_config;
crt->base.get_hw_state = intel_ddi_get_hw_state;
+ crt->base.compute_config = hsw_crt_compute_config;
crt->base.pre_pll_enable = hsw_pre_pll_enable_crt;
crt->base.pre_enable = hsw_pre_enable_crt;
crt->base.enable = hsw_enable_crt;
@@ -971,9 +985,11 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
crt->base.post_disable = hsw_post_disable_crt;
} else {
if (HAS_PCH_SPLIT(dev_priv)) {
+ crt->base.compute_config = pch_crt_compute_config;
crt->base.disable = pch_disable_crt;
crt->base.post_disable = pch_post_disable_crt;
} else {
+ crt->base.compute_config = intel_crt_compute_config;
crt->base.disable = intel_disable_crt;
}
crt->base.port = PORT_NONE;
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-12 16:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 16:05 [PATCH 1/4] drm/i915: remove redundant lowfreq_avail setting for DDI Jani Nikula
2017-10-12 16:05 ` Jani Nikula [this message]
2017-10-12 16:23 ` [PATCH 2/4] drm/i915/crt: split compute_config hook by platforms Ville Syrjälä
2017-10-12 16:05 ` [PATCH 3/4] drm/i915: push crtc compute clock to encoder compute config on DDI Jani Nikula
2017-10-12 16:29 ` Ville Syrjälä
2017-12-16 12:25 ` Chauhan, Madhav
2017-10-12 16:05 ` [PATCH 4/4] drm/i915: push shared dpll enable to encoders on DDI platforms Jani Nikula
2017-12-18 12:31 ` Chauhan, Madhav
2017-12-18 12:51 ` Jani Nikula
2017-12-18 13:05 ` Chauhan, Madhav
2017-12-20 11:07 ` Chauhan, Madhav
2017-10-12 16:17 ` [PATCH 1/4] drm/i915: remove redundant lowfreq_avail setting for DDI Ville Syrjälä
2017-10-12 16:30 ` ✗ Fi.CI.BAT: failure for series starting with [1/4] " Patchwork
2017-10-12 16:40 ` [PATCH v2] drm/i915: remove g4x lowfrew_avail and has_pipe_cxsr Jani Nikula
2017-10-12 16:43 ` Ville Syrjälä
2017-10-12 17:19 ` ✗ Fi.CI.BAT: failure for series starting with [v2] drm/i915: remove g4x lowfrew_avail and has_pipe_cxsr (rev2) 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=20171012160533.10438-2-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=daniel.vetter@ffwll.ch \
--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