[Intel-gfx] [PATCH v2 11/22] drm/i915/bios: Split parse_driver_features() into two parts

Jani Nikula jani.nikula at linux.intel.com
Thu Apr 7 17:13:06 UTC 2022


On Tue, 05 Apr 2022, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> We use the "driver features" block for two different kinds
> of data: global data, and per panel data. Split the function
> into two parts along that line so that we can start doing the
> parsing in two different locations.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>


> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 502d4c679198..1a7f1aa79827 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1097,6 +1097,16 @@ parse_driver_features(struct drm_i915_private *i915)
>  		    driver->lvds_config != BDB_DRIVER_FEATURE_INT_SDVO_LVDS)
>  			i915->vbt.int_lvds_support = 0;
>  	}
> +}
> +
> +static void
> +parse_panel_driver_features(struct drm_i915_private *i915)
> +{
> +	const struct bdb_driver_features *driver;
> +
> +	driver = find_section(i915, BDB_DRIVER_FEATURES);
> +	if (!driver)
> +		return;
>  
>  	if (i915->vbt.version < 228) {
>  		drm_dbg_kms(&i915->drm, "DRRS State Enabled:%d\n",
> @@ -2883,6 +2893,7 @@ void intel_bios_init(struct drm_i915_private *i915)
>  	parse_lfp_backlight(i915);
>  	parse_sdvo_panel_data(i915);
>  	parse_driver_features(i915);
> +	parse_panel_driver_features(i915);
>  	parse_power_conservation_features(i915);
>  	parse_edp(i915);
>  	parse_psr(i915);

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list