1. 27 4月, 2022 1 次提交
  2. 13 11月, 2020 1 次提交
  3. 11 7月, 2020 2 次提交
    • L
      drm/bridge: dw-hdmi: Always add the bridge in the global bridge list · 0bf4f5b5
      Liu Ying 提交于
      It doesn't hurt to add the bridge in the global bridge list also for
      platform specific dw-hdmi drivers which are based on the component
      framework.  This can be achieved by moving the drm_bridge_add() function
      call from dw_hdmi_probe() to __dw_hdmi_probe().  A counterpart movement
      for drm_bridge_remove() is also needed then.  Moreover, since drm_bridge_add()
      initializes &bridge->hpd_mutex, this may help those platform specific
      dw-hdmi drivers(based on the component framework) avoid accessing the
      uninitialized mutex in drm_bridge_hpd_notify() which is called in
      dw_hdmi_irq().  Putting drm_bridge_add() in __dw_hdmi_probe() just before
      it returns successfully should bring no logic change for platforms based
      on the DRM bridge API, which is a good choice from safety point of view.
      Also, __dw_hdmi_probe() is renamed to dw_hdmi_probe() since dw_hdmi_probe()
      does nothing else but calling __dw_hdmi_probe().  Similar renaming applies
      to the __dw_hdmi_remove()/dw_hdmi_remove() pair.
      
      Fixes: ec971aaa ("drm: bridge: dw-hdmi: Make connector creation optional")
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
      Cc: Jonas Karlman <jonas@kwiboo.se>
      Cc: Jernej Skrabec <jernej.skrabec@siol.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Boris Brezillon <boris.brezillon@collabora.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Cheng-Yi Chiang <cychiang@chromium.org>
      Cc: Dariusz Marcinkiewicz <darekm@google.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: dri-devel@lists.freedesktop.org
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Signed-off-by: NLiu Ying <victor.liu@nxp.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/1594260156-8316-2-git-send-email-victor.liu@nxp.com
      0bf4f5b5
    • L
      drm/bridge: dw-hdmi: Don't cleanup i2c adapter and ddc ptr in __dw_hdmi_probe() bailout path · 2ae53e79
      Liu Ying 提交于
      It's unnecessary to cleanup the i2c adapter and the ddc pointer in
      the bailout path of  __dw_hdmi_probe(), since the adapter is not
      added and the ddc pointer is not set.
      
      Fixes: a23d6265 ("drm: bridge: dw-hdmi: Extract PHY interrupt setup to a function")
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
      Cc: Jonas Karlman <jonas@kwiboo.se>
      Cc: Jernej Skrabec <jernej.skrabec@siol.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Boris Brezillon <boris.brezillon@collabora.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Cheng-Yi Chiang <cychiang@chromium.org>
      Cc: Dariusz Marcinkiewicz <darekm@google.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Signed-off-by: NLiu Ying <victor.liu@nxp.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/1594260156-8316-1-git-send-email-victor.liu@nxp.com
      2ae53e79
  4. 24 6月, 2020 12 次提交
  5. 25 3月, 2020 3 次提交
  6. 10 3月, 2020 5 次提交
  7. 06 3月, 2020 1 次提交
  8. 26 2月, 2020 1 次提交
    • L
      drm/bridge: Extend bridge API to disable connector creation · a25b988f
      Laurent Pinchart 提交于
      Most bridge drivers create a DRM connector to model the connector at the
      output of the bridge. This model is historical and has worked pretty
      well so far, but causes several issues:
      
      - It prevents supporting more complex display pipelines where DRM
      connector operations are split over multiple components. For instance a
      pipeline with a bridge connected to the DDC signals to read EDID data,
      and another one connected to the HPD signal to detect connection and
      disconnection, will not be possible to support through this model.
      
      - It requires every bridge driver to implement similar connector
      handling code, resulting in code duplication.
      
      - It assumes that a bridge will either be wired to a connector or to
      another bridge, but doesn't support bridges that can be used in both
      positions very well (although there is some ad-hoc support for this in
      the analogix_dp bridge driver).
      
      In order to solve these issues, ownership of the connector should be
      moved to the display controller driver (where it can be implemented
      using helpers provided by the core).
      
      Extend the bridge API to allow disabling connector creation in bridge
      drivers as a first step towards the new model. The new flags argument to
      the bridge .attach() operation allows instructing the bridge driver to
      skip creating a connector. Unconditionally set the new flags argument to
      0 for now to keep the existing behaviour, and modify all existing bridge
      drivers to return an error when connector creation is not requested as
      they don't support this feature yet.
      
      The change is based on the following semantic patch, with manual review
      and edits.
      
      @ rule1 @
      identifier funcs;
      identifier fn;
      @@
       struct drm_bridge_funcs funcs = {
       	...,
       	.attach = fn
       };
      
      @ depends on rule1 @
      identifier rule1.fn;
      identifier bridge;
      statement S, S1;
      @@
       int fn(
       	struct drm_bridge *bridge
      +	, enum drm_bridge_attach_flags flags
       )
       {
       	... when != S
      +	if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
      +		DRM_ERROR("Fix bridge driver to make connector optional!");
      +		return -EINVAL;
      +	}
      +
       	S1
       	...
       }
      
      @ depends on rule1 @
      identifier rule1.fn;
      identifier bridge, flags;
      expression E1, E2, E3;
      @@
       int fn(
       	struct drm_bridge *bridge,
       	enum drm_bridge_attach_flags flags
       ) {
       <...
       drm_bridge_attach(E1, E2, E3
      +	, flags
       )
       ...>
       }
      
      @@
      expression E1, E2, E3;
      @@
       drm_bridge_attach(E1, E2, E3
      +	, 0
       )
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Tested-by: NSebastian Reichel <sebastian.reichel@collabora.com>
      Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-10-laurent.pinchart@ideasonboard.com
      a25b988f
  9. 29 10月, 2019 1 次提交
  10. 15 10月, 2019 1 次提交
  11. 10 10月, 2019 1 次提交
  12. 07 10月, 2019 1 次提交
  13. 13 9月, 2019 1 次提交
  14. 29 8月, 2019 1 次提交
  15. 20 8月, 2019 1 次提交
  16. 16 8月, 2019 1 次提交
  17. 14 8月, 2019 3 次提交
  18. 31 7月, 2019 1 次提交
  19. 01 7月, 2019 1 次提交
  20. 12 6月, 2019 1 次提交
    • D
      drm: bridge: dw-hdmi: Add hook for resume · 99d02ed5
      Douglas Anderson 提交于
      On Rockchip rk3288-based Chromebooks when you do a suspend/resume
      cycle:
      
      1. You lose the ability to detect an HDMI device being plugged in.
      
      2. If you're using the i2c bus built in to dw_hdmi then it stops
      working.
      
      Let's add a hook to the core dw-hdmi driver so that we can call it in
      dw_hdmi-rockchip in the next commit.
      
      NOTE: the exact set of steps I've done here in resume come from
      looking at the normal dw_hdmi init sequence in upstream Linux plus the
      sequence that we did in downstream Chrome OS 3.14.  Testing show that
      it seems to work, but if an extra step is needed or something here is
      not needed we could improve it.
      
      As part of this change we'll refactor the hardware init bits of
      dw-hdmi to happen all in one function and all at the same time.  Since
      we need to init the interrupt mutes before we request the IRQ, this
      means moving the hardware init earlier in the function, but there
      should be no problems with that.  Also as part of this we now
      unconditionally init the "i2c" parts of dw-hdmi, but again that ought
      to be fine.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190604204207.168085-1-dianders@chromium.org
      99d02ed5