On Fri, Mar 17, 2017 at 11:18:01PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > Pull the code to calculate the cursor control register value into > separate functions. Allows us to pre-compute them in the future. Want to comment on the benefit of passing struct intel_crtc_state? > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_display.c | 119 +++++++++++++++++++++-------------- > 1 file changed, 72 insertions(+), 47 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 99b72c4219a8..040978e704f3 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -9161,7 +9161,33 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc, > return active; > } > > +static u32 i845_cursor_ctl(const struct intel_crtc_state *crtc_state, > + const struct intel_plane_state *plane_state) > +{ > static void i845_update_cursor(struct drm_crtc *crtc, u32 base, > + const struct intel_crtc_state *crtc_state, > const struct intel_plane_state *plane_state) > { Odd mishmap of parameters as both functions seem to use the same state in the end. (i845/i915_cursor_ctl recovering crtc, dev etc). Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx