1. 24 6月, 2020 1 次提交
  2. 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
  3. 10 10月, 2019 1 次提交
    • R
      drm/bridge: sil_sii8620: make remote control optional. · 710abfe8
      Ronald Tschalär 提交于
      commit d6abe6df ("drm/bridge: sil_sii8620: do not have a dependency
      of RC_CORE") changed the driver to select both RC_CORE and INPUT.
      However, this causes problems with other drivers, in particular an input
      driver that depends on MFD_INTEL_LPSS_PCI (to be added in a separate
      commit):
      
        drivers/clk/Kconfig:9:error: recursive dependency detected!
        drivers/clk/Kconfig:9:        symbol COMMON_CLK is selected by MFD_INTEL_LPSS
        drivers/mfd/Kconfig:566:      symbol MFD_INTEL_LPSS is selected by MFD_INTEL_LPSS_PCI
        drivers/mfd/Kconfig:580:      symbol MFD_INTEL_LPSS_PCI is implied by KEYBOARD_APPLESPI
        drivers/input/keyboard/Kconfig:73:    symbol KEYBOARD_APPLESPI depends on INPUT
        drivers/input/Kconfig:8:      symbol INPUT is selected by DRM_SIL_SII8620
        drivers/gpu/drm/bridge/Kconfig:83:    symbol DRM_SIL_SII8620 depends on DRM_BRIDGE
        drivers/gpu/drm/bridge/Kconfig:1:     symbol DRM_BRIDGE is selected by DRM_PL111
        drivers/gpu/drm/pl111/Kconfig:1:      symbol DRM_PL111 depends on COMMON_CLK
      
      According to the docs and general consensus, select should only be used
      for non user-visible symbols, but both RC_CORE and INPUT are
      user-visible. Furthermore almost all other references to INPUT
      throughout the kernel config are depends, not selects. For this reason
      the first part of this change reverts the commit.
      
      In order to address the original reason for the commit, namely
      that not all boards use the remote controller functionality and hence
      should not need have to deal with RC_CORE, the second part of this
      change now makes the remote control support in the driver optional and
      contingent on RC_CORE being defined. And with this the hard dependency
      on INPUT also goes away as that is only needed if RC_CORE is defined
      (which in turn already depends on INPUT).
      
      CC: Inki Dae <inki.dae@samsung.com>
      CC: Andrzej Hajda <a.hajda@samsung.com>
      CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NRonald Tschalär <ronald@innovation.ch>
      Reviewed-by: NAndrzej Hajda <a.hajda@samsung.com>
      [a.hajda: applied fixup provided by Arnd Bergmann]
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190419081926.13567-2-ronald@innovation.ch
      710abfe8
  4. 29 8月, 2019 1 次提交
  5. 19 6月, 2019 1 次提交
  6. 11 1月, 2019 1 次提交
    • V
      drm/edid: Pass connector to AVI infoframe functions · 13d0add3
      Ville Syrjälä 提交于
      Make life easier for drivers by simply passing the connector
      to drm_hdmi_avi_infoframe_from_display_mode() and
      drm_hdmi_avi_infoframe_quant_range(). That way drivers don't
      need to worry about is_hdmi2_sink mess.
      
      v2: Make is_hdmi2_sink() return true for sil-sii8620
          Adapt to omap/vc4 changes
      
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: CK Hu <ck.hu@mediatek.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Sandy Huang <hjc@rock-chips.com>
      Cc: "Heiko Stübner" <heiko@sntech.de>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Ilia Mirkin <imirkin@alum.mit.edu>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: linux-arm-msm@vger.kernel.org
      Cc: freedreno@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: linux-tegra@vger.kernel.org
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190108172828.15184-1-ville.syrjala@linux.intel.com
      13d0add3
  7. 04 7月, 2018 3 次提交
  8. 21 6月, 2018 1 次提交
  9. 13 6月, 2018 7 次提交
  10. 12 3月, 2018 1 次提交
  11. 23 11月, 2017 1 次提交
    • V
      drm/edid: Allow HDMI infoframe without VIC or S3D · f1781e9b
      Ville Syrjälä 提交于
      Appedix F of HDMI 2.0 says that some HDMI sink may fail to switch from
      3D to 2D mode in a timely fashion if the source simply stops sending the
      HDMI infoframe. The suggested workaround is to keep sending the
      infoframe even when strictly not necessary (ie. no VIC and no S3D).
      HDMI 1.4 does allow for this behaviour, stating that sending the
      infoframe is optional in this case.
      
      The infoframe was first specified in HDMI 1.4, so in theory sinks
      predating that may not appreciate us sending an uknown infoframe
      their way. To avoid regressions let's try to determine if the sink
      supports the infoframe or not. Unfortunately there's no direct way
      to do that, so instead we'll just check if we managed to parse any
      HDMI 1.4 4k or stereo modes from the EDID, and if so we assume the
      sink will accept the infoframe. Also if the EDID contains the HDMI
      2.0 HDMI Forum VSDB we can assume the sink is prepared to receive
      the infoframe.
      
      v2: Fix getting has_hdmi_infoframe from display_info
          Always fail constructing the infoframe if the display
          possibly can't handle it
      
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NShashank Sharma <shashank.sharma@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171113170427.4150-3-ville.syrjala@linux.intel.com
      f1781e9b
  12. 16 11月, 2017 2 次提交
  13. 11 10月, 2017 1 次提交
  14. 25 8月, 2017 1 次提交
  15. 24 2月, 2017 1 次提交
  16. 02 2月, 2017 16 次提交