* [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
@ 2017-08-18 9:30 Jani Nikula
2017-08-18 9:30 ` [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp Jani Nikula
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Jani Nikula @ 2017-08-18 9:30 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Emphasize that this is based on the port, not intel_dp. This is also in
line with the underlying intel_bios_is_port_edp() function. No
functional changes.
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 6 +++---
drivers/gpu/drm/i915/intel_dp.c | 4 ++--
drivers/gpu/drm/i915/intel_drv.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0e93ec201fe3..3b95cf953335 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13643,7 +13643,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
} else if (HAS_PCH_SPLIT(dev_priv)) {
int found;
- dpd_is_edp = intel_dp_is_edp(dev_priv, PORT_D);
+ dpd_is_edp = intel_dp_is_port_edp(dev_priv, PORT_D);
if (has_edp_a(dev_priv))
intel_dp_init(dev_priv, DP_A, PORT_A);
@@ -13686,14 +13686,14 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
* trust the port type the VBT declares as we've seen at least
* HDMI ports that the VBT claim are DP or eDP.
*/
- has_edp = intel_dp_is_edp(dev_priv, PORT_B);
+ has_edp = intel_dp_is_port_edp(dev_priv, PORT_B);
has_port = intel_bios_is_port_present(dev_priv, PORT_B);
if (I915_READ(VLV_DP_B) & DP_DETECTED || has_port)
has_edp &= intel_dp_init(dev_priv, VLV_DP_B, PORT_B);
if ((I915_READ(VLV_HDMIB) & SDVO_DETECTED || has_port) && !has_edp)
intel_hdmi_init(dev_priv, VLV_HDMIB, PORT_B);
- has_edp = intel_dp_is_edp(dev_priv, PORT_C);
+ has_edp = intel_dp_is_port_edp(dev_priv, PORT_C);
has_port = intel_bios_is_port_present(dev_priv, PORT_C);
if (I915_READ(VLV_DP_C) & DP_DETECTED || has_port)
has_edp &= intel_dp_init(dev_priv, VLV_DP_C, PORT_C);
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 4fd4853b2250..29ed1deb9c84 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5137,7 +5137,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
}
/* check the VBT to see whether the eDP is on another port */
-bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
+bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
{
/*
* eDP not supported on g4x. so bail out early just
@@ -6042,7 +6042,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
intel_dp->DP = I915_READ(intel_dp->output_reg);
intel_dp->attached_connector = intel_connector;
- if (intel_dp_is_edp(dev_priv, port))
+ if (intel_dp_is_port_edp(dev_priv, port))
type = DRM_MODE_CONNECTOR_eDP;
else
type = DRM_MODE_CONNECTOR_DisplayPort;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index fa47285918f4..690e3b67dc1c 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1499,7 +1499,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
bool intel_dp_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state);
-bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port);
+bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
bool long_hpd);
void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
2017-08-18 9:30 [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Jani Nikula
@ 2017-08-18 9:30 ` Jani Nikula
2017-08-18 16:39 ` Jim Bride
2017-08-18 19:15 ` Manasi Navare
2017-08-18 12:05 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Patchwork
` (2 subsequent siblings)
3 siblings, 2 replies; 8+ messages in thread
From: Jani Nikula @ 2017-08-18 9:30 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Expose across driver for future work. No functional changes.
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 77 +++++++++++++++++++++-------------------
drivers/gpu/drm/i915/intel_drv.h | 1 +
2 files changed, 41 insertions(+), 37 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 29ed1deb9c84..e38565829d19 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -103,13 +103,13 @@ static const int cnl_rates[] = { 162000, 216000, 270000,
static const int default_rates[] = { 162000, 270000, 540000 };
/**
- * is_edp - is the given port attached to an eDP panel (either CPU or PCH)
+ * intel_dp_is_edp - is the given port attached to an eDP panel (either CPU or PCH)
* @intel_dp: DP struct
*
* If a CPU or PCH DP output is attached to an eDP panel, this function
* will return true, and false otherwise.
*/
-static bool is_edp(struct intel_dp *intel_dp)
+bool intel_dp_is_edp(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
@@ -388,7 +388,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
max_dotclk = intel_dp_downstream_max_dotclock(intel_dp);
- if (is_edp(intel_dp) && fixed_mode) {
+ if (intel_dp_is_edp(intel_dp) && fixed_mode) {
if (mode->hdisplay > fixed_mode->hdisplay)
return MODE_PANEL;
@@ -597,7 +597,7 @@ vlv_power_sequencer_pipe(struct intel_dp *intel_dp)
lockdep_assert_held(&dev_priv->pps_mutex);
/* We should never land here with regular DP ports */
- WARN_ON(!is_edp(intel_dp));
+ WARN_ON(!intel_dp_is_edp(intel_dp));
WARN_ON(intel_dp->active_pipe != INVALID_PIPE &&
intel_dp->active_pipe != intel_dp->pps_pipe);
@@ -644,7 +644,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
lockdep_assert_held(&dev_priv->pps_mutex);
/* We should never land here with regular DP ports */
- WARN_ON(!is_edp(intel_dp));
+ WARN_ON(!intel_dp_is_edp(intel_dp));
/*
* TODO: BXT has 2 PPS instances. The correct port->PPS instance
@@ -847,7 +847,7 @@ static int edp_notify_handler(struct notifier_block *this, unsigned long code,
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
- if (!is_edp(intel_dp) || code != SYS_RESTART)
+ if (!intel_dp_is_edp(intel_dp) || code != SYS_RESTART)
return 0;
pps_lock(intel_dp);
@@ -907,7 +907,7 @@ intel_dp_check_edp(struct intel_dp *intel_dp)
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
if (!edp_have_panel_power(intel_dp) && !edp_have_panel_vdd(intel_dp)) {
@@ -1681,7 +1681,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
else
pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
- if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
+ if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
struct drm_display_mode *panel_mode =
intel_connector->panel.alt_fixed_mode;
struct drm_display_mode *req_mode = &pipe_config->base.mode;
@@ -1736,7 +1736,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
/* Walk through all bpp values. Luckily they're all nicely spaced with 2
* bpc in between. */
bpp = intel_dp_compute_bpp(intel_dp, pipe_config);
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
/* Get bpp from vbt only for panels that dont have bpp in edid */
if (intel_connector->base.display_info.bpc == 0 &&
@@ -1829,7 +1829,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
* DPLL0 VCO may need to be adjusted to get the correct
* clock for eDP. This will affect cdclk as well.
*/
- if (is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
+ if (intel_dp_is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
int vco;
switch (pipe_config->port_clock / 2) {
@@ -2069,7 +2069,7 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
lockdep_assert_held(&dev_priv->pps_mutex);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return false;
cancel_delayed_work(&intel_dp->panel_vdd_work);
@@ -2119,7 +2119,7 @@ void intel_edp_panel_vdd_on(struct intel_dp *intel_dp)
{
bool vdd;
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
pps_lock(intel_dp);
@@ -2203,7 +2203,7 @@ static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
lockdep_assert_held(&dev_priv->pps_mutex);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
I915_STATE_WARN(!intel_dp->want_panel_vdd, "eDP port %c VDD not forced on",
@@ -2226,7 +2226,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
lockdep_assert_held(&dev_priv->pps_mutex);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
DRM_DEBUG_KMS("Turn eDP port %c panel power on\n",
@@ -2267,7 +2267,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
void intel_edp_panel_on(struct intel_dp *intel_dp)
{
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
pps_lock(intel_dp);
@@ -2285,7 +2285,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
lockdep_assert_held(&dev_priv->pps_mutex);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
DRM_DEBUG_KMS("Turn eDP port %c panel power off\n",
@@ -2316,7 +2316,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
void intel_edp_panel_off(struct intel_dp *intel_dp)
{
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
pps_lock(intel_dp);
@@ -2360,7 +2360,7 @@ void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
{
struct intel_dp *intel_dp = enc_to_intel_dp(conn_state->best_encoder);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
DRM_DEBUG_KMS("\n");
@@ -2377,7 +2377,7 @@ static void _intel_edp_backlight_off(struct intel_dp *intel_dp)
u32 pp;
i915_reg_t pp_ctrl_reg;
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
pps_lock(intel_dp);
@@ -2401,7 +2401,7 @@ void intel_edp_backlight_off(const struct drm_connector_state *old_conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(old_conn_state->best_encoder);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
DRM_DEBUG_KMS("\n");
@@ -2666,7 +2666,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
intel_dotclock_calculate(pipe_config->port_clock,
&pipe_config->dp_m_n);
- if (is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
+ if (intel_dp_is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) {
/*
* This is a big fat ugly hack.
@@ -3040,7 +3040,7 @@ static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp)
intel_dp->active_pipe = crtc->pipe;
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
/* now it's all ours */
@@ -3784,7 +3784,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
return false;
/* Don't clobber cached eDP rates. */
- if (!is_edp(intel_dp)) {
+ if (!intel_dp_is_edp(intel_dp)) {
intel_dp_set_sink_rates(intel_dp);
intel_dp_set_common_rates(intel_dp);
}
@@ -3806,7 +3806,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
* downstream port information. So, an early return here saves
* time from performing other operations which are not required.
*/
- if (!is_edp(intel_dp) && !intel_dp->sink_count)
+ if (!intel_dp_is_edp(intel_dp) && !intel_dp->sink_count)
return false;
if (!drm_dp_is_branch(intel_dp->dpcd))
@@ -4396,7 +4396,7 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
if (!intel_dp_get_dpcd(intel_dp))
return connector_status_disconnected;
- if (is_edp(intel_dp))
+ if (intel_dp_is_edp(intel_dp))
return connector_status_connected;
/* if there's no downstream port, we're done */
@@ -4712,7 +4712,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
intel_display_power_get(to_i915(dev), intel_dp->aux_power_domain);
/* Can't disconnect eDP, but you can close the lid... */
- if (is_edp(intel_dp))
+ if (intel_dp_is_edp(intel_dp))
status = edp_detect(intel_dp);
else if (intel_digital_port_connected(to_i915(dev),
dp_to_dig_port(intel_dp)))
@@ -4792,7 +4792,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
intel_dp->aux.i2c_defer_count = 0;
intel_dp_set_edid(intel_dp);
- if (is_edp(intel_dp) || intel_connector->detect_edid)
+ if (intel_dp_is_edp(intel_dp) || intel_connector->detect_edid)
status = connector_status_connected;
intel_dp->detect_done = true;
@@ -4876,7 +4876,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
}
/* if eDP has no EDID, fall back to fixed mode */
- if (is_edp(intel_attached_dp(connector)) &&
+ if (intel_dp_is_edp(intel_attached_dp(connector)) &&
intel_connector->panel.fixed_mode) {
struct drm_display_mode *mode;
@@ -4927,8 +4927,10 @@ intel_dp_connector_destroy(struct drm_connector *connector)
if (!IS_ERR_OR_NULL(intel_connector->edid))
kfree(intel_connector->edid);
- /* Can't call is_edp() since the encoder may have been destroyed
- * already. */
+ /*
+ * Can't call intel_dp_is_edp() since the encoder may have been
+ * destroyed already.
+ */
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
intel_panel_fini(&intel_connector->panel);
@@ -4942,7 +4944,7 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder)
struct intel_dp *intel_dp = &intel_dig_port->dp;
intel_dp_mst_encoder_cleanup(intel_dig_port);
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
/*
* vdd might still be enabled do to the delayed vdd off.
@@ -4968,7 +4970,7 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return;
/*
@@ -5036,7 +5038,7 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder)
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
intel_dp->active_pipe = vlv_active_pipe(intel_dp);
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
/* Reinit the power sequencer, in case BIOS did something with it. */
intel_dp_pps_init(encoder->dev, intel_dp);
intel_edp_panel_vdd_sanitize(intel_dp);
@@ -5160,7 +5162,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
intel_attach_force_audio_property(connector);
intel_attach_broadcast_rgb_property(connector);
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
u32 allowed_scalers;
allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
@@ -5826,7 +5828,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
struct edid *edid;
enum pipe pipe = INVALID_PIPE;
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
return true;
/*
@@ -6060,7 +6062,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
/* eDP only on port B and/or C on vlv/chv */
if (WARN_ON((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
- is_edp(intel_dp) && port != PORT_B && port != PORT_C))
+ intel_dp_is_edp(intel_dp) &&
+ port != PORT_B && port != PORT_C))
return false;
DRM_DEBUG_KMS("Adding %s connector on port %c\n",
@@ -6088,7 +6091,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
intel_connector->get_hw_state = intel_connector_get_hw_state;
/* init MST on ports that can support it */
- if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
+ if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
(port == PORT_B || port == PORT_C || port == PORT_D))
intel_dp_mst_encoder_init(intel_dig_port,
intel_connector->base.base.id);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 690e3b67dc1c..2940d393ecfd 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1499,6 +1499,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
bool intel_dp_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state);
+bool intel_dp_is_edp(struct intel_dp *intel_dp);
bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
bool long_hpd);
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
2017-08-18 9:30 [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Jani Nikula
2017-08-18 9:30 ` [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp Jani Nikula
@ 2017-08-18 12:05 ` Patchwork
2017-08-18 16:37 ` [PATCH 1/2] " Jim Bride
2017-08-18 19:13 ` Manasi Navare
3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2017-08-18 12:05 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
URL : https://patchwork.freedesktop.org/series/28976/
State : success
== Summary ==
Series 28976v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/28976/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-modeset:
skip -> PASS (fi-skl-x1585l) fdo#101781
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:451s
fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:431s
fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:362s
fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:551s
fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:519s
fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:525s
fi-byt-n2820 total:279 pass:250 dwarn:1 dfail:0 fail:0 skip:28 time:515s
fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:605s
fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:444s
fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:422s
fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:421s
fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:500s
fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:480s
fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:477s
fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:595s
fi-kbl-r total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:600s
fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:527s
fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:457s
fi-skl-6700k total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:487s
fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:490s
fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:438s
fi-skl-x1585l total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:506s
fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:548s
fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:405s
8183095ca4abce6ec2ad43c1e36e877792c140f1 drm-tip: 2017y-08m-18d-09h-08m-28s UTC integration manifest
d32d513b2a55 drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
bbdffa7e9a0f drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5436/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
2017-08-18 9:30 [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Jani Nikula
2017-08-18 9:30 ` [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp Jani Nikula
2017-08-18 12:05 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Patchwork
@ 2017-08-18 16:37 ` Jim Bride
2017-08-18 19:13 ` Manasi Navare
3 siblings, 0 replies; 8+ messages in thread
From: Jim Bride @ 2017-08-18 16:37 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Fri, Aug 18, 2017 at 12:30:19PM +0300, Jani Nikula wrote:
> Emphasize that this is based on the port, not intel_dp. This is also in
> line with the underlying intel_bios_is_port_edp() function. No
> functional changes.
Reviewed-by: Jim Bride <jim.bride@linux.intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 6 +++---
> drivers/gpu/drm/i915/intel_dp.c | 4 ++--
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 0e93ec201fe3..3b95cf953335 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13643,7 +13643,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
>
> } else if (HAS_PCH_SPLIT(dev_priv)) {
> int found;
> - dpd_is_edp = intel_dp_is_edp(dev_priv, PORT_D);
> + dpd_is_edp = intel_dp_is_port_edp(dev_priv, PORT_D);
>
> if (has_edp_a(dev_priv))
> intel_dp_init(dev_priv, DP_A, PORT_A);
> @@ -13686,14 +13686,14 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
> * trust the port type the VBT declares as we've seen at least
> * HDMI ports that the VBT claim are DP or eDP.
> */
> - has_edp = intel_dp_is_edp(dev_priv, PORT_B);
> + has_edp = intel_dp_is_port_edp(dev_priv, PORT_B);
> has_port = intel_bios_is_port_present(dev_priv, PORT_B);
> if (I915_READ(VLV_DP_B) & DP_DETECTED || has_port)
> has_edp &= intel_dp_init(dev_priv, VLV_DP_B, PORT_B);
> if ((I915_READ(VLV_HDMIB) & SDVO_DETECTED || has_port) && !has_edp)
> intel_hdmi_init(dev_priv, VLV_HDMIB, PORT_B);
>
> - has_edp = intel_dp_is_edp(dev_priv, PORT_C);
> + has_edp = intel_dp_is_port_edp(dev_priv, PORT_C);
> has_port = intel_bios_is_port_present(dev_priv, PORT_C);
> if (I915_READ(VLV_DP_C) & DP_DETECTED || has_port)
> has_edp &= intel_dp_init(dev_priv, VLV_DP_C, PORT_C);
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 4fd4853b2250..29ed1deb9c84 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5137,7 +5137,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
> }
>
> /* check the VBT to see whether the eDP is on another port */
> -bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> +bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
> {
> /*
> * eDP not supported on g4x. so bail out early just
> @@ -6042,7 +6042,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> intel_dp->DP = I915_READ(intel_dp->output_reg);
> intel_dp->attached_connector = intel_connector;
>
> - if (intel_dp_is_edp(dev_priv, port))
> + if (intel_dp_is_port_edp(dev_priv, port))
> type = DRM_MODE_CONNECTOR_eDP;
> else
> type = DRM_MODE_CONNECTOR_DisplayPort;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index fa47285918f4..690e3b67dc1c 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1499,7 +1499,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
> bool intel_dp_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state);
> -bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port);
> +bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
> enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
> bool long_hpd);
> void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
> --
> 2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
2017-08-18 9:30 ` [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp Jani Nikula
@ 2017-08-18 16:39 ` Jim Bride
2017-08-18 19:15 ` Manasi Navare
1 sibling, 0 replies; 8+ messages in thread
From: Jim Bride @ 2017-08-18 16:39 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Fri, Aug 18, 2017 at 12:30:20PM +0300, Jani Nikula wrote:
> Expose across driver for future work. No functional changes.
Reviewed-by: Jim Bride <jim.bride@linux.intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 77 +++++++++++++++++++++-------------------
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> 2 files changed, 41 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 29ed1deb9c84..e38565829d19 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -103,13 +103,13 @@ static const int cnl_rates[] = { 162000, 216000, 270000,
> static const int default_rates[] = { 162000, 270000, 540000 };
>
> /**
> - * is_edp - is the given port attached to an eDP panel (either CPU or PCH)
> + * intel_dp_is_edp - is the given port attached to an eDP panel (either CPU or PCH)
> * @intel_dp: DP struct
> *
> * If a CPU or PCH DP output is attached to an eDP panel, this function
> * will return true, and false otherwise.
> */
> -static bool is_edp(struct intel_dp *intel_dp)
> +bool intel_dp_is_edp(struct intel_dp *intel_dp)
> {
> struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>
> @@ -388,7 +388,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
>
> max_dotclk = intel_dp_downstream_max_dotclock(intel_dp);
>
> - if (is_edp(intel_dp) && fixed_mode) {
> + if (intel_dp_is_edp(intel_dp) && fixed_mode) {
> if (mode->hdisplay > fixed_mode->hdisplay)
> return MODE_PANEL;
>
> @@ -597,7 +597,7 @@ vlv_power_sequencer_pipe(struct intel_dp *intel_dp)
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> /* We should never land here with regular DP ports */
> - WARN_ON(!is_edp(intel_dp));
> + WARN_ON(!intel_dp_is_edp(intel_dp));
>
> WARN_ON(intel_dp->active_pipe != INVALID_PIPE &&
> intel_dp->active_pipe != intel_dp->pps_pipe);
> @@ -644,7 +644,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> /* We should never land here with regular DP ports */
> - WARN_ON(!is_edp(intel_dp));
> + WARN_ON(!intel_dp_is_edp(intel_dp));
>
> /*
> * TODO: BXT has 2 PPS instances. The correct port->PPS instance
> @@ -847,7 +847,7 @@ static int edp_notify_handler(struct notifier_block *this, unsigned long code,
> struct drm_device *dev = intel_dp_to_dev(intel_dp);
> struct drm_i915_private *dev_priv = to_i915(dev);
>
> - if (!is_edp(intel_dp) || code != SYS_RESTART)
> + if (!intel_dp_is_edp(intel_dp) || code != SYS_RESTART)
> return 0;
>
> pps_lock(intel_dp);
> @@ -907,7 +907,7 @@ intel_dp_check_edp(struct intel_dp *intel_dp)
> struct drm_device *dev = intel_dp_to_dev(intel_dp);
> struct drm_i915_private *dev_priv = to_i915(dev);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> if (!edp_have_panel_power(intel_dp) && !edp_have_panel_vdd(intel_dp)) {
> @@ -1681,7 +1681,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> else
> pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
>
> - if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
> + if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
> struct drm_display_mode *panel_mode =
> intel_connector->panel.alt_fixed_mode;
> struct drm_display_mode *req_mode = &pipe_config->base.mode;
> @@ -1736,7 +1736,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> /* Walk through all bpp values. Luckily they're all nicely spaced with 2
> * bpc in between. */
> bpp = intel_dp_compute_bpp(intel_dp, pipe_config);
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
>
> /* Get bpp from vbt only for panels that dont have bpp in edid */
> if (intel_connector->base.display_info.bpc == 0 &&
> @@ -1829,7 +1829,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> * DPLL0 VCO may need to be adjusted to get the correct
> * clock for eDP. This will affect cdclk as well.
> */
> - if (is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
> + if (intel_dp_is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
> int vco;
>
> switch (pipe_config->port_clock / 2) {
> @@ -2069,7 +2069,7 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return false;
>
> cancel_delayed_work(&intel_dp->panel_vdd_work);
> @@ -2119,7 +2119,7 @@ void intel_edp_panel_vdd_on(struct intel_dp *intel_dp)
> {
> bool vdd;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2203,7 +2203,7 @@ static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> I915_STATE_WARN(!intel_dp->want_panel_vdd, "eDP port %c VDD not forced on",
> @@ -2226,7 +2226,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("Turn eDP port %c panel power on\n",
> @@ -2267,7 +2267,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
>
> void intel_edp_panel_on(struct intel_dp *intel_dp)
> {
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2285,7 +2285,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("Turn eDP port %c panel power off\n",
> @@ -2316,7 +2316,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
>
> void intel_edp_panel_off(struct intel_dp *intel_dp)
> {
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2360,7 +2360,7 @@ void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(conn_state->best_encoder);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("\n");
> @@ -2377,7 +2377,7 @@ static void _intel_edp_backlight_off(struct intel_dp *intel_dp)
> u32 pp;
> i915_reg_t pp_ctrl_reg;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2401,7 +2401,7 @@ void intel_edp_backlight_off(const struct drm_connector_state *old_conn_state)
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(old_conn_state->best_encoder);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("\n");
> @@ -2666,7 +2666,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
> intel_dotclock_calculate(pipe_config->port_clock,
> &pipe_config->dp_m_n);
>
> - if (is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
> + if (intel_dp_is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
> pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) {
> /*
> * This is a big fat ugly hack.
> @@ -3040,7 +3040,7 @@ static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp)
>
> intel_dp->active_pipe = crtc->pipe;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> /* now it's all ours */
> @@ -3784,7 +3784,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
> return false;
>
> /* Don't clobber cached eDP rates. */
> - if (!is_edp(intel_dp)) {
> + if (!intel_dp_is_edp(intel_dp)) {
> intel_dp_set_sink_rates(intel_dp);
> intel_dp_set_common_rates(intel_dp);
> }
> @@ -3806,7 +3806,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
> * downstream port information. So, an early return here saves
> * time from performing other operations which are not required.
> */
> - if (!is_edp(intel_dp) && !intel_dp->sink_count)
> + if (!intel_dp_is_edp(intel_dp) && !intel_dp->sink_count)
> return false;
>
> if (!drm_dp_is_branch(intel_dp->dpcd))
> @@ -4396,7 +4396,7 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
> if (!intel_dp_get_dpcd(intel_dp))
> return connector_status_disconnected;
>
> - if (is_edp(intel_dp))
> + if (intel_dp_is_edp(intel_dp))
> return connector_status_connected;
>
> /* if there's no downstream port, we're done */
> @@ -4712,7 +4712,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
> intel_display_power_get(to_i915(dev), intel_dp->aux_power_domain);
>
> /* Can't disconnect eDP, but you can close the lid... */
> - if (is_edp(intel_dp))
> + if (intel_dp_is_edp(intel_dp))
> status = edp_detect(intel_dp);
> else if (intel_digital_port_connected(to_i915(dev),
> dp_to_dig_port(intel_dp)))
> @@ -4792,7 +4792,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
> intel_dp->aux.i2c_defer_count = 0;
>
> intel_dp_set_edid(intel_dp);
> - if (is_edp(intel_dp) || intel_connector->detect_edid)
> + if (intel_dp_is_edp(intel_dp) || intel_connector->detect_edid)
> status = connector_status_connected;
> intel_dp->detect_done = true;
>
> @@ -4876,7 +4876,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
> }
>
> /* if eDP has no EDID, fall back to fixed mode */
> - if (is_edp(intel_attached_dp(connector)) &&
> + if (intel_dp_is_edp(intel_attached_dp(connector)) &&
> intel_connector->panel.fixed_mode) {
> struct drm_display_mode *mode;
>
> @@ -4927,8 +4927,10 @@ intel_dp_connector_destroy(struct drm_connector *connector)
> if (!IS_ERR_OR_NULL(intel_connector->edid))
> kfree(intel_connector->edid);
>
> - /* Can't call is_edp() since the encoder may have been destroyed
> - * already. */
> + /*
> + * Can't call intel_dp_is_edp() since the encoder may have been
> + * destroyed already.
> + */
> if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
> intel_panel_fini(&intel_connector->panel);
>
> @@ -4942,7 +4944,7 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder)
> struct intel_dp *intel_dp = &intel_dig_port->dp;
>
> intel_dp_mst_encoder_cleanup(intel_dig_port);
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
> cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> /*
> * vdd might still be enabled do to the delayed vdd off.
> @@ -4968,7 +4970,7 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> /*
> @@ -5036,7 +5038,7 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder)
> if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> intel_dp->active_pipe = vlv_active_pipe(intel_dp);
>
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
> /* Reinit the power sequencer, in case BIOS did something with it. */
> intel_dp_pps_init(encoder->dev, intel_dp);
> intel_edp_panel_vdd_sanitize(intel_dp);
> @@ -5160,7 +5162,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
> intel_attach_force_audio_property(connector);
> intel_attach_broadcast_rgb_property(connector);
>
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
> u32 allowed_scalers;
>
> allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
> @@ -5826,7 +5828,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> struct edid *edid;
> enum pipe pipe = INVALID_PIPE;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return true;
>
> /*
> @@ -6060,7 +6062,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>
> /* eDP only on port B and/or C on vlv/chv */
> if (WARN_ON((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
> - is_edp(intel_dp) && port != PORT_B && port != PORT_C))
> + intel_dp_is_edp(intel_dp) &&
> + port != PORT_B && port != PORT_C))
> return false;
>
> DRM_DEBUG_KMS("Adding %s connector on port %c\n",
> @@ -6088,7 +6091,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> intel_connector->get_hw_state = intel_connector_get_hw_state;
>
> /* init MST on ports that can support it */
> - if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
> + if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
> (port == PORT_B || port == PORT_C || port == PORT_D))
> intel_dp_mst_encoder_init(intel_dig_port,
> intel_connector->base.base.id);
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 690e3b67dc1c..2940d393ecfd 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1499,6 +1499,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
> bool intel_dp_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state);
> +bool intel_dp_is_edp(struct intel_dp *intel_dp);
> bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
> enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
> bool long_hpd);
> --
> 2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
2017-08-18 9:30 [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Jani Nikula
` (2 preceding siblings ...)
2017-08-18 16:37 ` [PATCH 1/2] " Jim Bride
@ 2017-08-18 19:13 ` Manasi Navare
3 siblings, 0 replies; 8+ messages in thread
From: Manasi Navare @ 2017-08-18 19:13 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Fri, Aug 18, 2017 at 12:30:19PM +0300, Jani Nikula wrote:
> Emphasize that this is based on the port, not intel_dp. This is also in
> line with the underlying intel_bios_is_port_edp() function. No
> functional changes.
>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 6 +++---
> drivers/gpu/drm/i915/intel_dp.c | 4 ++--
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 0e93ec201fe3..3b95cf953335 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13643,7 +13643,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
>
> } else if (HAS_PCH_SPLIT(dev_priv)) {
> int found;
> - dpd_is_edp = intel_dp_is_edp(dev_priv, PORT_D);
> + dpd_is_edp = intel_dp_is_port_edp(dev_priv, PORT_D);
>
> if (has_edp_a(dev_priv))
> intel_dp_init(dev_priv, DP_A, PORT_A);
> @@ -13686,14 +13686,14 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
> * trust the port type the VBT declares as we've seen at least
> * HDMI ports that the VBT claim are DP or eDP.
> */
> - has_edp = intel_dp_is_edp(dev_priv, PORT_B);
> + has_edp = intel_dp_is_port_edp(dev_priv, PORT_B);
> has_port = intel_bios_is_port_present(dev_priv, PORT_B);
> if (I915_READ(VLV_DP_B) & DP_DETECTED || has_port)
> has_edp &= intel_dp_init(dev_priv, VLV_DP_B, PORT_B);
> if ((I915_READ(VLV_HDMIB) & SDVO_DETECTED || has_port) && !has_edp)
> intel_hdmi_init(dev_priv, VLV_HDMIB, PORT_B);
>
> - has_edp = intel_dp_is_edp(dev_priv, PORT_C);
> + has_edp = intel_dp_is_port_edp(dev_priv, PORT_C);
> has_port = intel_bios_is_port_present(dev_priv, PORT_C);
> if (I915_READ(VLV_DP_C) & DP_DETECTED || has_port)
> has_edp &= intel_dp_init(dev_priv, VLV_DP_C, PORT_C);
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 4fd4853b2250..29ed1deb9c84 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5137,7 +5137,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
> }
>
> /* check the VBT to see whether the eDP is on another port */
> -bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> +bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
> {
> /*
> * eDP not supported on g4x. so bail out early just
> @@ -6042,7 +6042,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> intel_dp->DP = I915_READ(intel_dp->output_reg);
> intel_dp->attached_connector = intel_connector;
>
> - if (intel_dp_is_edp(dev_priv, port))
> + if (intel_dp_is_port_edp(dev_priv, port))
> type = DRM_MODE_CONNECTOR_eDP;
> else
> type = DRM_MODE_CONNECTOR_DisplayPort;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index fa47285918f4..690e3b67dc1c 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1499,7 +1499,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
> bool intel_dp_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state);
> -bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port);
> +bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
> enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
> bool long_hpd);
> void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
> --
> 2.11.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
2017-08-18 9:30 ` [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp Jani Nikula
2017-08-18 16:39 ` Jim Bride
@ 2017-08-18 19:15 ` Manasi Navare
2017-08-21 8:50 ` Jani Nikula
1 sibling, 1 reply; 8+ messages in thread
From: Manasi Navare @ 2017-08-18 19:15 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
Thanks for the patch, will rebase my patch on top of this.
Manasi
On Fri, Aug 18, 2017 at 12:30:20PM +0300, Jani Nikula wrote:
> Expose across driver for future work. No functional changes.
>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 77 +++++++++++++++++++++-------------------
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> 2 files changed, 41 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 29ed1deb9c84..e38565829d19 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -103,13 +103,13 @@ static const int cnl_rates[] = { 162000, 216000, 270000,
> static const int default_rates[] = { 162000, 270000, 540000 };
>
> /**
> - * is_edp - is the given port attached to an eDP panel (either CPU or PCH)
> + * intel_dp_is_edp - is the given port attached to an eDP panel (either CPU or PCH)
> * @intel_dp: DP struct
> *
> * If a CPU or PCH DP output is attached to an eDP panel, this function
> * will return true, and false otherwise.
> */
> -static bool is_edp(struct intel_dp *intel_dp)
> +bool intel_dp_is_edp(struct intel_dp *intel_dp)
> {
> struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>
> @@ -388,7 +388,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
>
> max_dotclk = intel_dp_downstream_max_dotclock(intel_dp);
>
> - if (is_edp(intel_dp) && fixed_mode) {
> + if (intel_dp_is_edp(intel_dp) && fixed_mode) {
> if (mode->hdisplay > fixed_mode->hdisplay)
> return MODE_PANEL;
>
> @@ -597,7 +597,7 @@ vlv_power_sequencer_pipe(struct intel_dp *intel_dp)
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> /* We should never land here with regular DP ports */
> - WARN_ON(!is_edp(intel_dp));
> + WARN_ON(!intel_dp_is_edp(intel_dp));
>
> WARN_ON(intel_dp->active_pipe != INVALID_PIPE &&
> intel_dp->active_pipe != intel_dp->pps_pipe);
> @@ -644,7 +644,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> /* We should never land here with regular DP ports */
> - WARN_ON(!is_edp(intel_dp));
> + WARN_ON(!intel_dp_is_edp(intel_dp));
>
> /*
> * TODO: BXT has 2 PPS instances. The correct port->PPS instance
> @@ -847,7 +847,7 @@ static int edp_notify_handler(struct notifier_block *this, unsigned long code,
> struct drm_device *dev = intel_dp_to_dev(intel_dp);
> struct drm_i915_private *dev_priv = to_i915(dev);
>
> - if (!is_edp(intel_dp) || code != SYS_RESTART)
> + if (!intel_dp_is_edp(intel_dp) || code != SYS_RESTART)
> return 0;
>
> pps_lock(intel_dp);
> @@ -907,7 +907,7 @@ intel_dp_check_edp(struct intel_dp *intel_dp)
> struct drm_device *dev = intel_dp_to_dev(intel_dp);
> struct drm_i915_private *dev_priv = to_i915(dev);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> if (!edp_have_panel_power(intel_dp) && !edp_have_panel_vdd(intel_dp)) {
> @@ -1681,7 +1681,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> else
> pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
>
> - if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
> + if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
> struct drm_display_mode *panel_mode =
> intel_connector->panel.alt_fixed_mode;
> struct drm_display_mode *req_mode = &pipe_config->base.mode;
> @@ -1736,7 +1736,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> /* Walk through all bpp values. Luckily they're all nicely spaced with 2
> * bpc in between. */
> bpp = intel_dp_compute_bpp(intel_dp, pipe_config);
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
>
> /* Get bpp from vbt only for panels that dont have bpp in edid */
> if (intel_connector->base.display_info.bpc == 0 &&
> @@ -1829,7 +1829,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> * DPLL0 VCO may need to be adjusted to get the correct
> * clock for eDP. This will affect cdclk as well.
> */
> - if (is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
> + if (intel_dp_is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
> int vco;
>
> switch (pipe_config->port_clock / 2) {
> @@ -2069,7 +2069,7 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return false;
>
> cancel_delayed_work(&intel_dp->panel_vdd_work);
> @@ -2119,7 +2119,7 @@ void intel_edp_panel_vdd_on(struct intel_dp *intel_dp)
> {
> bool vdd;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2203,7 +2203,7 @@ static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> I915_STATE_WARN(!intel_dp->want_panel_vdd, "eDP port %c VDD not forced on",
> @@ -2226,7 +2226,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("Turn eDP port %c panel power on\n",
> @@ -2267,7 +2267,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
>
> void intel_edp_panel_on(struct intel_dp *intel_dp)
> {
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2285,7 +2285,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("Turn eDP port %c panel power off\n",
> @@ -2316,7 +2316,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
>
> void intel_edp_panel_off(struct intel_dp *intel_dp)
> {
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2360,7 +2360,7 @@ void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(conn_state->best_encoder);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("\n");
> @@ -2377,7 +2377,7 @@ static void _intel_edp_backlight_off(struct intel_dp *intel_dp)
> u32 pp;
> i915_reg_t pp_ctrl_reg;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> pps_lock(intel_dp);
> @@ -2401,7 +2401,7 @@ void intel_edp_backlight_off(const struct drm_connector_state *old_conn_state)
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(old_conn_state->best_encoder);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> DRM_DEBUG_KMS("\n");
> @@ -2666,7 +2666,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
> intel_dotclock_calculate(pipe_config->port_clock,
> &pipe_config->dp_m_n);
>
> - if (is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
> + if (intel_dp_is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
> pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) {
> /*
> * This is a big fat ugly hack.
> @@ -3040,7 +3040,7 @@ static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp)
>
> intel_dp->active_pipe = crtc->pipe;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> /* now it's all ours */
> @@ -3784,7 +3784,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
> return false;
>
> /* Don't clobber cached eDP rates. */
> - if (!is_edp(intel_dp)) {
> + if (!intel_dp_is_edp(intel_dp)) {
> intel_dp_set_sink_rates(intel_dp);
> intel_dp_set_common_rates(intel_dp);
> }
> @@ -3806,7 +3806,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
> * downstream port information. So, an early return here saves
> * time from performing other operations which are not required.
> */
> - if (!is_edp(intel_dp) && !intel_dp->sink_count)
> + if (!intel_dp_is_edp(intel_dp) && !intel_dp->sink_count)
> return false;
>
> if (!drm_dp_is_branch(intel_dp->dpcd))
> @@ -4396,7 +4396,7 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
> if (!intel_dp_get_dpcd(intel_dp))
> return connector_status_disconnected;
>
> - if (is_edp(intel_dp))
> + if (intel_dp_is_edp(intel_dp))
> return connector_status_connected;
>
> /* if there's no downstream port, we're done */
> @@ -4712,7 +4712,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
> intel_display_power_get(to_i915(dev), intel_dp->aux_power_domain);
>
> /* Can't disconnect eDP, but you can close the lid... */
> - if (is_edp(intel_dp))
> + if (intel_dp_is_edp(intel_dp))
> status = edp_detect(intel_dp);
> else if (intel_digital_port_connected(to_i915(dev),
> dp_to_dig_port(intel_dp)))
> @@ -4792,7 +4792,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
> intel_dp->aux.i2c_defer_count = 0;
>
> intel_dp_set_edid(intel_dp);
> - if (is_edp(intel_dp) || intel_connector->detect_edid)
> + if (intel_dp_is_edp(intel_dp) || intel_connector->detect_edid)
> status = connector_status_connected;
> intel_dp->detect_done = true;
>
> @@ -4876,7 +4876,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
> }
>
> /* if eDP has no EDID, fall back to fixed mode */
> - if (is_edp(intel_attached_dp(connector)) &&
> + if (intel_dp_is_edp(intel_attached_dp(connector)) &&
> intel_connector->panel.fixed_mode) {
> struct drm_display_mode *mode;
>
> @@ -4927,8 +4927,10 @@ intel_dp_connector_destroy(struct drm_connector *connector)
> if (!IS_ERR_OR_NULL(intel_connector->edid))
> kfree(intel_connector->edid);
>
> - /* Can't call is_edp() since the encoder may have been destroyed
> - * already. */
> + /*
> + * Can't call intel_dp_is_edp() since the encoder may have been
> + * destroyed already.
> + */
> if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
> intel_panel_fini(&intel_connector->panel);
>
> @@ -4942,7 +4944,7 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder)
> struct intel_dp *intel_dp = &intel_dig_port->dp;
>
> intel_dp_mst_encoder_cleanup(intel_dig_port);
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
> cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> /*
> * vdd might still be enabled do to the delayed vdd off.
> @@ -4968,7 +4970,7 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return;
>
> /*
> @@ -5036,7 +5038,7 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder)
> if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> intel_dp->active_pipe = vlv_active_pipe(intel_dp);
>
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
> /* Reinit the power sequencer, in case BIOS did something with it. */
> intel_dp_pps_init(encoder->dev, intel_dp);
> intel_edp_panel_vdd_sanitize(intel_dp);
> @@ -5160,7 +5162,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
> intel_attach_force_audio_property(connector);
> intel_attach_broadcast_rgb_property(connector);
>
> - if (is_edp(intel_dp)) {
> + if (intel_dp_is_edp(intel_dp)) {
> u32 allowed_scalers;
>
> allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
> @@ -5826,7 +5828,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> struct edid *edid;
> enum pipe pipe = INVALID_PIPE;
>
> - if (!is_edp(intel_dp))
> + if (!intel_dp_is_edp(intel_dp))
> return true;
>
> /*
> @@ -6060,7 +6062,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>
> /* eDP only on port B and/or C on vlv/chv */
> if (WARN_ON((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
> - is_edp(intel_dp) && port != PORT_B && port != PORT_C))
> + intel_dp_is_edp(intel_dp) &&
> + port != PORT_B && port != PORT_C))
> return false;
>
> DRM_DEBUG_KMS("Adding %s connector on port %c\n",
> @@ -6088,7 +6091,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> intel_connector->get_hw_state = intel_connector_get_hw_state;
>
> /* init MST on ports that can support it */
> - if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
> + if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
> (port == PORT_B || port == PORT_C || port == PORT_D))
> intel_dp_mst_encoder_init(intel_dig_port,
> intel_connector->base.base.id);
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 690e3b67dc1c..2940d393ecfd 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1499,6 +1499,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
> bool intel_dp_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state);
> +bool intel_dp_is_edp(struct intel_dp *intel_dp);
> bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
> enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
> bool long_hpd);
> --
> 2.11.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
2017-08-18 19:15 ` Manasi Navare
@ 2017-08-21 8:50 ` Jani Nikula
0 siblings, 0 replies; 8+ messages in thread
From: Jani Nikula @ 2017-08-21 8:50 UTC (permalink / raw)
To: Manasi Navare; +Cc: intel-gfx
On Fri, 18 Aug 2017, Manasi Navare <manasi.d.navare@intel.com> wrote:
> Thanks for the patch, will rebase my patch on top of this.
Both pushed, thanks for the reviews.
BR,
Jani.
>
> Manasi
>
> On Fri, Aug 18, 2017 at 12:30:20PM +0300, Jani Nikula wrote:
>> Expose across driver for future work. No functional changes.
>>
>> Cc: Manasi Navare <manasi.d.navare@intel.com>
>> Cc: Jim Bride <jim.bride@linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
>
>> ---
>> drivers/gpu/drm/i915/intel_dp.c | 77 +++++++++++++++++++++-------------------
>> drivers/gpu/drm/i915/intel_drv.h | 1 +
>> 2 files changed, 41 insertions(+), 37 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index 29ed1deb9c84..e38565829d19 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -103,13 +103,13 @@ static const int cnl_rates[] = { 162000, 216000, 270000,
>> static const int default_rates[] = { 162000, 270000, 540000 };
>>
>> /**
>> - * is_edp - is the given port attached to an eDP panel (either CPU or PCH)
>> + * intel_dp_is_edp - is the given port attached to an eDP panel (either CPU or PCH)
>> * @intel_dp: DP struct
>> *
>> * If a CPU or PCH DP output is attached to an eDP panel, this function
>> * will return true, and false otherwise.
>> */
>> -static bool is_edp(struct intel_dp *intel_dp)
>> +bool intel_dp_is_edp(struct intel_dp *intel_dp)
>> {
>> struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>>
>> @@ -388,7 +388,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
>>
>> max_dotclk = intel_dp_downstream_max_dotclock(intel_dp);
>>
>> - if (is_edp(intel_dp) && fixed_mode) {
>> + if (intel_dp_is_edp(intel_dp) && fixed_mode) {
>> if (mode->hdisplay > fixed_mode->hdisplay)
>> return MODE_PANEL;
>>
>> @@ -597,7 +597,7 @@ vlv_power_sequencer_pipe(struct intel_dp *intel_dp)
>> lockdep_assert_held(&dev_priv->pps_mutex);
>>
>> /* We should never land here with regular DP ports */
>> - WARN_ON(!is_edp(intel_dp));
>> + WARN_ON(!intel_dp_is_edp(intel_dp));
>>
>> WARN_ON(intel_dp->active_pipe != INVALID_PIPE &&
>> intel_dp->active_pipe != intel_dp->pps_pipe);
>> @@ -644,7 +644,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
>> lockdep_assert_held(&dev_priv->pps_mutex);
>>
>> /* We should never land here with regular DP ports */
>> - WARN_ON(!is_edp(intel_dp));
>> + WARN_ON(!intel_dp_is_edp(intel_dp));
>>
>> /*
>> * TODO: BXT has 2 PPS instances. The correct port->PPS instance
>> @@ -847,7 +847,7 @@ static int edp_notify_handler(struct notifier_block *this, unsigned long code,
>> struct drm_device *dev = intel_dp_to_dev(intel_dp);
>> struct drm_i915_private *dev_priv = to_i915(dev);
>>
>> - if (!is_edp(intel_dp) || code != SYS_RESTART)
>> + if (!intel_dp_is_edp(intel_dp) || code != SYS_RESTART)
>> return 0;
>>
>> pps_lock(intel_dp);
>> @@ -907,7 +907,7 @@ intel_dp_check_edp(struct intel_dp *intel_dp)
>> struct drm_device *dev = intel_dp_to_dev(intel_dp);
>> struct drm_i915_private *dev_priv = to_i915(dev);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> if (!edp_have_panel_power(intel_dp) && !edp_have_panel_vdd(intel_dp)) {
>> @@ -1681,7 +1681,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>> else
>> pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
>>
>> - if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
>> + if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
>> struct drm_display_mode *panel_mode =
>> intel_connector->panel.alt_fixed_mode;
>> struct drm_display_mode *req_mode = &pipe_config->base.mode;
>> @@ -1736,7 +1736,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>> /* Walk through all bpp values. Luckily they're all nicely spaced with 2
>> * bpc in between. */
>> bpp = intel_dp_compute_bpp(intel_dp, pipe_config);
>> - if (is_edp(intel_dp)) {
>> + if (intel_dp_is_edp(intel_dp)) {
>>
>> /* Get bpp from vbt only for panels that dont have bpp in edid */
>> if (intel_connector->base.display_info.bpc == 0 &&
>> @@ -1829,7 +1829,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>> * DPLL0 VCO may need to be adjusted to get the correct
>> * clock for eDP. This will affect cdclk as well.
>> */
>> - if (is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
>> + if (intel_dp_is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
>> int vco;
>>
>> switch (pipe_config->port_clock / 2) {
>> @@ -2069,7 +2069,7 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
>>
>> lockdep_assert_held(&dev_priv->pps_mutex);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return false;
>>
>> cancel_delayed_work(&intel_dp->panel_vdd_work);
>> @@ -2119,7 +2119,7 @@ void intel_edp_panel_vdd_on(struct intel_dp *intel_dp)
>> {
>> bool vdd;
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> pps_lock(intel_dp);
>> @@ -2203,7 +2203,7 @@ static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
>>
>> lockdep_assert_held(&dev_priv->pps_mutex);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> I915_STATE_WARN(!intel_dp->want_panel_vdd, "eDP port %c VDD not forced on",
>> @@ -2226,7 +2226,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
>>
>> lockdep_assert_held(&dev_priv->pps_mutex);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> DRM_DEBUG_KMS("Turn eDP port %c panel power on\n",
>> @@ -2267,7 +2267,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
>>
>> void intel_edp_panel_on(struct intel_dp *intel_dp)
>> {
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> pps_lock(intel_dp);
>> @@ -2285,7 +2285,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
>>
>> lockdep_assert_held(&dev_priv->pps_mutex);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> DRM_DEBUG_KMS("Turn eDP port %c panel power off\n",
>> @@ -2316,7 +2316,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
>>
>> void intel_edp_panel_off(struct intel_dp *intel_dp)
>> {
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> pps_lock(intel_dp);
>> @@ -2360,7 +2360,7 @@ void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
>> {
>> struct intel_dp *intel_dp = enc_to_intel_dp(conn_state->best_encoder);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> DRM_DEBUG_KMS("\n");
>> @@ -2377,7 +2377,7 @@ static void _intel_edp_backlight_off(struct intel_dp *intel_dp)
>> u32 pp;
>> i915_reg_t pp_ctrl_reg;
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> pps_lock(intel_dp);
>> @@ -2401,7 +2401,7 @@ void intel_edp_backlight_off(const struct drm_connector_state *old_conn_state)
>> {
>> struct intel_dp *intel_dp = enc_to_intel_dp(old_conn_state->best_encoder);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> DRM_DEBUG_KMS("\n");
>> @@ -2666,7 +2666,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
>> intel_dotclock_calculate(pipe_config->port_clock,
>> &pipe_config->dp_m_n);
>>
>> - if (is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
>> + if (intel_dp_is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
>> pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) {
>> /*
>> * This is a big fat ugly hack.
>> @@ -3040,7 +3040,7 @@ static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp)
>>
>> intel_dp->active_pipe = crtc->pipe;
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> /* now it's all ours */
>> @@ -3784,7 +3784,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
>> return false;
>>
>> /* Don't clobber cached eDP rates. */
>> - if (!is_edp(intel_dp)) {
>> + if (!intel_dp_is_edp(intel_dp)) {
>> intel_dp_set_sink_rates(intel_dp);
>> intel_dp_set_common_rates(intel_dp);
>> }
>> @@ -3806,7 +3806,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
>> * downstream port information. So, an early return here saves
>> * time from performing other operations which are not required.
>> */
>> - if (!is_edp(intel_dp) && !intel_dp->sink_count)
>> + if (!intel_dp_is_edp(intel_dp) && !intel_dp->sink_count)
>> return false;
>>
>> if (!drm_dp_is_branch(intel_dp->dpcd))
>> @@ -4396,7 +4396,7 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
>> if (!intel_dp_get_dpcd(intel_dp))
>> return connector_status_disconnected;
>>
>> - if (is_edp(intel_dp))
>> + if (intel_dp_is_edp(intel_dp))
>> return connector_status_connected;
>>
>> /* if there's no downstream port, we're done */
>> @@ -4712,7 +4712,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
>> intel_display_power_get(to_i915(dev), intel_dp->aux_power_domain);
>>
>> /* Can't disconnect eDP, but you can close the lid... */
>> - if (is_edp(intel_dp))
>> + if (intel_dp_is_edp(intel_dp))
>> status = edp_detect(intel_dp);
>> else if (intel_digital_port_connected(to_i915(dev),
>> dp_to_dig_port(intel_dp)))
>> @@ -4792,7 +4792,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
>> intel_dp->aux.i2c_defer_count = 0;
>>
>> intel_dp_set_edid(intel_dp);
>> - if (is_edp(intel_dp) || intel_connector->detect_edid)
>> + if (intel_dp_is_edp(intel_dp) || intel_connector->detect_edid)
>> status = connector_status_connected;
>> intel_dp->detect_done = true;
>>
>> @@ -4876,7 +4876,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
>> }
>>
>> /* if eDP has no EDID, fall back to fixed mode */
>> - if (is_edp(intel_attached_dp(connector)) &&
>> + if (intel_dp_is_edp(intel_attached_dp(connector)) &&
>> intel_connector->panel.fixed_mode) {
>> struct drm_display_mode *mode;
>>
>> @@ -4927,8 +4927,10 @@ intel_dp_connector_destroy(struct drm_connector *connector)
>> if (!IS_ERR_OR_NULL(intel_connector->edid))
>> kfree(intel_connector->edid);
>>
>> - /* Can't call is_edp() since the encoder may have been destroyed
>> - * already. */
>> + /*
>> + * Can't call intel_dp_is_edp() since the encoder may have been
>> + * destroyed already.
>> + */
>> if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
>> intel_panel_fini(&intel_connector->panel);
>>
>> @@ -4942,7 +4944,7 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder)
>> struct intel_dp *intel_dp = &intel_dig_port->dp;
>>
>> intel_dp_mst_encoder_cleanup(intel_dig_port);
>> - if (is_edp(intel_dp)) {
>> + if (intel_dp_is_edp(intel_dp)) {
>> cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
>> /*
>> * vdd might still be enabled do to the delayed vdd off.
>> @@ -4968,7 +4970,7 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
>> {
>> struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return;
>>
>> /*
>> @@ -5036,7 +5038,7 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder)
>> if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
>> intel_dp->active_pipe = vlv_active_pipe(intel_dp);
>>
>> - if (is_edp(intel_dp)) {
>> + if (intel_dp_is_edp(intel_dp)) {
>> /* Reinit the power sequencer, in case BIOS did something with it. */
>> intel_dp_pps_init(encoder->dev, intel_dp);
>> intel_edp_panel_vdd_sanitize(intel_dp);
>> @@ -5160,7 +5162,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
>> intel_attach_force_audio_property(connector);
>> intel_attach_broadcast_rgb_property(connector);
>>
>> - if (is_edp(intel_dp)) {
>> + if (intel_dp_is_edp(intel_dp)) {
>> u32 allowed_scalers;
>>
>> allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
>> @@ -5826,7 +5828,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
>> struct edid *edid;
>> enum pipe pipe = INVALID_PIPE;
>>
>> - if (!is_edp(intel_dp))
>> + if (!intel_dp_is_edp(intel_dp))
>> return true;
>>
>> /*
>> @@ -6060,7 +6062,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>>
>> /* eDP only on port B and/or C on vlv/chv */
>> if (WARN_ON((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
>> - is_edp(intel_dp) && port != PORT_B && port != PORT_C))
>> + intel_dp_is_edp(intel_dp) &&
>> + port != PORT_B && port != PORT_C))
>> return false;
>>
>> DRM_DEBUG_KMS("Adding %s connector on port %c\n",
>> @@ -6088,7 +6091,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>> intel_connector->get_hw_state = intel_connector_get_hw_state;
>>
>> /* init MST on ports that can support it */
>> - if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
>> + if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
>> (port == PORT_B || port == PORT_C || port == PORT_D))
>> intel_dp_mst_encoder_init(intel_dig_port,
>> intel_connector->base.base.id);
>> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
>> index 690e3b67dc1c..2940d393ecfd 100644
>> --- a/drivers/gpu/drm/i915/intel_drv.h
>> +++ b/drivers/gpu/drm/i915/intel_drv.h
>> @@ -1499,6 +1499,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
>> bool intel_dp_compute_config(struct intel_encoder *encoder,
>> struct intel_crtc_state *pipe_config,
>> struct drm_connector_state *conn_state);
>> +bool intel_dp_is_edp(struct intel_dp *intel_dp);
>> bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
>> enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
>> bool long_hpd);
>> --
>> 2.11.0
>>
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-08-21 8:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-18 9:30 [PATCH 1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Jani Nikula
2017-08-18 9:30 ` [PATCH 2/2] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp Jani Nikula
2017-08-18 16:39 ` Jim Bride
2017-08-18 19:15 ` Manasi Navare
2017-08-21 8:50 ` Jani Nikula
2017-08-18 12:05 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Patchwork
2017-08-18 16:37 ` [PATCH 1/2] " Jim Bride
2017-08-18 19:13 ` Manasi Navare
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).