intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: imre.deak@intel.com, intel-gfx@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org, ville.syrjala@linux.intel.com
Subject: Re: [PATCH 7/8] drm/i915/mst: change naming from fake encoders to MST stream encoders
Date: Mon, 11 Nov 2024 19:42:10 +0200	[thread overview]
Message-ID: <87ikstd5vx.fsf@intel.com> (raw)
In-Reply-To: <ZzI8EItLYhfFjgzf@ideak-desk.fi.intel.com>

On Mon, 11 Nov 2024, Imre Deak <imre.deak@intel.com> wrote:
> On Mon, Nov 11, 2024 at 06:58:32PM +0200, Imre Deak wrote:
>> On Thu, Nov 07, 2024 at 10:32:20PM +0200, Jani Nikula wrote:
>> > The fake encoders pretty much match individual MST streams. The encoders
>> > remain as fake as ever, but change the naming to MST stream
>> > encoders. Rename all the encoder hooks and related functions called from
>> > them to mst_stream_* to clarify what type of encoders the hooks are
>> > called on.
>> > 
>> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> 
>> Reviewed-by: Imre Deak <imre.deak@intel.com>
>> 
>> > ---
>> >  drivers/gpu/drm/i915/display/intel_dp_mst.c | 204 ++++++++++----------
>> >  1 file changed, 100 insertions(+), 104 deletions(-)
>> > 
>> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
>> > index 481510819cc6..0c08212e70ac 100644
>> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
>> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
>> > @@ -53,7 +53,7 @@
>> >  #include "intel_vdsc.h"
>> >  #include "skl_scaler.h"
>> >  
>> > -/* From fake MST encoder to primary encoder */
>> > +/* From fake MST stream encoder to primary encoder */
>> >  static struct intel_encoder *to_primary_encoder(struct intel_encoder *encoder)
>> >  {
>> >  	struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder);
>> > @@ -62,7 +62,7 @@ static struct intel_encoder *to_primary_encoder(struct intel_encoder *encoder)
>> >  	return &dig_port->base;
>> >  }
>> >  
>> > -/* From fake MST encoder to primary DP */
>> > +/* From fake MST stream encoder to primary DP */
>> >  static struct intel_dp *to_primary_dp(struct intel_encoder *encoder)
>> >  {
>> >  	struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder);
>> > @@ -179,14 +179,12 @@ static int intel_dp_mst_dsc_get_slice_count(const struct intel_connector *connec
>> >  					    num_joined_pipes);
>> >  }
>> >  
>> > -static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
>> > -						struct intel_crtc_state *crtc_state,
>> > -						int max_bpp,
>> > -						int min_bpp,
>> > -						struct link_config_limits *limits,
>> > -						struct drm_connector_state *conn_state,
>> > -						int step,
>> > -						bool dsc)
>> > +static int mst_stream_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
>> > +					      struct intel_crtc_state *crtc_state,
>> > +					      int max_bpp, int min_bpp,
>> > +					      struct link_config_limits *limits,
>> > +					      struct drm_connector_state *conn_state,
>> > +					      int step, bool dsc)
>> >  {
>> >  	struct intel_display *display = to_intel_display(encoder);
>> >  	struct drm_atomic_state *state = crtc_state->uapi.state;
>> > @@ -333,10 +331,10 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
>> >  	return slots;
>> >  }
>> >  
>> > -static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
>> > -					    struct intel_crtc_state *crtc_state,
>> > -					    struct drm_connector_state *conn_state,
>> > -					    struct link_config_limits *limits)
>> > +static int mst_stream_compute_link_config(struct intel_encoder *encoder,
>> > +					  struct intel_crtc_state *crtc_state,
>> > +					  struct drm_connector_state *conn_state,
>> > +					  struct link_config_limits *limits)
>> >  {
>> >  	int slots = -EINVAL;
>> >  
>> > @@ -344,11 +342,11 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
>> >  	 * FIXME: allocate the BW according to link_bpp, which in the case of
>> >  	 * YUV420 is only half of the pipe bpp value.
>> >  	 */
>> > -	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,
>> > -						     fxp_q4_to_int(limits->link.max_bpp_x16),
>> > -						     fxp_q4_to_int(limits->link.min_bpp_x16),
>> > -						     limits,
>> > -						     conn_state, 2 * 3, false);
>> > +	slots = mst_stream_find_vcpi_slots_for_bpp(encoder, crtc_state,
>> > +						   fxp_q4_to_int(limits->link.max_bpp_x16),
>> > +						   fxp_q4_to_int(limits->link.min_bpp_x16),
>> > +						   limits,
>> > +						   conn_state, 2 * 3, false);
>> >  
>> >  	if (slots < 0)
>> >  		return slots;
>> > @@ -356,10 +354,10 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
>> >  	return 0;
>> >  }
>> >  
>> > -static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
>> > -						struct intel_crtc_state *crtc_state,
>> > -						struct drm_connector_state *conn_state,
>> > -						struct link_config_limits *limits)
>> > +static int mst_stream_dsc_compute_link_config(struct intel_encoder *encoder,
>> > +					      struct intel_crtc_state *crtc_state,
>> > +					      struct drm_connector_state *conn_state,
>> > +					      struct link_config_limits *limits)
>> >  {
>> >  	struct intel_display *display = to_intel_display(encoder);
>> >  	struct intel_connector *connector = to_intel_connector(conn_state->connector);
>> > @@ -426,18 +424,19 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
>> >  	min_compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_compressed_bpp,
>> >  							    crtc_state->pipe_bpp);
>> >  
>> > -	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_compressed_bpp,
>> > -						     min_compressed_bpp, limits,
>> > -						     conn_state, 1, true);
>> > +	slots = mst_stream_find_vcpi_slots_for_bpp(encoder, crtc_state, max_compressed_bpp,
>> > +						   min_compressed_bpp, limits,
>> > +						   conn_state, 1, true);
>> >  
>> >  	if (slots < 0)
>> >  		return slots;
>> >  
>> >  	return 0;
>> >  }
>> > -static int intel_dp_mst_update_slots(struct intel_encoder *encoder,
>> > -				     struct intel_crtc_state *crtc_state,
>> > -				     struct drm_connector_state *conn_state)
>> > +
>> > +static int mst_stream_update_slots(struct intel_encoder *encoder,
>> > +				   struct intel_crtc_state *crtc_state,
>> > +				   struct drm_connector_state *conn_state)
>
> Side note: an additional thing that could be done is to pass intel_dp
> instead of intel_encoder to all the above functions, since it's clear
> what the former is (no separate stream vs. primary instances) and
> intel_encoder is used anyway only to get to intel_dp.

Right. Maybe I'll send a follow-up once these have been merged.

BR,
Jani.


-- 
Jani Nikula, Intel

  reply	other threads:[~2024-11-11 17:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 20:32 [PATCH 0/8] drm/i915/mst: cleanups, renames, clarifications Jani Nikula
2024-11-07 20:32 ` [PATCH 1/8] drm/i915/mst: pass primary encoder to primary encoder hooks Jani Nikula
2024-11-11 15:38   ` Imre Deak
2024-11-07 20:32 ` [PATCH 2/8] drm/i915/mst: rename intel_encoder to encoder Jani Nikula
2024-11-11 15:41   ` Imre Deak
2024-11-07 20:32 ` [PATCH 3/8] drm/i915/mst: introduce to_primary_encoder() and to_primary_dp() Jani Nikula
2024-11-11 16:01   ` Imre Deak
2024-11-07 20:32 ` [PATCH 4/8] drm/i915/mst: use primary_encoder in fake mst encoder creation Jani Nikula
2024-11-11 16:04   ` Imre Deak
2024-11-07 20:32 ` [PATCH 5/8] drm/i915/display: make CHICKEN_TRANS() display version aware Jani Nikula
2024-11-08  9:31   ` [PATCH v2] " Jani Nikula
2024-11-11 16:14     ` Imre Deak
2024-11-07 20:32 ` [PATCH 6/8] drm/i915/mst: convert to struct intel_display Jani Nikula
2024-11-11 16:22   ` Imre Deak
2024-11-07 20:32 ` [PATCH 7/8] drm/i915/mst: change naming from fake encoders to MST stream encoders Jani Nikula
2024-11-11 16:58   ` Imre Deak
2024-11-11 17:17     ` Imre Deak
2024-11-11 17:42       ` Jani Nikula [this message]
2024-11-07 20:32 ` [PATCH 8/8] drm/i915/dp: add comments about hooks called from " Jani Nikula
2024-11-07 20:46   ` Jani Nikula
2024-11-11 16:43   ` Imre Deak
2024-11-07 20:39 ` ✓ CI.Patch_applied: success for drm/i915/mst: cleanups, renames, clarifications Patchwork
2024-11-07 20:39 ` ✗ CI.checkpatch: warning " Patchwork
2024-11-07 20:40 ` ✓ CI.KUnit: success " Patchwork
2024-11-07 20:52 ` ✓ CI.Build: " Patchwork
2024-11-07 20:54 ` ✓ CI.Hooks: " Patchwork
2024-11-07 20:56 ` ✗ CI.checksparse: warning " Patchwork
2024-11-07 21:20 ` ✓ CI.BAT: success " Patchwork
2024-11-08  9:51 ` ✓ CI.Patch_applied: success for drm/i915/mst: cleanups, renames, clarifications (rev2) Patchwork
2024-11-08  9:52 ` ✗ CI.checkpatch: warning " Patchwork
2024-11-08  9:53 ` ✓ CI.KUnit: success " Patchwork
2024-11-08 10:04 ` ✓ CI.Build: " Patchwork
2024-11-08 10:07 ` ✓ CI.Hooks: " Patchwork
2024-11-08 10:08 ` ✗ CI.checksparse: warning " Patchwork
2024-11-08 10:32 ` ✓ CI.BAT: success " Patchwork
2024-11-09  3:47 ` ✗ CI.FULL: failure for drm/i915/mst: cleanups, renames, clarifications Patchwork
2024-11-09 14:29 ` ✗ CI.FULL: failure for drm/i915/mst: cleanups, renames, clarifications (rev2) 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=87ikstd5vx.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@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;
as well as URLs for NNTP newsgroup(s).