All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/fb-helper: Automatically clean up fb_info
Date: Tue, 7 Feb 2017 14:49:38 +0000	[thread overview]
Message-ID: <20170207144938.GF11545@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <CACvgo51A=ZKsAC_K_5eZXfcUM5eO8PdTEQQp1h5yX=d1+KQ2ig@mail.gmail.com>

On Tue, Feb 07, 2017 at 02:38:16PM +0000, Emil Velikov wrote:
> On 7 February 2017 at 14:29, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Noticed that everyone duplicates the same logic here and we could safe
> > a few lines per driver. Yay for lots of drivers to make such tiny
> > refactors worth-while!
> >
> > v2: Forgot to git add everything :(
> >
> Hmm afaict this patch inlines drm_fb_helper_release_fbi within
> drm_fb_helper_fini yet it is missing:
>  - removal of the (now unused ?) drm_fb_helper_release_fbi
>  - the leaks which now occur in the error paths.

The error cleanup is a bit unobvious. The fbi is allocated during the
create/initial_fb callback, which is after a successful
framebuffer_init. The caller must be prepared to do a framebuffer_fini
(and so release_fbi will be handled if required) on failure or success.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-02-07 14:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 14:10 [PATCH 1/2] drm/fb-helper: Explain unload sequence a bit better Daniel Vetter
2017-02-07 14:10 ` [PATCH 2/2] drm/fb-helper: Automatically clean up fb_info Daniel Vetter
2017-02-07 14:29   ` [PATCH] " Daniel Vetter
2017-02-07 14:38     ` Emil Velikov
2017-02-07 14:49       ` Chris Wilson [this message]
2017-02-07 16:09         ` [Intel-gfx] " Daniel Vetter
2017-02-08  0:49         ` Emil Velikov
2017-02-07 16:16     ` Daniel Vetter
2017-02-07 16:27       ` Sean Paul
2017-02-07 14:34   ` [PATCH 2/2] " Chris Wilson
2017-02-07 15:51   ` Sean Paul
2017-02-07 14:28 ` [PATCH 1/2] drm/fb-helper: Explain unload sequence a bit better Chris Wilson
2017-02-07 17:32 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/fb-helper: Explain unload sequence a bit better (rev3) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170207144938.GF11545@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.