Re: [Freedreno] [PATCH v5 3/5] drm/msm/dp: set stream_pixel rate directly

2022-04-29 Thread Dmitry Baryshkov
On Fri, 29 Apr 2022 at 04:20, Stephen Boyd wrote: > > Quoting Dmitry Baryshkov (2022-02-16 21:55:27) > > The only clock for which we set the rate is the "stream_pixel". Rather > > than storing the rate and then setting it by looping over all the > > clocks, set the clock rate directly. > > > > Sig

[Freedreno] [PATCH] MAINTAINERS: Add Dmitry as MSM DRM driver co-maintainer

2022-04-29 Thread Dmitry Baryshkov
For the past several releases I have been assisting Rob by writing, collecting, testing and integrating patches for non-GPU and non-core parts of MSM DRM driver, while Rob is more interested in improving the GPU-related part. Let's note this in the MAINTAINERS file. Signed-off-by: Dmitry Baryshkov

[Freedreno] [PATCH v1 0/7] drm/bridge_connector: perform HPD enablement automatically

2022-04-29 Thread Dmitry Baryshkov
>From all the drivers using drm_bridge_connector only iMX/dcss and OMAP DRM driver do a proper work of calling drm_bridge_connector_en/disable_hpd() in right places. Rather than teaching each and every driver how to properly handle drm_bridge_connector's HPD, make that automatic. Add two additiona

[Freedreno] [PATCH v1 3/7] drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement

2022-04-29 Thread Dmitry Baryshkov
Use drm_connector's helpers enable_hpd and disable_hpd to enable and disable HPD automatically by the means of drm_kms_helper_poll_* functions. As the drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() functions are now unused, replace them with stubs to ease driver migration.

[Freedreno] [PATCH v1 2/7] drm/probe-helper: enable and disable HPD on connectors

2022-04-29 Thread Dmitry Baryshkov
Intruct two drm_connector_helper_funcs: enable_hpd() and disable_hpd(). They are called by drm_kms_helper_poll_enable() and drm_kms_helper_poll_disable() (and thus drm_kms_helper_poll_init() and drm_kms_helper_poll_fini()) respectively. This allows drivers to rely on drm_kms_helper_poll for enabli

[Freedreno] [PATCH v1 4/7] drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()

2022-04-29 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/dcss/dcss-dev.c | 4 drivers/gpu/drm/imx/dcss/d

[Freedreno] [PATCH v1 1/7] drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()

2022-04-29 Thread Dmitry Baryshkov
Merge drm_kms_helper_poll_disable() and drm_kms_helper_poll_fini() code into a common helper function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_probe_helper.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helpe

[Freedreno] [PATCH v1 6/7] drm/omap: stop using drm_bridge_connector_en/disable_hpd()

2022-04-29 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/omapdrm/omap_drv.c | 41 --

[Freedreno] [PATCH v1 7/7] drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()

2022-04-29 Thread Dmitry Baryshkov
Now as all drivers stopped calling drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() it is safe to remove them complelely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 25 - include/drm/drm_bridge_connector.h | 2

[Freedreno] [PATCH v1 5/7] drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()

2022-04-29 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 -- 1 file changed, 2 deletions(-)

[Freedreno] [RFC PATCH 0/4] drm/msm/dp: implement HPD notifications handling

2022-04-29 Thread Dmitry Baryshkov
USB altmodes code would send OOB notifications to the drm_connector specified in the device tree. However as the MSM DP driver uses drm_bridge_connector, there is no way to receive these event directly. Implement a bridge between oob_hotplug_event and drm_bridge's hpd_notify and use it to deliver a

[Freedreno] [RFC PATCH 2/4] drm: Add HPD state to drm_connector_oob_hotplug_event()

2022-04-29 Thread Dmitry Baryshkov
From: Bjorn Andersson In some implementations, such as the Qualcomm platforms, the display driver has no way to query the current HPD state and as such it's impossible to distinguish between disconnect and attention events. Add a parameter to drm_connector_oob_hotplug_event() to pass the HPD sta

[Freedreno] [RFC PATCH 3/4] drm/bridge_connector: implement oob_hotplug_event

2022-04-29 Thread Dmitry Baryshkov
Implement the oob_hotplug_event() callback. Translate it to the the HPD notification sent to the HPD bridge in the chain. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/drm_bridge_connec

[Freedreno] [RFC PATCH 1/4] drm/bridge_connector: stop filtering events in drm_bridge_connector_hpd_cb()

2022-04-29 Thread Dmitry Baryshkov
In some cases the bridge drivers would like to receive hotplug events even in the case new status is equal to the old status. In the DP case this is used to deliver "attention" messages to the DP host. Stop filtering the events in the drm_bridge_connector_hpd_cb() and let drivers decide whether the

[Freedreno] [RFC PATCH 4/4] drm/msm/dp: Implement hpd_notify()

2022-04-29 Thread Dmitry Baryshkov
From: Bjorn Andersson The Qualcomm DisplayPort driver contains traces of the necessary plumbing to hook up USB HPD, in the form of the dp_hpd module and the dp_usbpd_cb struct. Use this as basis for implementing the hpd_notify() callback, by amending the dp_hpd module with the missing logic. Ove

[Freedreno] [RFC PATCH v2 0/5] drm/msm/dp: implement HPD notifications handling

2022-04-29 Thread Dmitry Baryshkov
USB altmodes code would send OOB notifications to the drm_connector specified in the device tree. However as the MSM DP driver uses drm_bridge_connector, there is no way to receive these event directly. Implement a bridge between oob_hotplug_event and drm_bridge's hpd_notify and use it to deliver a

[Freedreno] [RFC PATCH v2 1/5] drm/bridge_connector: stop filtering events in drm_bridge_connector_hpd_cb()

2022-04-29 Thread Dmitry Baryshkov
In some cases the bridge drivers would like to receive hotplug events even in the case new status is equal to the old status. In the DP case this is used to deliver "attention" messages to the DP host. Stop filtering the events in the drm_bridge_connector_hpd_cb() and let drivers decide whether the

[Freedreno] [RFC PATCH v2 3/5] drm/bridge_connector: implement oob_hotplug_event

2022-04-29 Thread Dmitry Baryshkov
Implement the oob_hotplug_event() callback. Translate it to the the HPD notification sent to the HPD bridge in the chain. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/drm_bridge_connec

[Freedreno] [RFC PATCH v2 2/5] drm: Add HPD state to drm_connector_oob_hotplug_event()

2022-04-29 Thread Dmitry Baryshkov
From: Bjorn Andersson In some implementations, such as the Qualcomm platforms, the display driver has no way to query the current HPD state and as such it's impossible to distinguish between disconnect and attention events. Add a parameter to drm_connector_oob_hotplug_event() to pass the HPD sta

[Freedreno] [RFC PATCH v2 5/5] drm/msm/dp: Implement hpd_notify()

2022-04-29 Thread Dmitry Baryshkov
From: Bjorn Andersson The Qualcomm DisplayPort driver contains traces of the necessary plumbing to hook up USB HPD, in the form of the dp_hpd module and the dp_usbpd_cb struct. Use this as basis for implementing the hpd_notify() callback, by amending the dp_hpd module with the missing logic. Ove

[Freedreno] [RFC PATCH v2 4/5] drm/msm/dp: remove most of usbpd-related remains

2022-04-29 Thread Dmitry Baryshkov
Remove most of remains of downstream usbpd code. Mainline kernel uses different approach for managing Type-C / USB-PD, so this remains unused. Do not touch usbpd callbacks for now, since they look usefull enough as an example of how to handle connect/disconnect (to be rewritten into . Signed-off-b

Re: [Freedreno] [RFC PATCH 0/4] drm/msm/dp: implement HPD notifications handling

2022-04-29 Thread Abhinav Kumar
Adding kuogee here to keep him in the loop. We will also review/test these. Thanks Abhinav On 4/29/2022 12:29 PM, Dmitry Baryshkov wrote: USB altmodes code would send OOB notifications to the drm_connector specified in the device tree. However as the MSM DP driver uses drm_bridge_connector, t

Re: [Freedreno] [RFC PATCH v2 0/5] drm/msm/dp: implement HPD notifications handling

2022-04-29 Thread Abhinav Kumar
Adding kuogee to keep him in the loop to review/test these. Thanks Abhinav On 4/29/2022 12:57 PM, Dmitry Baryshkov wrote: USB altmodes code would send OOB notifications to the drm_connector specified in the device tree. However as the MSM DP driver uses drm_bridge_connector, there is no way to

[Freedreno] [PATCH v2] MAINTAINERS: Add Dmitry as MSM DRM driver co-maintainer

2022-04-29 Thread Dmitry Baryshkov
For the past several releases I have been assisting Rob by writing, collecting, testing and integrating patches for non-GPU and non-core parts of MSM DRM driver, while Rob is more interested in improving the GPU-related part. Let's note this in the MAINTAINERS file. While we are at it, per Rob's s

Re: [Freedreno] [PATCH v2] MAINTAINERS: Add Dmitry as MSM DRM driver co-maintainer

2022-04-29 Thread Rob Clark
On Fri, Apr 29, 2022 at 2:53 PM Dmitry Baryshkov wrote: > > For the past several releases I have been assisting Rob by writing, > collecting, testing and integrating patches for non-GPU and non-core > parts of MSM DRM driver, while Rob is more interested in improving the > GPU-related part. Let's

[Freedreno] [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

2022-04-29 Thread Douglas Anderson
Due to a subtle typo, instead of commit 87ffea09470d ("device property: Introduce fwnode_for_each_parent_node()") being a no-op change, it ended up causing the display on my sc7180-trogdor-lazor device from coming up unless I added "fw_devlink=off" to my kernel command line. Fix the typo. Fixes: 8

[Freedreno] [PATCH] drm/msm/dpu: Clean up CRC debug logs

2022-04-29 Thread Jessica Zhang
Currently, dpu_hw_lm_collect_misr returns EINVAL if CRC is disabled. This causes a lot of spam in the DRM debug logs as it's called for every vblank. Instead of returning EINVAL when CRC is disabled in dpu_hw_lm_collect_misr, let's return ENODATA and add an extra ENODATA check before the debug log

Re: [Freedreno] [PATCH] drm/msm/dpu: Clean up CRC debug logs

2022-04-29 Thread Abhinav Kumar
Hi Jessica Please add reported by for dmitry and suggested-by for Rob. Thanks Abhinav On 4/29/2022 5:39 PM, Jessica Zhang wrote: Currently, dpu_hw_lm_collect_misr returns EINVAL if CRC is disabled. This causes a lot of spam in the DRM debug logs as it's called for every vblank. Instead of re

[Freedreno] [PATCH v2] drm/msm/dpu: Clean up CRC debug logs

2022-04-29 Thread Jessica Zhang
Currently, dpu_hw_lm_collect_misr returns EINVAL if CRC is disabled. This causes a lot of spam in the DRM debug logs as it's called for every vblank. Instead of returning EINVAL when CRC is disabled in dpu_hw_lm_collect_misr, let's return ENODATA and add an extra ENODATA check before the debug log