Re: [RFC 03/31] drm/i915: Move intel_gt initialization to a separate file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Chris Wilson (2019-06-14 17:14:08)
> Quoting Chris Wilson (2019-06-14 17:13:03)
> > Quoting Tvrtko Ursulin (2019-06-14 16:17:03)
> > > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> > > 
> > > As it will grow in a following patch make a new home for it.
> > > 
> > > v2:
> > >  * Convert mock_gem_device as well. (Chris)
> > > 
> > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> > > ---
> > >  drivers/gpu/drm/i915/Makefile                    |  1 +
> > >  drivers/gpu/drm/i915/gt/intel_gt.c               | 15 +++++++++++++++
> > >  drivers/gpu/drm/i915/gt/intel_gt.h               | 14 ++++++++++++++
> > >  drivers/gpu/drm/i915/i915_gem.c                  |  6 ++----
> > >  drivers/gpu/drm/i915/selftests/mock_gem_device.c |  5 ++---
> > >  5 files changed, 34 insertions(+), 7 deletions(-)
> > >  create mode 100644 drivers/gpu/drm/i915/gt/intel_gt.c
> > >  create mode 100644 drivers/gpu/drm/i915/gt/intel_gt.h
> > > 
> > > diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> > > index c0a7b2994077..8df1bf2855d0 100644
> > > --- a/drivers/gpu/drm/i915/Makefile
> > > +++ b/drivers/gpu/drm/i915/Makefile
> > > @@ -73,6 +73,7 @@ gt-y += \
> > >         gt/intel_context.o \
> > >         gt/intel_engine_cs.o \
> > >         gt/intel_engine_pm.o \
> > > +       gt/intel_gt.o \
> > >         gt/intel_gt_pm.o \
> > >         gt/intel_hangcheck.o \
> > >         gt/intel_lrc.o \
> > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> > > new file mode 100644
> > > index 000000000000..807c5f746110
> > > --- /dev/null
> > > +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> > > @@ -0,0 +1,15 @@
> > > +/*
> > > + * SPDX-License-Identifier: MIT
> > > + *
> > > + * Copyright © 2019 Intel Corporation
> > > + */
> > > +
> > > +#include "intel_gt.h"
> > > +
> > > +void intel_gt_init(struct intel_gt *gt)
> > 
> > Please use intel_gt_init_early() to keep the phase known.
> 
> (And yes, I know I violated my own rule, it's easier to spot in review
> :)

Oh, and I would promote it to being called directly by i915_drv.c and
start pulling the HW setup out from under i915_gem.c. I would also like
to push intel_gt_pm_init() into intel_gt_init(), and do want to split
out ips/rps and rc6 out of intel_pm.c into gt/
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux