All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] drm: make drm_get_{connector, encoder}_name thread safe
@ 2014-05-14 13:58 Jani Nikula
  2014-05-14 13:58 ` [RFC PATCH 1/2] drm: store connector name in connector struct Jani Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jani Nikula @ 2014-05-14 13:58 UTC (permalink / raw)
  To: dri-devel; +Cc: jani.nikula

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-05-27  6:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-14 13:58 [RFC PATCH 0/2] drm: make drm_get_{connector, encoder}_name thread safe Jani Nikula
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

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.