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

2022-09-12 Thread Dmitry Baryshkov
On Mon, 12 Sept 2022 at 11:51, Tomi Valkeinen
 wrote:
>
> Hi,
>
> On 29/04/2022 21:51, Dmitry Baryshkov wrote:
> >  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 additional drm_connector helper funcs: enable_hpd() and
> > disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
> > is the time where the drm_bridge_connector's functions are called by the
> > drivers too).
>
> 09077bc3116581f4d1cb961ec359ad56586e370b ("drm/bridge_connector: enable
> HPD by default if supported") was merged in March, but I think that one
> is  bit broken
> (https://lore.kernel.org/all/a28a4858-c66a-6737-a9fc-502f591ba...@ideasonboard.com/).
> To get omapdrm work without WARNs we could just revert that commit, but
> I think this series makes things cleaner.
>
> There's one small problem with this series: in drm_bridge_connector.c
> the drm_bridge_hpd_disable() function is called from
> _drm_bridge_connector_disable_hpd() and from
> drm_bridge_connector_destroy(). This causes two hpd_disable calls when
> removing the driver modules. I think the call from
> drm_bridge_connector_destroy() could be removed, as
> _drm_bridge_connector_disable_hpd() should always get called when
> removing the drivers.
>
> Dmitry, are you still interested in this series? Can you rebase on top
> of current upstream, and revert 09077bc3116581f4d1cb961ec359ad56586e370b
> first?

Hi, I've been a bit reluctant to continue this work after the
mentioned commit got merged. However of course I can update & resend
this patch series.

-- 
With best wishes
Dmitry


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

2022-09-12 Thread Tomi Valkeinen

Hi,

On 29/04/2022 21:51, Dmitry Baryshkov wrote:

 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 additional drm_connector helper funcs: enable_hpd() and
disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
is the time where the drm_bridge_connector's functions are called by the
drivers too).


09077bc3116581f4d1cb961ec359ad56586e370b ("drm/bridge_connector: enable 
HPD by default if supported") was merged in March, but I think that one 
is  bit broken 
(https://lore.kernel.org/all/a28a4858-c66a-6737-a9fc-502f591ba...@ideasonboard.com/). 
To get omapdrm work without WARNs we could just revert that commit, but 
I think this series makes things cleaner.


There's one small problem with this series: in drm_bridge_connector.c 
the drm_bridge_hpd_disable() function is called from 
_drm_bridge_connector_disable_hpd() and from 
drm_bridge_connector_destroy(). This causes two hpd_disable calls when 
removing the driver modules. I think the call from 
drm_bridge_connector_destroy() could be removed, as 
_drm_bridge_connector_disable_hpd() should always get called when 
removing the drivers.


Dmitry, are you still interested in this series? Can you rebase on top 
of current upstream, and revert 09077bc3116581f4d1cb961ec359ad56586e370b 
first?


 Tomi


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

2022-05-12 Thread Dmitry Baryshkov

On 29/04/2022 21:51, Dmitry Baryshkov wrote:

 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 additional drm_connector helper funcs: enable_hpd() and
disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
is the time where the drm_bridge_connector's functions are called by the
drivers too).


Gracious ping regarding this series. It went for two weeks w/o review.

Few additional points 'pro':
- It makes it possible to handle hpd enablement in cases where the 
driver uses a mixture of drm_bridge_connector and old connectors (msm)
- It makes it possible for other connectors to also implement dynamic 
hpd enablement/disablement in a standard way




Dmitry Baryshkov (7):
   drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
   drm/probe-helper: enable and disable HPD on connectors
   drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
   drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
   drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
   drm/omap: stop using drm_bridge_connector_en/disable_hpd()
   drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()

  drivers/gpu/drm/drm_bridge_connector.c   | 23 +++--
  drivers/gpu/drm/drm_probe_helper.c   | 40 ++-
  drivers/gpu/drm/imx/dcss/dcss-dev.c  |  4 ---
  drivers/gpu/drm/imx/dcss/dcss-kms.c  |  4 ---
  drivers/gpu/drm/msm/hdmi/hdmi.c  |  2 --
  drivers/gpu/drm/omapdrm/omap_drv.c   | 41 
  include/drm/drm_bridge_connector.h   |  2 --
  include/drm/drm_modeset_helper_vtables.h | 22 +
  8 files changed, 58 insertions(+), 80 deletions(-)




--
With best wishes
Dmitry


[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 additional drm_connector helper funcs: enable_hpd() and
disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
is the time where the drm_bridge_connector's functions are called by the
drivers too).

Dmitry Baryshkov (7):
  drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
  drm/probe-helper: enable and disable HPD on connectors
  drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
  drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
  drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
  drm/omap: stop using drm_bridge_connector_en/disable_hpd()
  drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()

 drivers/gpu/drm/drm_bridge_connector.c   | 23 +++--
 drivers/gpu/drm/drm_probe_helper.c   | 40 ++-
 drivers/gpu/drm/imx/dcss/dcss-dev.c  |  4 ---
 drivers/gpu/drm/imx/dcss/dcss-kms.c  |  4 ---
 drivers/gpu/drm/msm/hdmi/hdmi.c  |  2 --
 drivers/gpu/drm/omapdrm/omap_drv.c   | 41 
 include/drm/drm_bridge_connector.h   |  2 --
 include/drm/drm_modeset_helper_vtables.h | 22 +
 8 files changed, 58 insertions(+), 80 deletions(-)

-- 
2.35.1