Skip to content

RFC drm: make drm_get_{connector, encoder}_name thread safe

Jani Nikula dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm: store connector name in connector structdrivers/gpu/drm/drm_crtc.c include/drm/drm_crtc.h+22 -163 replies
2/2drm: store encoder name in encoder structdrivers/gpu/drm/drm_crtc.c include/drm/drm_crtc.h+19 -141 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid Herrmann
SeriesA-b
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/2] drm: make drm_get_{connector, encoder}_name thread safe

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(-)
Signature · 1 line
1.9.1