Message ID | 20161215154708.31521-3-arkadiusz.hiler@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>-----Original Message----- >From: Hiler, Arkadiusz >Sent: Thursday, December 15, 2016 7:47 AM >To: intel-gfx@lists.freedesktop.org >Cc: Srivatsa, Anusha <anusha.srivatsa@intel.com>; Mcgee, Jeff ><jeff.mcgee@intel.com>; Winiarski, Michal <michal.winiarski@intel.com> >Subject: [PATCH 2/5] drm/i915/guc: Introduce intel_uc_init() > >We will be able to bulk call all firmware _init() function from single point and >offset some general logic there. Following this logic shouldn't we call intel_huc_init() as well? Anusha >Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> >Cc: Jeff McGee <jeff.mcgee@intel.com> >Cc: Michal Winiarski <michal.winiarski@intel.com> >Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> >--- > drivers/gpu/drm/i915/i915_drv.c | 2 +- > drivers/gpu/drm/i915/intel_uc.c | 5 +++++ drivers/gpu/drm/i915/intel_uc.h | 1 + > 3 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c >index 6428588..55a5546c 100644 >--- a/drivers/gpu/drm/i915/i915_drv.c >+++ b/drivers/gpu/drm/i915/i915_drv.c >@@ -600,7 +600,7 @@ static int i915_load_modeset_init(struct drm_device >*dev) > if (ret) > goto cleanup_irq; > >- intel_guc_init(dev_priv); >+ intel_uc_init(dev_priv); > > ret = i915_gem_init(dev_priv); > if (ret) >diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c >index 8ae6795..8eec035 100644 >--- a/drivers/gpu/drm/i915/intel_uc.c >+++ b/drivers/gpu/drm/i915/intel_uc.c >@@ -30,6 +30,11 @@ void intel_uc_init_early(struct drm_i915_private >*dev_priv) > mutex_init(&dev_priv->guc.send_mutex); > } > >+void intel_uc_init(struct drm_i915_private *dev_priv) { >+ intel_guc_init(dev_priv); >+} >+ > /* > * Read GuC command/status register (SOFT_SCRATCH_0) > * Return true if it contains a response rather than a command diff --git >a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h index >7222e6c..ec1a5b2 100644 >--- a/drivers/gpu/drm/i915/intel_uc.h >+++ b/drivers/gpu/drm/i915/intel_uc.h >@@ -170,6 +170,7 @@ struct intel_guc { > > /* intel_uc.c */ > void intel_uc_init_early(struct drm_i915_private *dev_priv); >+void intel_uc_init(struct drm_i915_private *dev_priv); > bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status); int >intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len); int >intel_guc_sample_forcewake(struct intel_guc *guc); >-- >2.9.3
On Tue, Dec 20, 2016 at 11:00:09PM +0100, Srivatsa, Anusha wrote: > > > >-----Original Message----- > >From: Hiler, Arkadiusz > >Sent: Thursday, December 15, 2016 7:47 AM > >To: intel-gfx@lists.freedesktop.org > >Cc: Srivatsa, Anusha <anusha.srivatsa@intel.com>; Mcgee, Jeff > ><jeff.mcgee@intel.com>; Winiarski, Michal <michal.winiarski@intel.com> > >Subject: [PATCH 2/5] drm/i915/guc: Introduce intel_uc_init() > > > >We will be able to bulk call all firmware _init() function from single point and > >offset some general logic there. > > Following this logic shouldn't we call intel_huc_init() as well? We will, once your patches will made into upstream. There is no sense calling nonexisting functions yet. HuC is partically the reason for introducing common init. > >Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> > >Cc: Jeff McGee <jeff.mcgee@intel.com> > >Cc: Michal Winiarski <michal.winiarski@intel.com> > >Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> > >--- > > drivers/gpu/drm/i915/i915_drv.c | 2 +- > > drivers/gpu/drm/i915/intel_uc.c | 5 +++++ drivers/gpu/drm/i915/intel_uc.h | 1 + > > 3 files changed, 7 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > >index 6428588..55a5546c 100644 > >--- a/drivers/gpu/drm/i915/i915_drv.c > >+++ b/drivers/gpu/drm/i915/i915_drv.c > >@@ -600,7 +600,7 @@ static int i915_load_modeset_init(struct drm_device > >*dev) > > if (ret) > > goto cleanup_irq; > > > >- intel_guc_init(dev_priv); > >+ intel_uc_init(dev_priv); > > > > ret = i915_gem_init(dev_priv); > > if (ret) > >diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c > >index 8ae6795..8eec035 100644 > >--- a/drivers/gpu/drm/i915/intel_uc.c > >+++ b/drivers/gpu/drm/i915/intel_uc.c > >@@ -30,6 +30,11 @@ void intel_uc_init_early(struct drm_i915_private > >*dev_priv) > > mutex_init(&dev_priv->guc.send_mutex); > > } > > > >+void intel_uc_init(struct drm_i915_private *dev_priv) { > >+ intel_guc_init(dev_priv); > >+} > >+ > > /* > > * Read GuC command/status register (SOFT_SCRATCH_0) > > * Return true if it contains a response rather than a command diff --git > >a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h index > >7222e6c..ec1a5b2 100644 > >--- a/drivers/gpu/drm/i915/intel_uc.h > >+++ b/drivers/gpu/drm/i915/intel_uc.h > >@@ -170,6 +170,7 @@ struct intel_guc { > > > > /* intel_uc.c */ > > void intel_uc_init_early(struct drm_i915_private *dev_priv); > >+void intel_uc_init(struct drm_i915_private *dev_priv); > > bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status); int > >intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len); int > >intel_guc_sample_forcewake(struct intel_guc *guc); > >-- > >2.9.3 >
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 6428588..55a5546c 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -600,7 +600,7 @@ static int i915_load_modeset_init(struct drm_device *dev) if (ret) goto cleanup_irq; - intel_guc_init(dev_priv); + intel_uc_init(dev_priv); ret = i915_gem_init(dev_priv); if (ret) diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 8ae6795..8eec035 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -30,6 +30,11 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv) mutex_init(&dev_priv->guc.send_mutex); } +void intel_uc_init(struct drm_i915_private *dev_priv) +{ + intel_guc_init(dev_priv); +} + /* * Read GuC command/status register (SOFT_SCRATCH_0) * Return true if it contains a response rather than a command diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h index 7222e6c..ec1a5b2 100644 --- a/drivers/gpu/drm/i915/intel_uc.h +++ b/drivers/gpu/drm/i915/intel_uc.h @@ -170,6 +170,7 @@ struct intel_guc { /* intel_uc.c */ void intel_uc_init_early(struct drm_i915_private *dev_priv); +void intel_uc_init(struct drm_i915_private *dev_priv); bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status); int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len); int intel_guc_sample_forcewake(struct intel_guc *guc);
We will be able to bulk call all firmware _init() function from single point and offset some general logic there. Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> Cc: Jeff McGee <jeff.mcgee@intel.com> Cc: Michal Winiarski <michal.winiarski@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> --- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_uc.c | 5 +++++ drivers/gpu/drm/i915/intel_uc.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-)