intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Shankar, Uma" <uma.shankar@intel.com>
To: "Navare, Manasi D" <manasi.d.navare@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [CI v3 1/3] drm/i915: Introduce encoder->compute_config_late()
Date: Thu, 20 Feb 2020 09:36:05 +0000	[thread overview]
Message-ID: <E7C9878FBA1C6D42A1CA3F62AEB6945F823EB48C@BGSMSX104.gar.corp.intel.com> (raw)
In-Reply-To: <20200214114126.13192-1-manasi.d.navare@intel.com>



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Manasi
> Navare
> Sent: Friday, February 14, 2020 5:11 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [CI v3 1/3] drm/i915: Introduce encoder->compute_config_late()
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add an optional secondary encoder state compute hook. This gets called after the
> normak .compute_config() has been called for all the encoders in the state. Thus in
> the new hook we can rely on all derived state populated by .compute_config() to be
> already set up. Should be useful for MST and port sync master/slave transcoder
> selection.

Pushed the series to dinq. Thanks for the patches and review.

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c  | 39 +++++++++++++++++++
>  .../drm/i915/display/intel_display_types.h    |  3 ++
>  2 files changed, 42 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index e09d3c93c52b..ce72551ba16a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -13549,6 +13549,35 @@ intel_modeset_pipe_config(struct intel_crtc_state
> *pipe_config)
>  	return 0;
>  }
> 
> +static int
> +intel_modeset_pipe_config_late(struct intel_crtc_state *crtc_state) {
> +	struct intel_atomic_state *state =
> +		to_intel_atomic_state(crtc_state->uapi.state);
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +	struct drm_connector_state *conn_state;
> +	struct drm_connector *connector;
> +	int i;
> +
> +	for_each_new_connector_in_state(&state->base, connector,
> +					conn_state, i) {
> +		struct intel_encoder *encoder =
> +			to_intel_encoder(conn_state->best_encoder);
> +		int ret;
> +
> +		if (conn_state->crtc != &crtc->base ||
> +		    !encoder->compute_config_late)
> +			continue;
> +
> +		ret = encoder->compute_config_late(encoder, crtc_state,
> +						   conn_state);
> +		if (ret)
> +			return ret;
> +	}
> +
> +	return 0;
> +}
> +
>  bool intel_fuzzy_clock_check(int clock1, int clock2)  {
>  	int diff;
> @@ -14954,6 +14983,16 @@ static int intel_atomic_check(struct drm_device *dev,
>  		ret = intel_modeset_pipe_config(new_crtc_state);
>  		if (ret)
>  			goto fail;
> +	}
> +
> +	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
> +					    new_crtc_state, i) {
> +		if (!needs_modeset(new_crtc_state))
> +			continue;
> +
> +		ret = intel_modeset_pipe_config_late(new_crtc_state);
> +		if (ret)
> +			goto fail;
> 
>  		intel_crtc_check_fastset(old_crtc_state, new_crtc_state);
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 283c622f8ba1..0d8a64305464 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -141,6 +141,9 @@ struct intel_encoder {
>  	int (*compute_config)(struct intel_encoder *,
>  			      struct intel_crtc_state *,
>  			      struct drm_connector_state *);
> +	int (*compute_config_late)(struct intel_encoder *,
> +				   struct intel_crtc_state *,
> +				   struct drm_connector_state *);
>  	void (*update_prepare)(struct intel_atomic_state *,
>  			       struct intel_encoder *,
>  			       struct intel_crtc *);
> --
> 2.19.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2020-02-20  9:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 11:41 [Intel-gfx] [CI v3 1/3] drm/i915: Introduce encoder->compute_config_late() Manasi Navare
2020-02-14 11:41 ` [Intel-gfx] [CI v3 2/3] drm/i915/dp: Compute port sync crtc states post compute_config() Manasi Navare
2020-02-14 11:41 ` [Intel-gfx] [CI v3 3/3] drm/i915/dp: Add all tiled and port sync conns to modeset Manasi Navare
2020-02-20  9:43   ` Shankar, Uma
2020-02-14 14:48 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,v3,1/3] drm/i915: Introduce encoder->compute_config_late() Patchwork
2020-02-14 15:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-02-17 20:05 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-02-20  9:36 ` Shankar, Uma [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=E7C9878FBA1C6D42A1CA3F62AEB6945F823EB48C@BGSMSX104.gar.corp.intel.com \
    --to=uma.shankar@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=manasi.d.navare@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;
as well as URLs for NNTP newsgroup(s).