dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [RFC PATCH 0/2] drm: make drm_get_{connector, encoder}_name thread safe
Date: Wed, 14 May 2014 16:58:18 +0300	[thread overview]
Message-ID: <cover.1400075481.git.jani.nikula@intel.com> (raw)

Hi all -

This series stores connector/encoder names in the relevant structs to
make the name getters thread safe.

What say you, is the wasted memory too high a price to pay for the
thread safety and implementation simplicity of this approach? I think
making drm_get_connector_name and drm_get_encoder_name return allocated
buffers makes a lot of code really ugly and error prone.

I am assuming connector_type, connector_type_id, encoder_type, and
encoder.base.id remain unchanged for the lifetime of the
connector/encoder - is that a correct assumption?

BR,
Jani.


N.B. I did not actually test this...


Jani Nikula (2):
  drm: store connector name in connector struct
  drm: store encoder name in encoder struct

 drivers/gpu/drm/drm_crtc.c | 67 +++++++++++++++++++++++++---------------------
 include/drm/drm_crtc.h     |  4 +++
 2 files changed, 41 insertions(+), 30 deletions(-)

-- 
1.9.1

             reply	other threads:[~2014-05-14 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 13:58 Jani Nikula [this message]
2014-05-14 13:58 ` [RFC PATCH 1/2] drm: store connector name in connector struct Jani Nikula
2014-05-19 11:08   ` David Herrmann
2014-05-27  6:01   ` Dave Airlie
2014-05-27  6:18     ` Jani Nikula
2014-05-14 13:58 ` [RFC PATCH 2/2] drm: store encoder name in encoder struct Jani Nikula
2014-05-19 13:08   ` David Herrmann
2014-05-14 14:17 ` [RFC PATCH 0/2] drm: make drm_get_{connector, encoder}_name thread safe Chris Wilson
2014-05-14 15:59   ` Jani Nikula
2014-05-19 11:11 ` David Herrmann

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=cover.1400075481.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dri-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox