From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 8/9] drm/i915/display: refer to vbt info as vbt_port_info
Date: Tue, 31 Dec 2019 12:39:03 +0200 [thread overview]
Message-ID: <87fth0lqyg.fsf@intel.com> (raw)
In-Reply-To: <20191223195850.25997-9-lucas.demarchi@intel.com>
On Mon, 23 Dec 2019, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> Now that we maintain our static port info, rename the places that refer
> to the port_info from vbt to use the vbt prefix. This is just a
> preparation step for a following change in which we will use the
> port_info variable name.
Side note, I intend to get rid of dev_priv->vbt.ddi_port_info[]
entirely.
For output initialization time, you'd have to call some function in
intel_bios.c to get the info you want. Maybe at that point you'd get an
opaque pointer to struct display_device_data which you could use to
query the child device data. You'd stick that pointer to intel_encoder
(or intel_connector), and subsequent queries would be based on that,
instead of figuring out the port and indexing something in dev_priv.
In the mean time, the rename for now seems fine.
BR,
Jani.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_ddi.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 1bdf63845472..a1b7075ea6be 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -902,7 +902,8 @@ icl_get_combo_buf_trans(struct drm_i915_private *dev_priv, int type, int rate,
>
> static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port port)
> {
> - struct ddi_vbt_port_info *port_info = &dev_priv->vbt.ddi_port_info[port];
> + struct ddi_vbt_port_info *vbt_port_info =
> + &dev_priv->vbt.ddi_port_info[port];
> int n_entries, level, default_entry;
> enum phy phy = intel_port_to_phy(dev_priv, port);
>
> @@ -943,8 +944,8 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por
> if (WARN_ON_ONCE(n_entries == 0))
> return 0;
>
> - if (port_info->hdmi_level_shift_set)
> - level = port_info->hdmi_level_shift;
> + if (vbt_port_info->hdmi_level_shift_set)
> + level = vbt_port_info->hdmi_level_shift;
> else
> level = default_entry;
>
> @@ -4783,15 +4784,15 @@ intel_ddi_max_lanes(struct intel_digital_port *dig_port)
>
> void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
> {
> - struct ddi_vbt_port_info *port_info =
> + struct ddi_vbt_port_info *vbt_port_info =
> &dev_priv->vbt.ddi_port_info[port];
> struct intel_digital_port *intel_dig_port;
> struct intel_encoder *encoder;
> bool init_hdmi, init_dp, init_lspcon = false;
> enum phy phy = intel_port_to_phy(dev_priv, port);
>
> - init_hdmi = port_info->supports_dvi || port_info->supports_hdmi;
> - init_dp = port_info->supports_dp;
> + init_hdmi = vbt_port_info->supports_dvi || vbt_port_info->supports_hdmi;
> + init_dp = vbt_port_info->supports_dp;
>
> if (intel_bios_is_lspcon_present(dev_priv, port)) {
> /*
> @@ -4852,8 +4853,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
> intel_dig_port->aux_ch = intel_bios_port_aux_ch(dev_priv, port);
>
> if (intel_phy_is_tc(dev_priv, phy)) {
> - bool is_legacy = !port_info->supports_typec_usb &&
> - !port_info->supports_tbt;
> + bool is_legacy = !vbt_port_info->supports_typec_usb &&
> + !vbt_port_info->supports_tbt;
>
> intel_tc_port_init(intel_dig_port, is_legacy);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-12-31 10:38 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 19:58 [Intel-gfx] [PATCH 0/9] RFC: display/ddi: keep register indexes in a table Lucas De Marchi
2019-12-23 19:58 ` [Intel-gfx] [PATCH 1/9] drm/i915/display: nuke skl workaround for pre-production hw Lucas De Marchi
2019-12-23 19:58 ` [Intel-gfx] [PATCH 2/9] drm/i915/display: remove alias to dig_port Lucas De Marchi
2019-12-23 21:05 ` Matt Roper
2019-12-23 19:58 ` [Intel-gfx] [PATCH 3/9] drm/i915/display: prefer the more common dig_port name Lucas De Marchi
2019-12-23 21:16 ` Matt Roper
2019-12-23 21:25 ` Lucas De Marchi
2019-12-23 19:58 ` [Intel-gfx] [PATCH 4/9] drm/i915/display: start description-based ddi initialization Lucas De Marchi
2019-12-31 9:58 ` Jani Nikula
2020-01-02 7:19 ` Lucas De Marchi
2020-06-22 23:50 ` Lucas De Marchi
2020-07-03 13:22 ` Jani Nikula
2019-12-23 19:58 ` [Intel-gfx] [PATCH 5/9] drm/i915/display: move icl to description-based ddi init Lucas De Marchi
2019-12-24 0:00 ` Matt Roper
2019-12-31 10:14 ` Jani Nikula
2020-01-02 7:32 ` Lucas De Marchi
2019-12-23 19:58 ` [Intel-gfx] [PATCH 6/9] drm/i915/display: description-based initialization for remaining ddi platforms Lucas De Marchi
2019-12-31 10:25 ` Jani Nikula
2019-12-31 10:26 ` Jani Nikula
2020-01-02 7:23 ` Lucas De Marchi
2019-12-23 19:58 ` [Intel-gfx] [PATCH 7/9] drm/i915/display: add phy, vbt and ddi indexes Lucas De Marchi
2019-12-24 0:10 ` Matt Roper
2019-12-24 0:17 ` Lucas De Marchi
2019-12-31 10:33 ` Jani Nikula
2020-01-02 7:50 ` Lucas De Marchi
2019-12-23 19:58 ` [Intel-gfx] [PATCH 8/9] drm/i915/display: refer to vbt info as vbt_port_info Lucas De Marchi
2019-12-31 10:39 ` Jani Nikula [this message]
2019-12-23 19:58 ` [Intel-gfx] [PATCH 9/9] drm/i915/display: use port_info on intel_ddi_init Lucas De Marchi
2019-12-24 0:16 ` Matt Roper
2019-12-31 11:20 ` Jani Nikula
2020-06-23 1:11 ` Lucas De Marchi
2019-12-31 11:22 ` Jani Nikula
2019-12-23 20:14 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for RFC: display/ddi: keep register indexes in a table Patchwork
2019-12-23 20:57 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=87fth0lqyg.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@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.