Message ID | 20170214101832.725-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tuesday, 2017-02-14 10:18:31 +0000, Chris Wilson wrote: > We are told not to set plane_state->fb directly, but use > drm_atomic_set_fb_for_plane() instead. Using the helper, means one less > piece of code that needs fixing should the interface change... > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> > --- > drivers/gpu/drm/i915/intel_display.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 04ca4e7bbbe0..7f7f6de011a4 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -2666,11 +2666,7 @@ update_state_fb(struct drm_plane *plane) > if (plane->fb == plane->state->fb) > return; > > - if (plane->state->fb) > - drm_framebuffer_unreference(plane->state->fb); > - plane->state->fb = plane->fb; > - if (plane->state->fb) > - drm_framebuffer_reference(plane->state->fb); > + drm_atomic_set_fb_for_plane(plane->state, plane->fb); > } > > static void > -- > 2.11.0 >
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 04ca4e7bbbe0..7f7f6de011a4 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2666,11 +2666,7 @@ update_state_fb(struct drm_plane *plane) if (plane->fb == plane->state->fb) return; - if (plane->state->fb) - drm_framebuffer_unreference(plane->state->fb); - plane->state->fb = plane->fb; - if (plane->state->fb) - drm_framebuffer_reference(plane->state->fb); + drm_atomic_set_fb_for_plane(plane->state, plane->fb); } static void
We are told not to set plane_state->fb directly, but use drm_atomic_set_fb_for_plane() instead. Using the helper, means one less piece of code that needs fixing should the interface change... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/intel_display.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)