[Intel-gfx] [PATCH 1/6] drm/i915: factor out compute_config from __intel_set_mode v3
Chris Wilson
chris at chris-wilson.co.uk
Thu Nov 6 10:04:14 CET 2014
On Wed, Nov 05, 2014 at 02:26:06PM -0800, Jesse Barnes wrote:
> +static int intel_set_mode(struct drm_crtc *crtc,
> + struct drm_display_mode *mode,
> + int x, int y, struct drm_framebuffer *fb)
> +{
> + struct intel_crtc_config *pipe_config;
> + unsigned modeset_pipes, prepare_pipes, disable_pipes;
> +
> + pipe_config = intel_modeset_compute_config(crtc, mode, fb,
> + &modeset_pipes,
> + &prepare_pipes,
> + &disable_pipes);
> +
> + if (IS_ERR(pipe_config))
> + return PTR_ERR(pipe_config);
> +
> + return intel_set_mode_pipes(crtc, mode, x, y, fb, pipe_config,
> + modeset_pipes, prepare_pipes,
> + disable_pipes);
> +}
intel_set_mode() -> intel_set_mode_pipes() -> __intel_set_mode() wins
this morning's prize for causing confusion.
Does it make sense to wrap intel_crtc_config + pipes in a new struct to
avoid passing 4 new parameters down the chain? Or will that just be
extra churn to be rewritten by atomic?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list