[09/10] drm/i915: Kill off a user of update_state_fb.
diff mbox

Message ID 1441894085-25662-10-git-send-email-maarten.lankhorst@linux.intel.com
State New
Headers show

Commit Message

Maarten Lankhorst Sept. 10, 2015, 2:08 p.m. UTC
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Vetter Sept. 10, 2015, 3:50 p.m. UTC | #1
On Thu, Sep 10, 2015 at 04:08:04PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Not sure this is worth it ... I'll punt for now. But if you add a bit of
justification that we could get rid of update_state_fb entirely it would
look better ;-)
-Daniel
> ---
>  drivers/gpu/drm/i915/intel_display.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b809ee2a8678..f41ca558ba3b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15353,9 +15353,9 @@ void intel_modeset_gem_init(struct drm_device *dev)
>  			DRM_ERROR("failed to pin boot fb on pipe %d\n",
>  				  to_intel_crtc(c)->pipe);
>  			drm_framebuffer_unreference(c->primary->fb);
> -			c->primary->fb = NULL;
> +			drm_framebuffer_unreference(c->primary->state->fb);
> +			c->primary->fb = c->primary->state->fb = NULL;
>  			c->primary->crtc = c->primary->state->crtc = NULL;
> -			update_state_fb(c->primary);
>  			c->state->plane_mask &= ~(1 << drm_plane_index(c->primary));
>  		}
>  	}
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst Sept. 14, 2015, 9:56 a.m. UTC | #2
Op 10-09-15 om 17:50 schreef Daniel Vetter:
> On Thu, Sep 10, 2015 at 04:08:04PM +0200, Maarten Lankhorst wrote:
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Not sure this is worth it ... I'll punt for now. But if you add a bit of
> justification that we could get rid of update_state_fb entirely it would
> look better ;-)
>
When the page flip handler is converted to atomic this function will finally have no more use. I'm a patient man and can hold off this patch a bit longer. ;-)

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b809ee2a8678..f41ca558ba3b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15353,9 +15353,9 @@  void intel_modeset_gem_init(struct drm_device *dev)
 			DRM_ERROR("failed to pin boot fb on pipe %d\n",
 				  to_intel_crtc(c)->pipe);
 			drm_framebuffer_unreference(c->primary->fb);
-			c->primary->fb = NULL;
+			drm_framebuffer_unreference(c->primary->state->fb);
+			c->primary->fb = c->primary->state->fb = NULL;
 			c->primary->crtc = c->primary->state->crtc = NULL;
-			update_state_fb(c->primary);
 			c->state->plane_mask &= ~(1 << drm_plane_index(c->primary));
 		}
 	}