From: "Sharma, Shashank" <shashank.sharma@intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/7] drm/i915: Allow DP ports to set/readout infoframe state (WIP)
Date: Mon, 13 Jun 2016 18:58:19 +0530 [thread overview]
Message-ID: <575EB4F3.6090706@intel.com> (raw)
In-Reply-To: <1464897332-25503-8-git-send-email-ville.syrjala@linux.intel.com>
Regards
Shashank
On 6/3/2016 1:25 AM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The video DIP can be used with DP ports as well. So let's at least read
> out the state, and disable all infoframes when disabling the port.
> Otherwise we might get left with whatever the previous guy was doing.
>
> If we were totally paranaoid, I suppose we might consider doing this
> for FDI too on DDI platforms. But that would require first decoupling
> the infoframe code from intel_digital_port. So leave it be for now at
> least.
>
> FIXME need to figure out how to handle the PSR VSC SDP usage before
> doing this, as that might make the state checker unhappy.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_ddi.c | 13 ++++++++-----
> drivers/gpu/drm/i915/intel_dp.c | 9 +++++++++
> 2 files changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index c5611e9d9b9c..6543feeb58f2 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -2157,7 +2157,6 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
> struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
> struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
> enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
> - struct intel_digital_port *intel_dig_port;
> u32 temp, flags = 0;
>
> /* XXX: DSI transcoder paranoia */
> @@ -2193,13 +2192,17 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
> break;
> }
>
> - switch (temp & TRANS_DDI_MODE_SELECT_MASK) {
> - case TRANS_DDI_MODE_SELECT_HDMI:
> - pipe_config->has_hdmi_sink = true;
> - intel_dig_port = enc_to_dig_port(&encoder->base);
> + if (encoder->type != INTEL_OUTPUT_ANALOG) {
This will be true for INTEL_OUTPUT_UNUSED, UNKNOWN, eDP, and bunch of
more encoder types. Should we add a bit mask for valid encoder types here ?
> + struct intel_digital_port *intel_dig_port =
> + enc_to_dig_port(&encoder->base);
>
> if (intel_dig_port->infoframe_enabled(&encoder->base, pipe_config))
> pipe_config->has_infoframe = true;
> + }
> +
> + switch (temp & TRANS_DDI_MODE_SELECT_MASK) {
> + case TRANS_DDI_MODE_SELECT_HDMI:
> + pipe_config->has_hdmi_sink = true;
> /* fall through */
> case TRANS_DDI_MODE_SELECT_DVI:
> pipe_config->lane_count = 4;
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index a2d0ee363307..b43009ed1dab 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2355,6 +2355,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config)
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
> + struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> u32 tmp, flags = 0;
> struct drm_device *dev = encoder->base.dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> @@ -2395,6 +2396,10 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
> !IS_CHERRYVIEW(dev) && tmp & DP_COLOR_RANGE_16_235)
> pipe_config->limited_color_range = true;
>
> + if (intel_dig_port->infoframe_enabled &&
> + intel_dig_port->infoframe_enabled(&encoder->base, pipe_config))
> + pipe_config->has_infoframe = true;
> +
> pipe_config->has_dp_encoder = true;
>
> pipe_config->lane_count =
> @@ -3343,6 +3348,10 @@ intel_dp_link_down(struct intel_dp *intel_dp)
> intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, true);
> }
>
> + if (intel_dig_port->set_infoframes)
> + intel_dig_port->set_infoframes(&intel_dig_port->base.base,
> + NULL, false);
> +
> msleep(intel_dp->panel_power_down_delay);
>
> intel_dp->DP = DP;
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-06-13 13:28 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 19:55 [PATCH 0/7] drm/i915: Make infoframe code available to (e)DP ports ville.syrjala
2016-06-02 19:55 ` [PATCH 1/7] drm/dp: Add defines for DP SDP types ville.syrjala
2016-06-02 19:55 ` [PATCH 2/7] drm/i915: Check has_infoframes when enabling infoframes ville.syrjala
2016-06-13 8:10 ` Sharma, Shashank
2016-06-13 12:24 ` Ville Syrjälä
2016-06-13 12:47 ` Sharma, Shashank
2016-06-02 19:55 ` [PATCH 3/7] drm/i915: Disable infoframes when shutting down DDI HDMI ville.syrjala
2016-06-13 10:06 ` Sharma, Shashank
2016-06-13 12:24 ` Ville Syrjälä
2016-06-13 12:48 ` Sharma, Shashank
2016-06-02 19:55 ` [PATCH 4/7] drm/i915: Move infoframe vfuncs into intel_digital_port ville.syrjala
2016-06-13 10:17 ` Sharma, Shashank
2016-06-13 12:25 ` Ville Syrjälä
2016-06-13 12:54 ` Sharma, Shashank
2016-06-02 19:55 ` [PATCH 5/7] drm/i915: Init infoframe vfuncs for DP encoders as well ville.syrjala
2016-06-13 11:44 ` Sharma, Shashank
2016-06-02 19:55 ` [PATCH 6/7] drm/i915: Remove mostly duplicated video DIP handling from PSR code ville.syrjala
2016-06-13 12:09 ` Sharma, Shashank
2016-06-13 12:27 ` Ville Syrjälä
2016-06-13 13:14 ` Sharma, Shashank
2016-06-02 19:55 ` [PATCH 7/7] drm/i915: Allow DP ports to set/readout infoframe state (WIP) ville.syrjala
2016-06-13 13:28 ` Sharma, Shashank [this message]
2016-06-14 14:16 ` Ville Syrjälä
2016-06-14 14:40 ` Sharma, Shashank
2016-06-15 9:37 ` Ville Syrjälä
2016-06-03 7:51 ` ✗ Ro.CI.BAT: warning for drm/i915: Make infoframe code available to (e)DP ports 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=575EB4F3.6090706@intel.com \
--to=shashank.sharma@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox