dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC] drm: store property instead of id in obj attachment
Date: Wed, 3 Dec 2014 14:55:28 +0100	[thread overview]
Message-ID: <20141203135528.GA32117@phenom.ffwll.local> (raw)
In-Reply-To: <CAF6AEGsKbMc9qnE-26=CUwLategr8CG9DpL84JU4DpzE4nDM6w@mail.gmail.com>

On Tue, Dec 02, 2014 at 02:09:41PM -0500, Rob Clark wrote:
> On Tue, Dec 2, 2014 at 1:47 PM, Sean Paul <seanpaul@chromium.org> wrote:
> > On Wed, Nov 26, 2014 at 4:19 PM, Rob Clark <robdclark@gmail.com> wrote:
> >> Keep property pointer, instead of id, in per mode-object attachments.
> >> This will simplify things in later patches.
> >>
> >> ---
> >> Does anyone care about the lifetime issue and dangling property ptrs?
> >
> > Judging by the lack of response, it seems like the answer is probably no.
> >
> > That said, it doesn't seem like a whole lot of work to add refcounting
> > to drm_property so we don't have to worry about it. Maybe I'm missing
> > something.
> 
> true.. but then the property would not actually go away then, it would
> be kept alive by the extra ref.  That said, I can't think of a valid
> reason for dynamically creating/destroying properties, so I'm tempted
> to just add a comment somewhere to explain that detaching from mode
> objects would be required if someone did want to dynamically destroy a
> property and leave it at that..

I've thought we'd implement blob properties by allowing userspace to
allocate a blob prop and then pass around it's id. Similar for
framebuffers those would need to be refcounted and also cleaned up (the
public side at least) when their owning file_priv is closed.

But in general I agree with Rob, there's not really a use case for
refcounted driver-side props that I could think of.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2014-12-03 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  0:19 [RFC] drm: store property instead of id in obj attachment Rob Clark
2014-12-02 18:47 ` Sean Paul
2014-12-02 19:09   ` Rob Clark
2014-12-03 13:55     ` Daniel Vetter [this message]

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=20141203135528.GA32117@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robdclark@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox