浏览代码

drm/i915: Make encoder->mode_set callbacks optional

For a bunch of reasons we want to move away from the ->mode_set
callbacks: All hw state setup needs to move into ->enable hooks (so
that DOMS can do runtime pm) and all the configuration setup needs to
move into the compute_config functions.

To start with this make the enocer->mode_set callback optional.

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter 11 年之前
父节点
当前提交
0d56bf0b65
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/gpu/drm/i915/intel_display.c

+ 3 - 1
drivers/gpu/drm/i915/intel_display.c

@@ -7210,7 +7210,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
 			encoder->base.base.id,
 			drm_get_encoder_name(&encoder->base),
 			mode->base.id, mode->name);
-		encoder->mode_set(encoder);
+
+		if (encoder->mode_set)
+			encoder->mode_set(encoder);
 	}
 
 	return 0;