]> Git Repo - linux.git/commitdiff
Merge tag 'du-next-20210105' of git://linuxtv.org/pinchartl/media into drm-next
authorDaniel Vetter <[email protected]>
Thu, 7 Jan 2021 12:02:56 +0000 (13:02 +0100)
committerDaniel Vetter <[email protected]>
Thu, 7 Jan 2021 12:02:57 +0000 (13:02 +0100)
- Add default modes for connectors in unknown state
- R-Car DU conversion to DRM-managed API
- R-Car DU miscellaneous fixes
- Miscellaneous bridge and bridge bindings fixes
- Assorted misc driver cleanups
- Constify drm_driver for PCI devices

Signed-off-by: Daniel Vetter <[email protected]>
From: Laurent Pinchart <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/X/[email protected]
1  2 
Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/kmb/kmb_drv.c
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
include/drm/drm_modeset_helper_vtables.h

index 3d5ce08a5792726e71dea33154939237726d0023,fedd3460d6f6134255230a814bb1bf2a3884c1ef..ac5a3a673a18ab58c4250e143996b8de830c3844
@@@ -30,11 -30,17 +30,17 @@@ properties
        This device has four video ports. Their connections are modeled using the
        OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
  
-       The device can operate in single-link mode or dual-link mode. In
-       single-link mode, all pixels are received on port@0, and port@1 shall not
-       contain any endpoint. In dual-link mode, even-numbered pixels are
-       received on port@0 and odd-numbered pixels on port@1, and both port@0 and
-       port@1 shall contain endpoints.
+       The device can operate in single or dual input and output modes.
+       When operating in single input mode, all pixels are received on port@0,
+       and port@1 shall not contain any endpoint. In dual input mode,
+       even-numbered pixels are received on port@0 and odd-numbered pixels on
+       port@1, and both port@0 and port@1 shall contain endpoints.
+       When operating in single output mode all pixels are output from the first
+       CMOS/TTL port and port@3 shall not contain any endpoint. In dual output
+       mode pixels are output from both CMOS/TTL ports and both port@2 and
+       port@3 shall contain endpoints.
  
      properties:
        '#address-cells':
@@@ -74,6 -80,7 +80,6 @@@
      description: Power down GPIO signal, pin name "/PDWN", active low.
  
    vcc-supply:
 -    maxItems: 1
      description:
        Power supply for the TTL output, TTL CLOCKOUT signal, LVDS input, PLL and
        digital circuitry.
index ddf7eabdbf3bbc399a8f0064b4210ed094b49b0b,3f57e880685e5a00dd24173cd468ac2988f77ce2..d384a5b8119f72d57449af273ebe88971f52d6f7
@@@ -589,11 -589,7 +589,7 @@@ static int drm_dev_init(struct drm_devi
  
        kref_init(&dev->ref);
        dev->dev = get_device(parent);
- #ifdef CONFIG_DRM_LEGACY
-       dev->driver = (struct drm_driver *)driver;
- #else
        dev->driver = driver;
- #endif
  
        INIT_LIST_HEAD(&dev->managed.resources);
        spin_lock_init(&dev->managed.lock);
@@@ -675,8 -671,11 +671,8 @@@ static int devm_drm_dev_init(struct dev
        if (ret)
                return ret;
  
 -      ret = devm_add_action(parent, devm_drm_dev_init_release, dev);
 -      if (ret)
 -              devm_drm_dev_init_release(dev);
 -
 -      return ret;
 +      return devm_add_action_or_reset(parent,
 +                                      devm_drm_dev_init_release, dev);
  }
  
  void *__devm_drm_dev_alloc(struct device *parent,
@@@ -894,6 -893,8 +890,6 @@@ int drm_dev_register(struct drm_device 
        if (drm_core_check_feature(dev, DRIVER_MODESET))
                drm_modeset_register_all(dev);
  
 -      ret = 0;
 -
        DRM_INFO("Initialized %s %d.%d.%d %s for %s on minor %d\n",
                 driver->name, driver->major, driver->minor,
                 driver->patchlevel, driver->date,
index 66df3aade088c3e1eff6ba7c5aed7de3878a42ad,3c49668ec946dc6921939ee9208244a452191ab7..f64e06e1067dd8d373d270b3c2ee9697cd7aa40d
@@@ -400,7 -400,7 +400,7 @@@ static void kmb_irq_reset(struct drm_de
  
  DEFINE_DRM_GEM_CMA_FOPS(fops);
  
- static struct drm_driver kmb_driver = {
+ static const struct drm_driver kmb_driver = {
        .driver_features = DRIVER_GEM |
            DRIVER_MODESET | DRIVER_ATOMIC,
        .irq_handler = kmb_isr,
@@@ -556,7 -556,7 +556,7 @@@ MODULE_DEVICE_TABLE(of, kmb_of_match)
  static int __maybe_unused kmb_pm_suspend(struct device *dev)
  {
        struct drm_device *drm = dev_get_drvdata(dev);
 -      struct kmb_drm_private *kmb = drm ? to_kmb(drm) : NULL;
 +      struct kmb_drm_private *kmb = to_kmb(drm);
  
        drm_kms_helper_poll_disable(drm);
  
index f93e0750431df4c9fcc4db4c4e18b65737e45ffa,9a099c0fe1d439e9d8397f4a665705f75f8f8974..ea7e39d03545728853df1cb03611700535ac6161
@@@ -730,13 -730,10 +730,10 @@@ static void rcar_du_crtc_atomic_enable(
         */
        if (rcdu->info->lvds_clk_mask & BIT(rcrtc->index) &&
            rstate->outputs == BIT(RCAR_DU_OUTPUT_DPAD0)) {
-               struct rcar_du_encoder *encoder =
-                       rcdu->encoders[RCAR_DU_OUTPUT_LVDS0 + rcrtc->index];
+               struct drm_bridge *bridge = rcdu->lvds[rcrtc->index];
                const struct drm_display_mode *mode =
                        &crtc->state->adjusted_mode;
-               struct drm_bridge *bridge;
  
-               bridge = drm_bridge_chain_get_first_bridge(&encoder->base);
                rcar_lvds_clk_enable(bridge, mode->clock * 1000);
        }
  
@@@ -764,15 -761,12 +761,12 @@@ static void rcar_du_crtc_atomic_disable
  
        if (rcdu->info->lvds_clk_mask & BIT(rcrtc->index) &&
            rstate->outputs == BIT(RCAR_DU_OUTPUT_DPAD0)) {
-               struct rcar_du_encoder *encoder =
-                       rcdu->encoders[RCAR_DU_OUTPUT_LVDS0 + rcrtc->index];
-               struct drm_bridge *bridge;
+               struct drm_bridge *bridge = rcdu->lvds[rcrtc->index];
  
                /*
                 * Disable the LVDS clock output, see
                 * rcar_du_crtc_atomic_enable().
                 */
-               bridge = drm_bridge_chain_get_first_bridge(&encoder->base);
                rcar_lvds_clk_disable(bridge);
        }
  
@@@ -1144,6 -1138,7 +1138,6 @@@ static const struct drm_crtc_funcs crtc
        .set_crc_source = rcar_du_crtc_set_crc_source,
        .verify_crc_source = rcar_du_crtc_verify_crc_source,
        .get_crc_sources = rcar_du_crtc_get_crc_sources,
 -      .gamma_set = drm_atomic_helper_legacy_gamma_set,
  };
  
  /* -----------------------------------------------------------------------------
@@@ -1256,7 -1251,7 +1250,7 @@@ int rcar_du_crtc_create(struct rcar_du_
        else
                primary = &rgrp->planes[swindex % 2].plane;
  
-       ret = drm_crtc_init_with_planes(rcdu->ddev, crtc, primary, NULL,
+       ret = drm_crtc_init_with_planes(&rcdu->ddev, crtc, primary, NULL,
                                        rcdu->info->gen <= 2 ?
                                        &crtc_funcs_gen2 : &crtc_funcs_gen3,
                                        NULL);
index cbe613858a93e909ebea27bdb8b12ade4af51689,0d184d526a22e7f4d5e0a8e2a6cac445b854761a..eb706342861d4dd8eb2a227d5f1407f019895cb7
@@@ -866,12 -866,18 +866,18 @@@ struct drm_connector_helper_funcs 
         * The usual way to implement this is to cache the EDID retrieved in the
         * probe callback somewhere in the driver-private connector structure.
         * In this function drivers then parse the modes in the EDID and add
-        * them by calling drm_add_edid_modes(). But connectors that driver a
+        * them by calling drm_add_edid_modes(). But connectors that drive a
         * fixed panel can also manually add specific modes using
         * drm_mode_probed_add(). Drivers which manually add modes should also
         * make sure that the &drm_connector.display_info,
         * &drm_connector.width_mm and &drm_connector.height_mm fields are
         * filled in.
+        *
+        * Note that the caller function will automatically add standard VESA
+        * DMT modes up to 1024x768 if the .get_modes() helper operation returns
+        * no mode and if the connector status is connector_status_connected or
+        * connector_status_unknown. There is no need to call
+        * drm_add_modes_noedid() manually in that case.
         *
         * Virtual drivers that just want some standard VESA mode with a given
         * resolution can call drm_add_modes_noedid(), and mark the preferred
@@@ -1395,27 -1401,6 +1401,27 @@@ struct drm_mode_config_helper_funcs 
         * drm_atomic_helper_commit_tail().
         */
        void (*atomic_commit_tail)(struct drm_atomic_state *state);
 +
 +      /**
 +       * @atomic_commit_setup:
 +       *
 +       * This hook is used by the default atomic_commit() hook implemented in
 +       * drm_atomic_helper_commit() together with the nonblocking helpers (see
 +       * drm_atomic_helper_setup_commit()) to extend the DRM commit setup. It
 +       * is not used by the atomic helpers.
 +       *
 +       * This function is called at the end of
 +       * drm_atomic_helper_setup_commit(), so once the commit has been
 +       * properly setup across the generic DRM object states. It allows
 +       * drivers to do some additional commit tracking that isn't related to a
 +       * CRTC, plane or connector, tracked in a &drm_private_obj structure.
 +       *
 +       * Note that the documentation of &drm_private_obj has more details on
 +       * how one should implement this.
 +       *
 +       * This hook is optional.
 +       */
 +      int (*atomic_commit_setup)(struct drm_atomic_state *state);
  };
  
  #endif
This page took 0.093024 seconds and 4 git commands to generate.