[PATCH 50/81] drm/i915: Use intel_best_encoder() directly

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Wed Dec 12 08:16:17 PST 2012


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

All connectors use intel_best_encoder() as their best_encoder() func, so
just call it directly w/o the indirection.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_atomic.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index 6dd07fb..e58ec3f 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -152,8 +152,6 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i
 	int i;
 
 	for (i = 0; i < count_ids; i++) {
-		struct drm_encoder *encoder;
-		const struct drm_connector_helper_funcs *connector_funcs;
 		struct drm_mode_object *obj;
 		int j;
 
@@ -169,9 +167,8 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i
 		}
 
 		connector = obj_to_connector(obj);
-		connector_funcs = connector->helper_private;
 
-		encoder = connector_funcs->best_encoder(connector);
+		encoder = intel_best_encoder(connector);
 
 		if (!drm_encoder_crtc_ok(encoder, crtc))
 			return -EINVAL;
@@ -180,9 +177,6 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i
 	}
 
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-		const struct drm_connector_helper_funcs *connector_funcs =
-			connector->helper_private;
-
 		for (i = 0; i < count_ids; i++) {
 			if (connector == connectors[i])
 				break;
@@ -196,7 +190,7 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i
 			continue;
 		}
 
-		encoder = connector_funcs->best_encoder(connector);
+		encoder = intel_best_encoder(connector);
 
 		connector->encoder = encoder;
 		encoder->crtc = crtc;
-- 
1.7.8.6



More information about the dri-devel mailing list