public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, Ivan Vlk <ari@adyline.sk>
Subject: Re: [PATCH 1/5] drm/i915: Add broadcast RGB property for DP MST
Date: Tue, 26 Mar 2019 15:12:51 +0200	[thread overview]
Message-ID: <20190326131251.GU3888@intel.com> (raw)
In-Reply-To: <87pnqd534v.fsf@intel.com>

On Tue, Mar 26, 2019 at 12:41:36PM +0200, Jani Nikula wrote:
> On Fri, 08 Mar 2019, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Add the "Broadcast RGB" property to MST connectors, and implement
> > the same logic for it as we have in the SST code.
> 
> Should we mention the added *other* atomic checks here?

We don't have the corresponding properties attached to the connector so
all the rest should be nops.

> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> 
> 
> >
> > Cc: Ivan Vlk <ari@adyline.sk>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108821
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_dp_mst.c | 29 +++++++++++++++++++++++++++--
> >  1 file changed, 27 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> > index fb67cd931117..2b791d67a43f 100644
> > --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> > +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> > @@ -38,6 +38,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
> >  	struct intel_digital_port *intel_dig_port = intel_mst->primary;
> >  	struct intel_dp *intel_dp = &intel_dig_port->dp;
> >  	struct drm_connector *connector = conn_state->connector;
> > +	struct intel_digital_connector_state *intel_conn_state =
> > +		to_intel_digital_connector_state(conn_state);
> >  	void *port = to_intel_connector(connector)->port;
> >  	struct drm_atomic_state *state = pipe_config->base.state;
> >  	struct drm_crtc *crtc = pipe_config->base.crtc;
> > @@ -77,6 +79,21 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
> >  	if (drm_dp_mst_port_has_audio(&intel_dp->mst_mgr, port))
> >  		pipe_config->has_audio = true;
> >  
> > +	if (intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_AUTO) {
> > +		/*
> > +		 * See:
> > +		 * CEA-861-E - 5.1 Default Encoding Parameters
> > +		 * VESA DisplayPort Ver.1.2a - 5.1.1.1 Video Colorimetry
> > +		 */
> > +		pipe_config->limited_color_range =
> > +			pipe_config->pipe_bpp != 18 &&
> > +			drm_default_rgb_quant_range(adjusted_mode) ==
> > +			HDMI_QUANTIZATION_RANGE_LIMITED;
> > +	} else {
> > +		pipe_config->limited_color_range =
> > +			intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_LIMITED;
> > +	}
> > +
> >  	mst_pbn = drm_dp_calc_pbn_mode(adjusted_mode->crtc_clock, bpp);
> >  	pipe_config->pbn = mst_pbn;
> >  
> > @@ -117,7 +134,11 @@ intel_dp_mst_atomic_check(struct drm_connector *connector,
> >  	struct drm_crtc *new_crtc = new_conn_state->crtc;
> >  	struct drm_crtc_state *crtc_state;
> >  	struct drm_dp_mst_topology_mgr *mgr;
> > -	int ret = 0;
> > +	int ret;
> > +
> > +	ret = intel_digital_connector_atomic_check(connector, new_conn_state);
> > +	if (ret)
> > +		return ret;
> >  
> >  	if (!old_conn_state->crtc)
> >  		return 0;
> > @@ -354,11 +375,13 @@ intel_dp_mst_detect(struct drm_connector *connector, bool force)
> >  static const struct drm_connector_funcs intel_dp_mst_connector_funcs = {
> >  	.detect = intel_dp_mst_detect,
> >  	.fill_modes = drm_helper_probe_single_connector_modes,
> > +	.atomic_get_property = intel_digital_connector_atomic_get_property,
> > +	.atomic_set_property = intel_digital_connector_atomic_set_property,
> >  	.late_register = intel_connector_register,
> >  	.early_unregister = intel_connector_unregister,
> >  	.destroy = intel_connector_destroy,
> >  	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
> > -	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
> > +	.atomic_duplicate_state = intel_digital_connector_duplicate_state,
> >  };
> >  
> >  static int intel_dp_mst_get_modes(struct drm_connector *connector)
> > @@ -487,6 +510,8 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
> >  	if (ret)
> >  		goto err;
> >  
> > +	intel_attach_broadcast_rgb_property(connector);
> > +
> >  	return connector;
> >  
> >  err:
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2019-03-26 13:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 19:24 [PATCH 1/5] drm/i915: Add broadcast RGB property for DP MST Ville Syrjala
2019-03-08 19:24 ` [PATCH 2/5] drm/i915: Expose the force_audio property with " Ville Syrjala
2019-03-26 10:41   ` Jani Nikula
2019-03-08 19:24 ` [PATCH 3/5] drm/i915: Remove the 8bpc shackles from " Ville Syrjala
2019-03-26 10:43   ` Jani Nikula
2019-03-26 13:16     ` Ville Syrjälä
2019-03-08 19:24 ` [PATCH 4/5] drm/i915: Add max_bpc property for " Ville Syrjala
2019-03-26 10:43   ` Jani Nikula
2019-03-08 19:24 ` [PATCH 5/5] drm/i915: Update TRANS_MSA_MISC for fastsets Ville Syrjala
2019-03-26 10:43   ` Jani Nikula
2019-03-08 20:16 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: Add broadcast RGB property for DP MST Patchwork
2019-03-08 20:45 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-09  3:49 ` ✓ Fi.CI.IGT: " Patchwork
2019-03-14 13:07 ` [PATCH 1/5] " Ville Syrjälä
2019-03-26 10:41 ` Jani Nikula
2019-03-26 13:12   ` Ville Syrjälä [this message]

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=20190326131251.GU3888@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=ari@adyline.sk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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