From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 04/09] drm/i915: Add "port" field to struct intel_dp
Date: Thu, 12 Jul 2012 17:04:49 +0200 [thread overview]
Message-ID: <20120712150449.GJ5039@phenom.ffwll.local> (raw)
In-Reply-To: <1340996621-14345-4-git-send-email-przanoni@gmail.com>
On Fri, Jun 29, 2012 at 04:03:36PM -0300, Paulo Zanoni wrote:
> From: Shobhit Kumar <shobhit.kumar@intel.com>
>
> Useful for Haswell, it has a lot of DP registers that have one
> instance per port.
>
> Changes from Paulo:
> - Completely change the commit message
> - Rename "ddi_port" to "port"
>
> Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 10 +++++++---
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> I believe "port" is better than "ddi_port" since the "port" variable can be
> used in the previous gens too...
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index be5c47e..a5aee26 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2477,12 +2477,16 @@ intel_dp_init(struct drm_device *dev, int output_reg)
>
> connector->polled = DRM_CONNECTOR_POLL_HPD;
>
> - if (output_reg == DP_B || output_reg == PCH_DP_B)
> + if (output_reg == DP_B || output_reg == PCH_DP_B) {
> intel_encoder->clone_mask = (1 << INTEL_DP_B_CLONE_BIT);
> - else if (output_reg == DP_C || output_reg == PCH_DP_C)
> + intel_dp->port = PORT_B;
> + } else if (output_reg == DP_C || output_reg == PCH_DP_C) {
> intel_encoder->clone_mask = (1 << INTEL_DP_C_CLONE_BIT);
> - else if (output_reg == DP_D || output_reg == PCH_DP_D)
> + intel_dp->port = PORT_C;
> + } else if (output_reg == DP_D || output_reg == PCH_DP_D) {
> intel_encoder->clone_mask = (1 << INTEL_DP_D_CLONE_BIT);
> + intel_dp->port = PORT_D;
> + }
Imo we should pass in the port id into intel_dp_init, like I've done for
intel_hdmi.c. That way we0d avoid this rather ugly loop. Also, this patch
will conflict a bit with the cloning simplification from my modeset rework
branch (patch 19). Can I volunteer you to review patches 19+20 from that
series first, and then rebase this on top of these other patches?
-Daniel
>
> if (is_edp(intel_dp)) {
> intel_encoder->clone_mask = (1 << INTEL_EDP_CLONE_BIT);
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 48a0fcb..1145403 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -316,6 +316,7 @@ struct intel_dp {
> uint8_t link_configuration[DP_LINK_CONFIGURATION_SIZE];
> bool has_audio;
> enum hdmi_force_audio force_audio;
> + int port;
> uint32_t color_range;
> int dpms_mode;
> uint8_t link_bw;
> --
> 1.7.10.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-07-12 15:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 19:03 [PATCH 01/09] drm/i915: move common code to intel_dp_set_link_train Paulo Zanoni
2012-06-29 19:03 ` [PATCH 02/09] drm/i915: try to train DP even harder Paulo Zanoni
2012-07-12 14:58 ` Daniel Vetter
2012-06-29 19:03 ` [PATCH 03/09] drm/i915: Move DP structs to shared location Paulo Zanoni
2012-07-12 15:13 ` Daniel Vetter
2012-06-29 19:03 ` [PATCH 04/09] drm/i915: Add "port" field to struct intel_dp Paulo Zanoni
2012-07-12 15:04 ` Daniel Vetter [this message]
2012-06-29 19:03 ` [PATCH 05/09] drm/i915: add basic Haswell DP enablement Paulo Zanoni
2012-06-29 19:03 ` [PATCH 06/09] drm/i915: fix Haswell M/N registers Paulo Zanoni
2012-06-29 19:03 ` [PATCH 07/09] drm/i915: implement Haswell DP link train Paulo Zanoni
2012-06-29 19:03 ` [PATCH 08/09] drm/i915: fix DP AUX register definitions on Haswell Paulo Zanoni
2012-06-29 19:03 ` [PATCH 09/09] drm/i915: init DP instead of HDMI on port B Paulo Zanoni
2012-07-12 14:52 ` [PATCH 01/09] drm/i915: move common code to intel_dp_set_link_train Daniel Vetter
2012-07-17 19:55 ` [PATCH 1/2] " Paulo Zanoni
2012-07-17 20:53 ` [PATCH 2/2] drm/i915: add port field to struct intel_dp and use it Paulo Zanoni
2012-07-18 10:42 ` Daniel Vetter
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=20120712150449.GJ5039@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=przanoni@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox