1. 11 2月, 2020 2 次提交
  2. 06 2月, 2020 1 次提交
  3. 05 2月, 2020 1 次提交
  4. 31 1月, 2020 4 次提交
    • B
      drm/bridge: Add the necessary bits to support bus format negotiation · f32df58a
      Boris Brezillon 提交于
      drm_bridge_state is extended to describe the input and output bus
      configurations. These bus configurations are exposed through the
      drm_bus_cfg struct which encodes the configuration of a physical
      bus between two components in an output pipeline, usually between
      two bridges, an encoder and a bridge, or a bridge and a connector.
      
      The bus configuration is stored in drm_bridge_state separately for
      the input and output buses, as seen from the point of view of each
      bridge. The bus configuration of a bridge output is usually identical
      to the configuration of the next bridge's input, but may differ if
      the signals are modified between the two bridges, for instance by an
      inverter on the board. The input and output configurations of a
      bridge may differ if the bridge modifies the signals internally,
      for instance by performing format conversion, or*modifying signals
      polarities.
      
      Bus format negotiation is automated by the core, drivers just have
      to implement the ->atomic_get_{output,input}_bus_fmts() hooks if they
      want to take part to this negotiation. Negotiation happens in reverse
      order, starting from the last element of the chain (the one directly
      connected to the display) up to the first element of the chain (the one
      connected to the encoder).
      During this negotiation all supported formats are tested until we find
      one that works, meaning that the formats array should be in decreasing
      preference order (assuming the driver has a preference order).
      
      Note that the bus format negotiation works even if some elements in the
      chain don't implement the ->atomic_get_{output,input}_bus_fmts() hooks.
      In that case, the core advertises only MEDIA_BUS_FMT_FIXED and lets
      the previous bridge element decide what to do (most of the time, bridge
      drivers will pick a default bus format or extract this piece of
      information from somewhere else, like a FW property).
      
      v10:
      * Add changelog to the commit message
      
      v9:
      * No changes
      
      v8:
      * Fix a test in drm_atomic_bridge_chain_select_bus_fmts() (Reported by
        Jonas)
      
      v7:
      * Adapt the code to deal with the fact that not all bridges in the
        chain have a bridge state
      
      v5 -> v6:
      * No changes
      
      v4:
      * Enhance the doc
      * Fix typos
      * Rename some parameters/fields
      * Reword the commit message
      
      v3:
      * Fix the commit message (Reported by Laurent)
      * Document the fact that bus formats should not be directly modified by
        drivers (Suggested by Laurent)
      * Document the fact that format order matters (Suggested by Laurent)
      * Propagate bus flags by default
      * Document the fact that drivers can tweak bus flags if needed
      * Let ->atomic_get_{output,input}_bus_fmts() allocate the bus format
        array (Suggested by Laurent)
      * Add a drm_atomic_helper_bridge_propagate_bus_fmt()
      * Mandate that bridge drivers return accurate input_fmts even if they
        are known to be the first element in the bridge chain
      
      v2:
      * Rework things to support more complex use cases
      Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      [narmstrong: fixed doc in include/drm/drm_bridge.h:69 fmt->format]
      Reviewed-by: NJernej Skrabec <jernej.skrabec@siol.net>
      Tested-by: NJonas Karlman <jonas@kwiboo.se>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-7-boris.brezillon@collabora.com
      f32df58a
    • B
      drm/bridge: Add an ->atomic_check() hook · 5061b8a9
      Boris Brezillon 提交于
      So that bridge drivers have a way to check/reject an atomic operation.
      The drm_atomic_bridge_chain_check() (which is just a wrapper around
      the ->atomic_check() hook) is called in place of
      drm_bridge_chain_mode_fixup() (when ->atomic_check() is not implemented,
      the core falls back on ->mode_fixup(), so the behavior should stay
      the same for existing bridge drivers).
      
      v10:
      * Add changelog to the commit message
      
      v8 -> v9:
      * No changes
      
      v7:
      * Fix a NULL pointer dereference
      
      v5 -> v6:
      * No changes
      
      v4:
      * Add R-bs
      
      v3:
      * No changes
      
      v2:
      * Clarify the fact that ->atomic_check() is replacing ->mode_fixup()
      Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Reviewed-by: NNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net>
      Tested-by: NJonas Karlman <jonas@kwiboo.se>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-6-boris.brezillon@collabora.com
      5061b8a9
    • B
      drm/bridge: Patch atomic hooks to take a drm_bridge_state · 41cf5712
      Boris Brezillon 提交于
      This way the drm_bridge_funcs interface is consistent with the rest of
      the subsystem.
      
      The drivers implementing those hooks are patched too.
      
      v10:
      * Add changelog to the commit message
      
      v8 -> v9:
      * No changes
      
      v7:
      * Adjust things to the bridge_state changes
      
      v6:
      * Also fixed rcar-du/rcar_lvds.c same as analogix/analogix_dp_core.c
      
      v5:
      * No changes
      
      v4:
      * Rename func params into old_bridge_state
      * Add Laurent's Rb
      
      v3:
      * Old state clarification moved to a separate patch
      
      v2:
      * Pass the old bridge state
      Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      [narmstrong: renamed state as old_bridge_state in rcar_lvds_atomic_disable]
      Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net>
      Tested-by: NJonas Karlman <jonas@kwiboo.se>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-5-boris.brezillon@collabora.com
      41cf5712
    • B
      drm/bridge: Add a drm_bridge_state object · 75146591
      Boris Brezillon 提交于
      One of the last remaining objects to not have its atomic state.
      
      This is being motivated by our attempt to support runtime bus-format
      negotiation between elements of the bridge chain.
      This patch just paves the road for such a feature by adding a new
      drm_bridge_state object inheriting from drm_private_obj so we can
      re-use some of the existing state initialization/tracking logic.
      
      v10:
      * Add changelog to the commit message
      
      v9:
      * Clarify the fact that the bridge->atomic_reset() and
        {connector,plane,crtc,...}->reset() semantics are different
      * Move the drm_atomic_private_obj_init() call back to
        drm_bridge_attach()
      * Check the presence of ->atomic_duplicate_state instead of
        ->atomic_reset in drm_atomic_add_encoder_bridges()
      * Fix copy&paste errors in the atomic bridge state helpers doc
      * Add A-b/R-b tags
      
      v8:
      * Move bridge state helpers out of the CONFIG_DEBUGFS section
      
      v7:
      * Move helpers, struct-defs, ... to atomic helper files to avoid the
        drm -> drm_kms_helper -> drm circular dep
      * Stop providing default implementation for atomic state reset,
        duplicate and destroy hooks (has to do with the helper/core split)
      * Drop all R-b/T-b as helpers have now be moved to other places
      
      v6:
      * Made helpers private, removed doc and moved them to satisfy dependencies
      * Renamed helpers to _default_
      
      v5:
      * Re-introduced the helpers from v4
      
      v4:
      * Fix the doc
      * Kill default helpers (inlined)
      * Fix drm_atomic_get_bridge_state() to check for an ERR_PTR()
      * Add Neil's R-b
      
      v3:
      * No changes
      
      v2:
      * Use drm_for_each_bridge_in_chain()
      * Rename helpers to be more consistent with the rest of the DRM API
      * Improve/fix the doc
      Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: NNeil Armstrong <narmstrong@baylibre.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-2-boris.brezillon@collabora.com
      75146591
  5. 30 1月, 2020 1 次提交
    • T
      drm: Initialize struct drm_crtc_state.no_vblank from device settings · 7beb691f
      Thomas Zimmermann 提交于
      At the end of a commit, atomic helpers can generate a fake VBLANK event
      automatically. Originally implemented for writeback connectors, the
      functionality can be used by any driver and/or hardware without proper
      VBLANK interrupt.
      
      The patch updates the documentation to make this behaviour official:
      settings struct drm_crtc_state.no_vblank to true enables automatic
      generation of fake VBLANK events.
      
      The new interface drm_dev_has_vblank() returns true if vblanking has
      been initialized for a device, or false otherwise. Atomic helpers use
      this function when initializing no_vblank in the CRTC state in
      drm_atomic_helper_check_modeset(). If vblanking has been initialized
      for a device, no_blank is disabled. Otherwise it's enabled. Hence,
      atomic helpers will automatically send out fake VBLANK events with any
      driver that did not initialize vblanking.
      
      v5:
      	* more precise documentation and commit message
      v4:
      	* replace drm_crtc_has_vblank() with drm_dev_has_vblank()
      	* add drm_dev_has_vblank() in this patch
      	* move driver changes into separate patches
      v3:
      	* squash all related changes patches into this patch
      Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de>
      Acked-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200129120531.6891-2-tzimmermann@suse.de
      7beb691f
  6. 29 1月, 2020 1 次提交
  7. 25 1月, 2020 3 次提交
  8. 23 1月, 2020 1 次提交
  9. 22 1月, 2020 1 次提交
  10. 20 1月, 2020 1 次提交
  11. 16 1月, 2020 1 次提交
  12. 13 1月, 2020 1 次提交
    • A
      drm/drm_panel: fix export of drm_panel_of_backlight, try #3 · 8d6cb2f7
      Arnd Bergmann 提交于
      Making this IS_REACHABLE() was still wrong, as that just determines
      whether the lower-level backlight code would be reachable from the panel
      driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
      the drm_panel_of_backlight is left out of drm_panel.o but the condition
      tells the driver that it is there, leading to multiple link errors such as
      
      ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
      ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
      ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
      ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
      ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
      ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
      ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
      
      Change the condition to check for whether the function was actually part
      of the drm module. This version of the patch survived a few hundred
      randconfig builds, so I have a good feeling this might be the last
      one for the export.
      
      Fixes: 4a34a9dc ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time")
      Fixes: 907aa265 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
      Fixes: 152dbdea ("drm/panel: add backlight support")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200107203231.920256-1-arnd@arndb.de
      8d6cb2f7
  13. 11 1月, 2020 1 次提交
  14. 10 1月, 2020 2 次提交
  15. 08 1月, 2020 4 次提交
  16. 07 1月, 2020 6 次提交
  17. 06 1月, 2020 1 次提交
  18. 22 12月, 2019 2 次提交
  19. 18 12月, 2019 3 次提交
  20. 17 12月, 2019 1 次提交
    • J
      drm/print: introduce new struct drm_device based logging macros · fb6c7ab8
      Jani Nikula 提交于
      Add new struct drm_device based logging macros modeled after the core
      kernel device based logging macros. These would be preferred over the
      drm printk and struct device based macros in drm code, where possible.
      
      We have existing drm specific struct device based logging functions, but
      they are too verbose to use for two main reasons:
      
       * The names are unnecessarily long, for example DRM_DEV_DEBUG_KMS().
      
       * The use of struct device over struct drm_device is too generic for
         most users, leading to an extra dereference.
      
      For example:
      
      	DRM_DEV_DEBUG_KMS(drm->dev, "Hello, world\n");
      
      vs.
      
      	drm_dbg_kms(drm, "Hello, world\n");
      
      It's a matter of taste, but the SHOUTING UPPERCASE has been argued to be
      less readable than lowercase.
      
      Some names are changed from old DRM names to be based on the core kernel
      logging functions. For example, NOTE -> notice, ERROR -> err, DEBUG ->
      dbg.
      
      Due to the conflation of DRM_DEBUG and DRM_DEBUG_DRIVER macro use
      (DRM_DEBUG is used widely in drivers though it's supposed to be a core
      debugging category), they are named as drm_dbg_core and drm_dbg,
      respectively.
      
      The drm_err and _once/_ratelimited variants no longer include the
      function name in order to be able to use the core device based logging
      macros. Arguably this is not a significant change; error messages should
      not be so common to be only distinguishable by the function name.
      
      Ratelimited debug logging macros are to be added later.
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Acked-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Acked-by: NSean Paul <sean@poorly.run>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191210123050.8799-1-jani.nikula@intel.com
      fb6c7ab8
  21. 16 12月, 2019 2 次提交