From: Daniel Vetter Date: Thu, 24 Apr 2014 21:54:37 +0000 (+0200) Subject: drm/i915: Make encoder->mode_set callbacks optional X-Git-Tag: next-20140506~54^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0d56bf0b65e6930ea00060d4107414b8d74c9055;p=karo-tx-linux.git 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 Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 4dbbda2970d4..d3e72639a449 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/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;