Re: [PATCH 1/8] drm/i915: refactor ddi translations into a separate file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 21 Jan 2021, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> wrote:
> On Thu, 21 Jan 2021, Dave Airlie <airlied@xxxxxxxxx> wrote:
>> From: Dave Airlie <airlied@xxxxxxxxxx>
>>
>> Ville suggested this, these tables are probably better being
>> standalone.
>>
>> This fixes up the cnl/bxt interfaces to be like the others,
>> the intel one I left alone since it has a few extra entrypoints.
>>
>> Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>> Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
>> ---
>>  drivers/gpu/drm/i915/Makefile                 |    1 +
>>  drivers/gpu/drm/i915/display/intel_ddi.c      | 1417 +----------------
>>  .../drm/i915/display/intel_ddi_buf_trans.c    | 1358 ++++++++++++++++
>>  .../drm/i915/display/intel_ddi_buf_trans.h    |  100 ++
>>  4 files changed, 1471 insertions(+), 1405 deletions(-)
>>  create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
>>  create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h
>
> Sorry, but the rebase fails to take into account at least the Rocket
> Lake changes in tgl_get_combo_buf_trans_dp().

Aww crap, this was the case alreayd in *my* rebase of the
same. *facepalm*.

A day of brown paper bags for me.

BR,
Jani.


>
> Also, there were a number of sparse warnings for missing static:
>
> +drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:714:28: warning: symbol 'bdw_get_buf_trans_edp' was not declared. Should it be static?
> +drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:728:28: warning: symbol 'skl_get_buf_trans_dp' was not declared. Should it be static?
> +drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:745:28: warning: symbol 'kbl_get_buf_trans_dp' was not declared. Should it be static?
> +drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:766:28: warning: symbol 'skl_get_buf_trans_edp' was not declared. Should it be static?
> +drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:798:28: warning: symbol 'skl_get_buf_trans_hdmi' was not declared. Should it be static?
> +drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:813:5: warning: symbol 'skl_buf_trans_num_entries' was not declared. Should it be static?
>
> BR,
> Jani.
>
>
>> -static const struct cnl_ddi_buf_trans *
>> -tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
>> -			   const struct intel_crtc_state *crtc_state,
>> -			   int *n_entries)
>> -{
>> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>> -
>> -	if (crtc_state->port_clock > 270000) {
>> -		if (IS_ROCKETLAKE(dev_priv)) {
>> -			*n_entries = ARRAY_SIZE(rkl_combo_phy_ddi_translations_dp_hbr2_hbr3);
>> -			return rkl_combo_phy_ddi_translations_dp_hbr2_hbr3;
>> -		} else if (IS_TGL_U(dev_priv) || IS_TGL_Y(dev_priv)) {
>> -			*n_entries = ARRAY_SIZE(tgl_uy_combo_phy_ddi_translations_dp_hbr2);
>> -			return tgl_uy_combo_phy_ddi_translations_dp_hbr2;
>> -		} else {
>> -			*n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr2);
>> -			return tgl_combo_phy_ddi_translations_dp_hbr2;
>> -		}
>> -	} else {
>> -		if (IS_ROCKETLAKE(dev_priv)) {
>> -			*n_entries = ARRAY_SIZE(rkl_combo_phy_ddi_translations_dp_hbr);
>> -			return rkl_combo_phy_ddi_translations_dp_hbr;
>> -		} else {
>> -			*n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr);
>> -			return tgl_combo_phy_ddi_translations_dp_hbr;
>> -		}
>> -	}
>> -}
>
>
>> +static const struct cnl_ddi_buf_trans *
>> +tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
>> +			   const struct intel_crtc_state *crtc_state,
>> +			   int *n_entries)
>> +{
>> +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>> +
>> +	if (crtc_state->port_clock > 270000) {
>> +		if (IS_TGL_U(dev_priv) || IS_TGL_Y(dev_priv)) {
>> +			*n_entries = ARRAY_SIZE(tgl_uy_combo_phy_ddi_translations_dp_hbr2);
>> +			return tgl_uy_combo_phy_ddi_translations_dp_hbr2;
>> +		} else {
>> +			*n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr2);
>> +			return tgl_combo_phy_ddi_translations_dp_hbr2;
>> +		}
>> +	} else {
>> +		*n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr);
>> +		return tgl_combo_phy_ddi_translations_dp_hbr;
>> +	}
>> +}

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux