[Intel-gfx] [PATCH 3/9] drm/i915: Extract intel_edp_add_properties()
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Mar 23 18:29:29 UTC 2022
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
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 at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index f54088db9862..4bf13dbafbee 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4961,6 +4961,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)
{
@@ -5065,11 +5081,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;
--
2.34.1
More information about the Intel-gfx
mailing list