Re: [PATCHv5, 1/3] drm: add support for DisplayPort CEC-Tunneling-over-AUX

2018-05-03 Thread Dariusz Marcinkiewicz
Hello, pretty late here but I have a small comment. > From: Hans Verkuil > This adds support for the DisplayPort CEC-Tunneling-over-AUX > feature that is part of the DisplayPort 1.3 standard. > +int drm_dp_cec_configure_adapter(struct drm_dp_aux *aux, const char

Re: [PATCHv8 02/13] cec: add struct cec_connector_info support

2019-06-25 Thread Dariusz Marcinkiewicz
Hi Hans. Patches 1 and 2 look good to me. There is one comment here that I forgot to update as the code evolved. On Mon, Jun 24, 2019 at 6:03 PM Hans Verkuil wrote: ... > +/** > + * struct cec_event_connector - tells if and which connector is associated > + * with the CEC adapter. > + *

Re: [PATCHv9 04/13] cec: expose the new connector info API

2019-06-25 Thread Dariusz Marcinkiewicz
Hi again. On Tue, Jun 25, 2019 at 4:45 PM Hans Verkuil wrote: > > + mutex_lock(>lock); > + if (copy_to_user(parg, >conn_info, sizeof(adap->conn_info))) > + ret = -EFAULT; > + mutex_unlock(>lock); > + return ret; > +} Shouldn't the lock be released before

Re: [PATCHv8 03/13] cec: add new notifier functions

2019-06-25 Thread Dariusz Marcinkiewicz
Hello. Some small comments/questions. On Mon, Jun 24, 2019 at 6:03 PM Hans Verkuil wrote: > ... > @@ -22,9 +22,11 @@ struct cec_notifier { > struct list_head head; > struct kref kref; > struct device *hdmi_dev; > + struct cec_connector_info conn_info; >

Re: [PATCHv8 04/13] cec: expose the new connector info API

2019-06-25 Thread Dariusz Marcinkiewicz
Hi. This looks good except one comment about the ioctl. On Mon, Jun 24, 2019 at 6:03 PM Hans Verkuil wrote: > ... > +static long cec_adap_g_connector_info(struct cec_adapter *adap, > + struct cec_log_addrs __user *parg) > +{ > + if (!(adap->capabilities

[PATCH v7 7/9] drm: tegra: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Changes since v4: - only create a CEC notifier for HDMI connectors Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil --- drivers

[PATCH v7 8/9] drm: dw-hdmi: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
that the notifier becomes visible to the irq thread once it is fully constructed. Signed-off-by: Dariusz Marcinkiewicz --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 45 +++ 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/bridge

[PATCH v7 3/9] dw-hdmi-cec: use cec_notifier_cec_adap_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
| CEC_CAP_TRANSMIT | CEC_CAP_RC | CEC_CAP_PASSTHROUGH with CEC_CAP_DEFAULTS. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

[PATCH v7 4/9] tda9950: use cec_notifier_cec_adap_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_cec_adap_(un)register() functions to (un)register the notifier for the CEC adapter. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- drivers/gpu/drm/i2c/tda9950.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH v7 5/9] drm: tda998x: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
it is fully constructed. Signed-off-by: Dariusz Marcinkiewicz --- drivers/gpu/drm/i2c/tda998x_drv.c | 36 +-- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 61e042918a7fc

[PATCH v7 9/9] drm: exynos: exynos_hdmi: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
cec_notifier_phys_addr_invalidate instead of setting invalid address on a notifier. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil --- drivers/gpu/drm/exynos/exynos_hdmi.c | 31 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v7 6/9] drm: sti: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Changes since v2: Don't invalidate physical address before unregistering the notifier. Signed-off-by: Dariusz Marcinkiewicz

[PATCH v7 0/9] drm: cec: convert DRM drivers to the new notifier API

2019-08-15 Thread Dariusz Marcinkiewicz
e sure IRQ threads see the notifier once it is created (replacing the WRITE_ONCE I put in v1). The best thing to do here, I believe, would be not to have any synchronization and make sure that an IRQ only gets enabled after the notifier is created. Dariusz Marcinkiewicz (9):

[PATCH v7 1/9] drm_dp_cec: add connector info support.

2019-08-15 Thread Dariusz Marcinkiewicz
Pass the connector info to the CEC adapter. This makes it possible to associate the CEC adapter with the corresponding drm connector. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- drivers/gpu

[PATCH v7 2/9] drm/i915/intel_hdmi: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- drivers/gpu/drm/i915/display/intel_hdmi.c | 13

Re: [PATCH v6 4/8] drm: tda998x: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
Hello. On Tue, Aug 13, 2019 at 1:20 PM Russell King - ARM Linux admin wrote: > > This also doesn't make sense: tda998x_destroy() is the opposite of > tda998x_create(). However, tda998x_connector_destroy() is the > opposite of tda998x_connector_create(). > > By moving the CEC creation code into

Re: [PATCH v6 7/8] drm: dw-hdmi: use cec_notifier_conn_(un)register

2019-08-14 Thread Dariusz Marcinkiewicz
Hi. On Tue, Aug 13, 2019 at 1:38 PM Hans Verkuil wrote: > > Russell's review caused me to take another look at this series, and it made > wonder if cec_notifier_conn_unregister() shouldn't be called from > bridge_detach? > I've sent out v7 of the series where unregistration is done from bridge

[PATCH v6 8/8] drm: exynos: exynos_hdmi: use cec_notifier_conn_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
cec_notifier_phys_addr_invalidate instead of setting invalid address on a notifier. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil --- drivers/gpu/drm/exynos/exynos_hdmi.c | 31 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v6 5/8] drm: sti: use cec_notifier_conn_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Changes since v2: Don't invalidate physical address before unregistering the notifier. Signed-off-by: Dariusz Marcinkiewicz

[PATCH v6 2/8] dw-hdmi-cec: use cec_notifier_cec_adap_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
| CEC_CAP_TRANSMIT | CEC_CAP_RC | CEC_CAP_PASSTHROUGH with CEC_CAP_DEFAULTS. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

[PATCH v6 3/8] tda9950: use cec_notifier_cec_adap_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_cec_adap_(un)register() functions to (un)register the notifier for the CEC adapter. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- drivers/gpu/drm/i2c/tda9950.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH v6 0/8] drm: cec: convert DRM drivers to the new notifier API

2019-08-13 Thread Dariusz Marcinkiewicz
o have any synchronization and make sure that an IRQ only gets enabled after the notifier is created. Dariusz Marcinkiewicz (8): drm/i915/intel_hdmi: use cec_notifier_conn_(un)register dw-hdmi-cec: use cec_notifier_cec_adap_(un)register tda9950: use cec_notifier_cec_adap_(un)register dr

[PATCH v6 4/8] drm: tda998x: use cec_notifier_conn_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
cec_notifier_conn_unregister. Changes since v1: Add memory barrier to make sure that the notifier becomes visible to the irq thread once it is fully constructed. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil --- drivers/gpu/drm/i2c/tda998x_drv.c | 33

[PATCH v6 7/8] drm: dw-hdmi: use cec_notifier_conn_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
, - use cec_notifier_phys_addr_invalidate to invalidate physical address. Changes since v1: Add memory barrier to make sure that the notifier becomes visible to the irq thread once it is fully constructed. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans

[PATCH v6 6/8] drm: tegra: use cec_notifier_conn_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Changes since v4: - only create a CEC notifier for HDMI connectors Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil --- drivers

[PATCH v6 1/8] drm/i915/intel_hdmi: use cec_notifier_conn_(un)register

2019-08-13 Thread Dariusz Marcinkiewicz
Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- drivers/gpu/drm/i915/display/intel_hdmi.c | 13

Re: [PATCH v7 0/9] drm: cec: convert DRM drivers to the new notifier API

2019-08-20 Thread Dariusz Marcinkiewicz
On Mon, Aug 19, 2019 at 11:38 AM Hans Verkuil wrote: > > Hi all, > Hi Hans. > The patches in this series can be applied independently from each other. > > If you maintain one of these drivers and you want to merge it for v5.4 > yourself, then please do so and let me know. If you prefer I commit

[PATCH v7.1 5/9] drm: tda998x: use cec_notifier_conn_(un)register

2019-08-19 Thread Dariusz Marcinkiewicz
visible to the irq thread once it is fully constructed. Signed-off-by: Dariusz Marcinkiewicz --- drivers/gpu/drm/i2c/tda998x_drv.c | 36 +-- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c

Re: [PATCHv10 2/2] cec: document CEC_ADAP_G_CONNECTOR_INFO and capability

2019-08-28 Thread Dariusz Marcinkiewicz
Hi. Should this patch also have an explicit From tag? On Fri, Aug 23, 2019 at 2:21 PM Hans Verkuil wrote: > > Document the new CEC_ADAP_G_CONNECTOR_INFO ioctl and the new > CEC_CAP_CONNECTOR_INFO capability. > > Signed-off-by: Dariusz Marcinkiewicz > Co-developed-by: Hans Ve

[PATCH v7.2 5/9] drm: tda998x: use cec_notifier_conn_(un)register

2019-08-28 Thread Dariusz Marcinkiewicz
barrier to make sure that the notifier becomes visible to the irq thread once it is fully constructed. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil --- drivers/gpu/drm/i2c/tda998x_drv.c | 37 ++- 1 file changed, 26 insertions(+), 11

Re: [PATCH v7 5/9] drm: tda998x: use cec_notifier_conn_(un)register

2019-08-28 Thread Dariusz Marcinkiewicz
On Sun, Aug 25, 2019 at 3:12 PM Hans Verkuil wrote: > > You dropped a 'if (!notifier)' before the return! > > After adding back this 'if' it worked fine on my BeagleBone Black board, > so after fixing this you can add my: > > Tested-by: Hans Verkuil > Submitted v7.2. Thank you for testing!

[PATCH v7.1 9/9] drm: exynos: exynos_hdmi: use cec_notifier_conn_(un)register

2019-08-28 Thread Dariusz Marcinkiewicz
ore deregistering the notifier, - use cec_notifier_phys_addr_invalidate instead of setting invalid address on a notifier. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil --- drivers/gpu/drm/exynos/exynos_hdmi.c | 31 1 file chan

Re: [PATCH v7 9/9] drm: exynos: exynos_hdmi: use cec_notifier_conn_(un)register

2019-08-28 Thread Dariusz Marcinkiewicz
Hi. On Wed, Aug 28, 2019 at 10:39 AM Sylwester Nawrocki wrote: > > nit: I think err_rpm_disable or err_pm_runtime_disable could be better > label names. > Submitted v7.1 which replaces err_runtime_disable with err_rpm_disable. Thank you.