mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
drm/i915: Extract intel_edp_add_properties()
Pull the drm_connector_set_panel_orientation_with_quirk() into intel_edp_add_properties() to match how the DSI encoders do it. Less clutter in intel_edp_init_connector() overall. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220323182935.4701-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
f01bae2dca
commit
e9ebf13595
|
|
@ -4954,6 +4954,22 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
|
|||
drm_connector_attach_vrr_capable_property(connector);
|
||||
}
|
||||
|
||||
static void
|
||||
intel_edp_add_properties(struct intel_dp *intel_dp,
|
||||
const struct drm_display_mode *fixed_mode)
|
||||
{
|
||||
struct intel_connector *connector = intel_dp->attached_connector;
|
||||
struct drm_i915_private *i915 = to_i915(connector->base.dev);
|
||||
|
||||
if (!fixed_mode)
|
||||
return;
|
||||
|
||||
drm_connector_set_panel_orientation_with_quirk(&connector->base,
|
||||
i915->vbt.orientation,
|
||||
fixed_mode->hdisplay,
|
||||
fixed_mode->vdisplay);
|
||||
}
|
||||
|
||||
static bool intel_edp_init_connector(struct intel_dp *intel_dp,
|
||||
struct intel_connector *intel_connector)
|
||||
{
|
||||
|
|
@ -5058,11 +5074,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
|
|||
intel_connector->panel.backlight.power = intel_pps_backlight_power;
|
||||
intel_backlight_setup(intel_connector, pipe);
|
||||
|
||||
if (fixed_mode) {
|
||||
drm_connector_set_panel_orientation_with_quirk(connector,
|
||||
dev_priv->vbt.orientation,
|
||||
fixed_mode->hdisplay, fixed_mode->vdisplay);
|
||||
}
|
||||
intel_edp_add_properties(intel_dp, fixed_mode);
|
||||
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user