From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 11/15] drm/i915: Convert intel_sdvo to use atomic state
Date: Thu, 18 Aug 2016 15:44:05 +0200 [thread overview]
Message-ID: <20160818134405.GM6232@phenom.ffwll.local> (raw)
In-Reply-To: <1470755054-32699-12-git-send-email-maarten.lankhorst@linux.intel.com>
On Tue, Aug 09, 2016 at 05:04:10PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_sdvo.c | 27 +++++++++++----------------
> 1 file changed, 11 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index 7c08d555f35d..74a7c6c9b974 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -1003,24 +1003,22 @@ static bool intel_sdvo_write_infoframe(struct intel_sdvo *intel_sdvo,
> }
>
> static bool intel_sdvo_set_avi_infoframe(struct intel_sdvo *intel_sdvo,
> - const struct drm_display_mode *adjusted_mode)
> + struct intel_crtc_state *pipe_config)
> {
> uint8_t sdvo_data[HDMI_INFOFRAME_SIZE(AVI)];
> - struct drm_crtc *crtc = intel_sdvo->base.base.crtc;
> - struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> union hdmi_infoframe frame;
> int ret;
> ssize_t len;
>
> ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
> - adjusted_mode);
> + &pipe_config->base.adjusted_mode);
> if (ret < 0) {
> DRM_ERROR("couldn't fill AVI infoframe\n");
> return false;
> }
>
> if (intel_sdvo->rgb_quant_range_selectable) {
> - if (intel_crtc->config->limited_color_range)
> + if (pipe_config->limited_color_range)
> frame.avi.quantization_range =
> HDMI_QUANTIZATION_RANGE_LIMITED;
> else
> @@ -1199,18 +1197,15 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
> {
> struct drm_device *dev = intel_encoder->base.dev;
> struct drm_i915_private *dev_priv = to_i915(dev);
> - struct intel_crtc *crtc = to_intel_crtc(intel_encoder->base.crtc);
> - const struct drm_display_mode *adjusted_mode = &crtc->config->base.adjusted_mode;
> - struct drm_display_mode *mode = &crtc->config->base.mode;
> + struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
> + const struct drm_display_mode *adjusted_mode = &crtc_state->base.adjusted_mode;
> + struct drm_display_mode *mode = &crtc_state->base.mode;
> struct intel_sdvo *intel_sdvo = to_sdvo(intel_encoder);
> u32 sdvox;
> struct intel_sdvo_in_out_map in_out;
> struct intel_sdvo_dtd input_dtd, output_dtd;
> int rate;
>
> - if (!mode)
> - return;
> -
> /* First, set the input mapping for the first input to our controlled
> * output. This is only correct if we're a single-input device, in
> * which case the first input is the output from the appropriate SDVO
> @@ -1243,11 +1238,11 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
> if (!intel_sdvo_set_target_input(intel_sdvo))
> return;
>
> - if (crtc->config->has_hdmi_sink) {
> + if (crtc_state->has_hdmi_sink) {
> intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_HDMI);
> intel_sdvo_set_colorimetry(intel_sdvo,
> SDVO_COLORIMETRY_RGB256);
> - intel_sdvo_set_avi_infoframe(intel_sdvo, adjusted_mode);
> + intel_sdvo_set_avi_infoframe(intel_sdvo, crtc_state);
> } else
> intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_DVI);
>
> @@ -1263,7 +1258,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
> DRM_INFO("Setting input timings on %s failed\n",
> SDVO_NAME(intel_sdvo));
>
> - switch (crtc->config->pixel_multiplier) {
> + switch (crtc_state->pixel_multiplier) {
> default:
> WARN(1, "unknown pixel multiplier specified\n");
> case 1: rate = SDVO_CLOCK_RATE_MULT_1X; break;
> @@ -1278,7 +1273,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
> /* The real mode polarity is set by the SDVO commands, using
> * struct intel_sdvo_dtd. */
> sdvox = SDVO_VSYNC_ACTIVE_HIGH | SDVO_HSYNC_ACTIVE_HIGH;
> - if (!HAS_PCH_SPLIT(dev) && crtc->config->limited_color_range)
> + if (!HAS_PCH_SPLIT(dev) && crtc_state->limited_color_range)
> sdvox |= HDMI_COLOR_RANGE_16_235;
> if (INTEL_INFO(dev)->gen < 5)
> sdvox |= SDVO_BORDER_ENABLE;
> @@ -1304,7 +1299,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
> } else if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) {
> /* done in crtc_mode_set as it lives inside the dpll register */
> } else {
> - sdvox |= (crtc->config->pixel_multiplier - 1)
> + sdvox |= (crtc_state->pixel_multiplier - 1)
> << SDVO_PORT_MULTIPLY_SHIFT;
> }
>
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-18 13:44 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 15:03 [PATCH 00/15] drm/i915: Use connector atomic state in encoders Maarten Lankhorst
2016-08-09 15:04 ` [PATCH 01/15] drm/i915: handle DP_MST correctly in bxt_get_dpll Maarten Lankhorst
2016-08-18 13:17 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 02/15] drm/i915: Pass atomic state to crtc enable/disable functions Maarten Lankhorst
2016-08-18 13:19 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 03/15] drm/i915: Remove unused mode_set hook from encoder Maarten Lankhorst
2016-08-18 13:20 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 04/15] drm/i915: Walk over encoders in crtc enable/disable using atomic state Maarten Lankhorst
2016-08-22 14:28 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 05/15] drm/i915: Pass crtc_state and connector_state to encoder functions Maarten Lankhorst
2016-08-18 13:30 ` Daniel Vetter
2016-08-22 8:06 ` Maarten Lankhorst
2016-08-22 14:32 ` Daniel Vetter
2016-08-23 8:18 ` Maarten Lankhorst
2016-08-23 8:33 ` Daniel Vetter
2016-08-23 11:48 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 06/15] drm/i915: Make encoder->compute_config take the connector state Maarten Lankhorst
2016-08-18 13:31 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 07/15] drm/i915: Remove unused loop from intel_dp_mst_compute_config Maarten Lankhorst
2016-08-18 13:34 ` Daniel Vetter
2016-08-22 12:43 ` Maarten Lankhorst
2016-08-22 14:33 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 08/15] drm/i915: Convert intel_crt to use atomic state Maarten Lankhorst
2016-08-18 13:35 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 09/15] drm/i915: Convert intel_dvo " Maarten Lankhorst
2016-08-18 13:36 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 10/15] drm/i915: Convert intel_dsi " Maarten Lankhorst
2016-08-18 13:43 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 11/15] drm/i915: Convert intel_sdvo " Maarten Lankhorst
2016-08-18 13:44 ` Daniel Vetter [this message]
2016-08-09 15:04 ` [PATCH 12/15] drm/i915: Convert intel_lvds " Maarten Lankhorst
2016-08-18 13:47 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 13/15] drm/i915: Convert intel_dp_mst " Maarten Lankhorst
2016-08-18 13:54 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 14/15] drm/i915: Convert intel_dp " Maarten Lankhorst
2016-08-18 14:01 ` Daniel Vetter
2016-08-09 15:04 ` [PATCH 15/15] drm/i915: Use more atomic state in intel_color.c Maarten Lankhorst
2016-08-18 14:02 ` Daniel Vetter
2016-08-09 15:55 ` ✗ Ro.CI.BAT: failure for drm/i915: Use connector atomic state in encoders Patchwork
2016-08-10 7:53 ` Patchwork
2016-08-18 14:04 ` [PATCH 00/15] " Daniel Vetter
2016-08-22 8:12 ` Maarten Lankhorst
-- strict thread matches above, loose matches on Subject: below --
2016-07-07 11:55 [PATCH 01/15] drm/i915: handle DP_MST correctly in bxt_get_dpll Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 11/15] drm/i915: Convert intel_sdvo to use atomic state Maarten Lankhorst
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=20160818134405.GM6232@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@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