Re: [PATCH 1/3] drm: introduce drm_connector_plug_all() helper

From: Alexey Brodkin
Date: Mon Mar 21 2016 - 07:02:38 EST


Hi Daniel,

On Sat, 2016-03-19 at 11:02 +-0100, Daniel Vetter wrote:
+AD4- On Fri, Mar 18, 2016 at 09:58:49PM +-0000, Alexey Brodkin wrote:
+AD4- +AD4-
+AD4- +AD4- Hi Daniel,
+AD4- +AD4-
+AD4- +AD4- On Fri, 2016-03-18 at 19:06 +-0100, Daniel Vetter wrote:
+AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- On Fri, Mar 18, 2016 at 01:01:42PM +-0300, Alexey Brodkin wrote:
+AD4- +AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- +AD4- As a pair to already existing drm+AF8-connector+AF8-unplug+AF8-all() we're adding
+AD4- +AD4- +AD4- +AD4- generic implementation of what is already done in some drivers.
+AD4- +AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- +AD4- Once this helper is implemented we'll be ready to switch existing
+AD4- +AD4- +AD4- +AD4- driver-specific implementations with generic one.
+AD4- +AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- +AD4- Signed-off-by: Alexey Brodkin +ADw-abrodkin+AEA-synopsys.com+AD4-
+AD4- +AD4- +AD4- +AD4- Cc: Daniel Vetter +ADw-daniel+AEA-ffwll.ch+AD4-
+AD4- +AD4- +AD4- +AD4- Cc: David Airlie +ADw-airlied+AEA-linux.ie+AD4-
+AD4- +AD4- +AD4- +AD4- ---
+AD4- +AD4- +AD4- +AD4- +AKA-drivers/gpu/drm/drm+AF8-crtc.c +AHw- 44 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--
+AD4- +AD4- +AD4- +AD4- +AKA-drivers/gpu/drm/drm+AF8-drv.c+AKAAoAB8AKAAoA-3 +-+--
+AD4- +AD4- +AD4- +AD4- +AKA-include/drm/drm+AF8-crtc.h+AKAAoACgAKAAoAB8AKAAoA-3 +-+--
+AD4- +AD4- +AD4- +AD4- +AKA-3 files changed, 47 insertions(+-), 3 deletions(-)
+AD4- +AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- +AD4- diff --git a/drivers/gpu/drm/drm+AF8-crtc.c b/drivers/gpu/drm/drm+AF8-crtc.c
+AD4- +AD4- +AD4- +AD4- index 65258ac..ce27420 100644
+AD4- +AD4- +AD4- +AD4- --- a/drivers/gpu/drm/drm+AF8-crtc.c
+AD4- +AD4- +AD4- +AD4- +-+-+- b/drivers/gpu/drm/drm+AF8-crtc.c
+AD4- +AD4- +AD4- +AD4- +AEAAQA- -1080,6 +-1080,46 +AEAAQA- void drm+AF8-connector+AF8-unregister(struct drm+AF8-connector +ACo-connector)
+AD4- +AD4- +AD4- +AD4- +AKAAfQ-
+AD4- +AD4- +AD4- +AD4- +AKA-EXPORT+AF8-SYMBOL(drm+AF8-connector+AF8-unregister)+ADs-
+AD4- +AD4- +AD4- +AD4- +AKA-
+AD4- +AD4- +AD4- +AD4- +-/+ACoAKg-
+AD4- +AD4- +AD4- +AD4- +- +ACo- drm+AF8-connector+AF8-plug+AF8-all - register connector userspace interfaces
+AD4- +AD4- +AD4- +AD4- +- +ACo- +AEA-dev: drm device
+AD4- +AD4- +AD4- +AD4- +- +ACo-
+AD4- +AD4- +AD4- +AD4- +- +ACo- This function registers all connector userspace interfaces in sysfs. Should
+AD4- +AD4- +AD4- +AD4- +- +ACo- be call when the device is disconnected, e.g. from an usb driver's
+AD4- +AD4- +AD4- Still talks about disconnect +ADs--) Please also mention that this just calls
+AD4- +AD4- +AD4- drm+AF8-connector+AF8-register() exactly like this including () to generate a
+AD4- +AD4- +AD4- kerneldoc hyperlink.
+AD4- +AD4- Well I intentionally left in description of drm+AF8-connector+AF8-register+AF8-all():
+AD4- +AD4- +ACI-Should be call when the device is disconnected, e.g. from an usb driver's
+AD4- +AD4- +AKA--+AD4-connect callback.+ACI-
+AD4- You use +ACI-disconnected+ACI- for connecting stuff. That doesn't make sense to me
+AD4- at all - register+AF8-all is for when you want to publish something, not for
+AD4- unpublishing when the device disappears. Or maybe this is a case of lost
+AD4- in translation, and you mean something else?

Let me try to explain what I meant.

We execute -+AD4-connect() callback of USB device when USB device is still in +ACI-disconnected+ACI- state
(well at least that was my thought). And only when that -+AD4-connect() callback succeeds we're
entering +ACI-connected+ACI- state.

Probably above sentence is not correct. Then could you please help me with correct wording of
comment to+AKA-drm+AF8-connector+AF8-register+AF8-all()?

-Alexey