Message ID | 1444840154-7804-13-git-send-email-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On 14/10/15 17:29, ville.syrjala@linux.intel.com wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Just for clarity set the type for i915_ggtt_view_normal explicitly. > > While at it fix the indentation fail for i915_ggtt_view_rotated. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > index 620d57e..71acc71 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > @@ -95,9 +95,11 @@ > static int > i915_get_ggtt_vma_pages(struct i915_vma *vma); > > -const struct i915_ggtt_view i915_ggtt_view_normal; > +const struct i915_ggtt_view i915_ggtt_view_normal = { > + .type = I915_GGTT_VIEW_NORMAL, > +}; AFAIR while this was developed Daniel was very keen on the normal view type being implicitly zero. Can't remember at this very moment if some of the current code actually depends on it though. Regards, Tvrtko
On Thu, Oct 15, 2015 at 12:15:21PM +0100, Tvrtko Ursulin wrote: > > Hi, > > On 14/10/15 17:29, ville.syrjala@linux.intel.com wrote: > >From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > >Just for clarity set the type for i915_ggtt_view_normal explicitly. > > > >While at it fix the indentation fail for i915_ggtt_view_rotated. > > > >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > >--- > > drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > >diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > >index 620d57e..71acc71 100644 > >--- a/drivers/gpu/drm/i915/i915_gem_gtt.c > >+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > >@@ -95,9 +95,11 @@ > > static int > > i915_get_ggtt_vma_pages(struct i915_vma *vma); > > > >-const struct i915_ggtt_view i915_ggtt_view_normal; > >+const struct i915_ggtt_view i915_ggtt_view_normal = { > >+ .type = I915_GGTT_VIEW_NORMAL, > >+}; > > AFAIR while this was developed Daniel was very keen on the normal view type > being implicitly zero. Can't remember at this very moment if some of the > current code actually depends on it though. We kzalloc vmas, which means any view in there is normal by default. Still very much keen on that ;-) -Daniel
On Thu, Oct 15, 2015 at 02:01:38PM +0200, Daniel Vetter wrote: > On Thu, Oct 15, 2015 at 12:15:21PM +0100, Tvrtko Ursulin wrote: > > > > Hi, > > > > On 14/10/15 17:29, ville.syrjala@linux.intel.com wrote: > > >From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > >Just for clarity set the type for i915_ggtt_view_normal explicitly. > > > > > >While at it fix the indentation fail for i915_ggtt_view_rotated. > > > > > >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > >--- > > > drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > >diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > > >index 620d57e..71acc71 100644 > > >--- a/drivers/gpu/drm/i915/i915_gem_gtt.c > > >+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > > >@@ -95,9 +95,11 @@ > > > static int > > > i915_get_ggtt_vma_pages(struct i915_vma *vma); > > > > > >-const struct i915_ggtt_view i915_ggtt_view_normal; > > >+const struct i915_ggtt_view i915_ggtt_view_normal = { > > >+ .type = I915_GGTT_VIEW_NORMAL, > > >+}; > > > > AFAIR while this was developed Daniel was very keen on the normal view type > > being implicitly zero. Can't remember at this very moment if some of the > > current code actually depends on it though. > > We kzalloc vmas, which means any view in there is normal by default. Still > very much keen on that ;-) Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 620d57e..71acc71 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -95,9 +95,11 @@ static int i915_get_ggtt_vma_pages(struct i915_vma *vma); -const struct i915_ggtt_view i915_ggtt_view_normal; +const struct i915_ggtt_view i915_ggtt_view_normal = { + .type = I915_GGTT_VIEW_NORMAL, +}; const struct i915_ggtt_view i915_ggtt_view_rotated = { - .type = I915_GGTT_VIEW_ROTATED + .type = I915_GGTT_VIEW_ROTATED, }; static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)