On Thu, Dec 10, 2020 at 4:18 PM Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> wrote: > > On Thu, Dec 10, 2020 at 02:17:52PM +1000, Dave Airlie wrote: > > From: Dave Airlie <airlied@xxxxxxxxxx> > > > > This pulls a large chunk of the pll calculation code out of > > intel_display.c to a new file. > > > > One function makse sense to be an inline, otherwise this > > is pretty much a straight copy cover. also all the > > remaining hooks for g45 and older end up the same now. > > > > Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx> > > --- > > drivers/gpu/drm/i915/Makefile | 1 + > > drivers/gpu/drm/i915/display/intel_display.c | 1393 +---------------- > > drivers/gpu/drm/i915/display/intel_display.h | 13 +- > > .../drm/i915/display/intel_display_types.h | 5 + > > .../gpu/drm/i915/display/intel_dpll_legacy.c | 1370 ++++++++++++++++ > > 5 files changed, 1398 insertions(+), 1384 deletions(-) > > create mode 100644 drivers/gpu/drm/i915/display/intel_dpll_legacy.c > > > <snip> > > +static int hsw_crtc_compute_clock(struct intel_crtc *crtc, > > + struct intel_crtc_state *crtc_state) > > +{ > > + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > > + struct intel_atomic_state *state = > > + to_intel_atomic_state(crtc_state->uapi.state); > > + > > + if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI) || > > + INTEL_GEN(dev_priv) >= 11) { > > + struct intel_encoder *encoder = > > + intel_get_crtc_new_encoder(state, crtc_state); > > + > > + if (!intel_reserve_shared_dplls(state, crtc, encoder)) { > > + drm_dbg_kms(&dev_priv->drm, > > + "failed to find PLL for pipe %c\n", > > + pipe_name(crtc->pipe)); > > + return -EINVAL; > > + } > > + } > > + > > + return 0; > > +} > > If you're moving this then the "legacy" in the fine name is just > wrong. I guess just call it intel_dpll.c if we lack a better idea? Ah yes I missed that it's also pulling the ilk/hsw stuff which uses the intel_dpll_mgr.c stuff. Probably more splitting to do eventually, but just intel_dpll.c sounds reasonable for now. -Daniel > > -- > Ville Syrjälä > Intel > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx