1. 01 12月, 2016 1 次提交
    • N
      drm: Add support for Amlogic Meson Graphic Controller · bbbe775e
      Neil Armstrong 提交于
      The Amlogic Meson Display controller is composed of several components :
      
      DMC|---------------VPU (Video Processing Unit)----------------|------HHI------|
         | vd1   _______     _____________    _________________     |               |
      D  |-------|      |----|            |   |                |    |   HDMI PLL    |
      D  | vd2   | VIU  |    | Video Post |   | Video Encoders |<---|-----VCLK      |
      R  |-------|      |----| Processing |   |                |    |               |
         | osd2  |      |    |            |---| Enci ----------|----|-----VDAC------|
      R  |-------| CSC  |----| Scalers    |   | Encp ----------|----|----HDMI-TX----|
      A  | osd1  |      |    | Blenders   |   | Encl ----------|----|---------------|
      M  |-------|______|----|____________|   |________________|    |               |
      ___|__________________________________________________________|_______________|
      
      VIU: Video Input Unit
      ---------------------
      
      The Video Input Unit is in charge of the pixel scanout from the DDR memory.
      It fetches the frames addresses, stride and parameters from the "Canvas" memory.
      This part is also in charge of the CSC (Colorspace Conversion).
      It can handle 2 OSD Planes and 2 Video Planes.
      
      VPP: Video Post Processing
      --------------------------
      
      The Video Post Processing is in charge of the scaling and blending of the
      various planes into a single pixel stream.
      There is a special "pre-blending" used by the video planes with a dedicated
      scaler and a "post-blending" to merge with the OSD Planes.
      The OSD planes also have a dedicated scaler for one of the OSD.
      
      VENC: Video Encoders
      --------------------
      
      The VENC is composed of the multiple pixel encoders :
       - ENCI : Interlace Video encoder for CVBS and Interlace HDMI
       - ENCP : Progressive Video Encoder for HDMI
       - ENCL : LCD LVDS Encoder
      The VENC Unit gets a Pixel Clocks (VCLK) from a dedicated HDMI PLL and clock
      tree and provides the scanout clock to the VPP and VIU.
      The ENCI is connected to a single VDAC for Composite Output.
      The ENCI and ENCP are connected to an on-chip HDMI Transceiver.
      
      This driver is a DRM/KMS driver using the following DRM components :
       - GEM-CMA
       - PRIME-CMA
       - Atomic Modesetting
       - FBDev-CMA
      
      For the following SoCs :
       - GXBB Family (S905)
       - GXL Family (S905X, S905D)
       - GXM Family (S912)
      
      The current driver only supports the CVBS PAL/NTSC output modes, but the
      CRTC/Planes management should support bigger modes.
      But Advanced Colorspace Conversion, Scaling and HDMI Modes will be added in
      a second time.
      
      The Device Tree bindings makes use of the endpoints video interface definitions
      to connect to the optional CVBS and in the future the HDMI Connector nodes.
      
      HDMI Support is planned for a next release.
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      bbbe775e
  2. 22 9月, 2016 2 次提交
  3. 29 8月, 2016 3 次提交
  4. 20 8月, 2016 1 次提交
  5. 17 8月, 2016 2 次提交
  6. 16 8月, 2016 2 次提交
  7. 29 7月, 2016 1 次提交
    • M
      drm: add generic zpos property · 44d1240d
      Marek Szyprowski 提交于
      version 8:
      - move drm_blend.o from drm-y to drm_kms_helper-y to avoid
        EXPORT_SYMBOL(drm_atomic_helper_normalize_zpos)
      - remove dead function declarations in drm_crtc.h
      
      version 7:
      - remove useless EXPORT_SYMBOL()
      - better z-order wording in Documentation
      
      version 6:
      - add zpos in gpu documentation file
      - merge Ville patch about zpos initial value and API improvement.
        I have split Ville patch between zpos core and drivers
      
      version 5:
      - remove zpos range check and comeback to 0 to N-1
        normalization algorithm
      
      version 4:
      - make sure that normalized zpos value is stay
        in the defined property range and warn user if not
      
      This patch adds support for generic plane's zpos property property with
      well-defined semantics:
      - added zpos properties to plane and plane state structures
      - added helpers for normalizing zpos properties of given set of planes
      - well defined semantics: planes are sorted by zpos values and then plane
        id value if zpos equals
      
      Normalized zpos values are calculated automatically when generic
      muttable zpos property has been initialized. Drivers can simply use
      plane_state->normalized_zpos in their atomic_check and/or plane_update
      callbacks without any additional calls to DRM core.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      
      Compare to Marek's original patch zpos property is now specific to each
      plane and no more to the core.
      Normalize function take care of the range of per plane defined range
      before set normalized_zpos.
      Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Tested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: vincent.abriou@st.com
      Cc: fabien.dessenne@st.com
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      44d1240d
  8. 10 6月, 2016 1 次提交
  9. 09 6月, 2016 1 次提交
  10. 23 5月, 2016 1 次提交
    • V
      drm: Add helper for DP++ adaptors · b3daa5ef
      Ville Syrjälä 提交于
      Add a helper which aids in the identification of DP dual mode
      (aka. DP++) adaptors. There are several types of adaptors
      specified: type 1 DVI, type 1 HDMI, type 2 DVI, type 2 HDMI
      
      Type 1 adaptors have a max TMDS clock limit of 165MHz, type 2 adaptors
      may go as high as 300MHz and they provide a register informing the
      source device what the actual limit is. Supposedly also type 1 adaptors
      may optionally implement this register. This TMDS clock limit is the
      main reason why we need to identify these adaptors.
      
      Type 1 adaptors provide access to their internal registers and the sink
      DDC bus through I2C. Type 2 adaptors provide this access both via I2C
      and I2C-over-AUX. A type 2 source device may choose to implement either
      of these methods. If a source device implements the I2C-over-AUX
      method, then the driver will obviously need specific support for such
      adaptors since the port is driven like an HDMI port, but DDC
      communication happes over the AUX channel.
      
      This helper should be enough to identify the adaptor type (some
      type 1 DVI adaptors may be a slight exception) and the maximum TMDS
      clock limit. Another feature that may be available is control over
      the TMDS output buffers on the adaptor, possibly allowing for some
      power saving when the TMDS link is down.
      
      Other user controllable features that may be available in the adaptors
      are downstream i2c bus speed control when using i2c-over-aux, and
      some control over the CEC pin. I chose not to provide any helper
      functions for those since I have no use for them in i915 at this time.
      The rest of the registers in the adaptor are mostly just information,
      eg. IEEE OUI, hardware and firmware revision, etc.
      
      v2: Pass adaptor type to helper functions to ease driver implementation
          Fix a bunch of typoes (Paulo)
          Add DRM_DP_DUAL_MODE_UNKNOWN for the case where we don't (yet) know
          the type (Paulo)
          Reject 0x00 and 0xff DP_DUAL_MODE_MAX_TMDS_CLOCK values (Paulo)
          Adjust drm_dp_dual_mode_detect() type2 vs. type1 detection to
          ease future LSPCON enabling
          Remove the unused DP_DUAL_MODE_LAST_RESERVED define
      v3: Fix kernel doc function argument descriptions (Jani)
          s/NONE/UNKNOWN/ in drm_dp_dual_mode_detect() docs
          Add kernel doc for enum drm_dp_dual_mode_type
          Actually build the docs
          Fix more typoes
      v4: Adjust code indentation of type2 adaptor detection (Shashank)
          Add debug messages for failurs cases (Shashank)
      v5: EXPORT_SYMBOL(drm_dp_dual_mode_read) (Paulo)
      
      Cc: stable@vger.kernel.org
      Cc: Tore Anderson <tore@fud.no>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> (v4)
      Link: http://patchwork.freedesktop.org/patch/msgid/1462542412-25533-1-git-send-email-ville.syrjala@linux.intel.com
      (cherry picked from commit ede53344)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      b3daa5ef
  11. 09 5月, 2016 1 次提交
    • V
      drm: Add helper for DP++ adaptors · ede53344
      Ville Syrjälä 提交于
      Add a helper which aids in the identification of DP dual mode
      (aka. DP++) adaptors. There are several types of adaptors
      specified: type 1 DVI, type 1 HDMI, type 2 DVI, type 2 HDMI
      
      Type 1 adaptors have a max TMDS clock limit of 165MHz, type 2 adaptors
      may go as high as 300MHz and they provide a register informing the
      source device what the actual limit is. Supposedly also type 1 adaptors
      may optionally implement this register. This TMDS clock limit is the
      main reason why we need to identify these adaptors.
      
      Type 1 adaptors provide access to their internal registers and the sink
      DDC bus through I2C. Type 2 adaptors provide this access both via I2C
      and I2C-over-AUX. A type 2 source device may choose to implement either
      of these methods. If a source device implements the I2C-over-AUX
      method, then the driver will obviously need specific support for such
      adaptors since the port is driven like an HDMI port, but DDC
      communication happes over the AUX channel.
      
      This helper should be enough to identify the adaptor type (some
      type 1 DVI adaptors may be a slight exception) and the maximum TMDS
      clock limit. Another feature that may be available is control over
      the TMDS output buffers on the adaptor, possibly allowing for some
      power saving when the TMDS link is down.
      
      Other user controllable features that may be available in the adaptors
      are downstream i2c bus speed control when using i2c-over-aux, and
      some control over the CEC pin. I chose not to provide any helper
      functions for those since I have no use for them in i915 at this time.
      The rest of the registers in the adaptor are mostly just information,
      eg. IEEE OUI, hardware and firmware revision, etc.
      
      v2: Pass adaptor type to helper functions to ease driver implementation
          Fix a bunch of typoes (Paulo)
          Add DRM_DP_DUAL_MODE_UNKNOWN for the case where we don't (yet) know
          the type (Paulo)
          Reject 0x00 and 0xff DP_DUAL_MODE_MAX_TMDS_CLOCK values (Paulo)
          Adjust drm_dp_dual_mode_detect() type2 vs. type1 detection to
          ease future LSPCON enabling
          Remove the unused DP_DUAL_MODE_LAST_RESERVED define
      v3: Fix kernel doc function argument descriptions (Jani)
          s/NONE/UNKNOWN/ in drm_dp_dual_mode_detect() docs
          Add kernel doc for enum drm_dp_dual_mode_type
          Actually build the docs
          Fix more typoes
      v4: Adjust code indentation of type2 adaptor detection (Shashank)
          Add debug messages for failurs cases (Shashank)
      v5: EXPORT_SYMBOL(drm_dp_dual_mode_read) (Paulo)
      
      Cc: stable@vger.kernel.org
      Cc: Tore Anderson <tore@fud.no>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> (v4)
      Link: http://patchwork.freedesktop.org/patch/msgid/1462542412-25533-1-git-send-email-ville.syrjala@linux.intel.com
      ede53344
  12. 06 5月, 2016 1 次提交
  13. 29 4月, 2016 1 次提交
    • X
      drm/hisilicon: Add hisilicon kirin drm master driver · 23e7b2ab
      Xinliang Liu 提交于
      Add kirin DRM master driver for hi6220 SoC which used in HiKey board.
      Add dumb buffer feature.
      Add prime dmabuf feature.
      
      v9: Add OF and ARM64 depends on in Kconfig
      v8: None.
      v7:
      - Add config.mutex protection when accessing mode_config.connector_list.
      - Clean up match data getting.
      v6: None.
      v5: None.
      v4: None.
      v3:
      - Move and rename all the files to kirin sub-directory.
        So that we could separate different seires SoCs' driver.
      - Replace drm_platform_init, load, unload implementation.
      v2:
      - Remove abtraction layer.
      Signed-off-by: NXinliang Liu <xinliang.liu@linaro.org>
      Signed-off-by: NXinwei Kong <kong.kongxinwei@hisilicon.com>
      23e7b2ab
  14. 28 4月, 2016 1 次提交
  15. 26 4月, 2016 1 次提交
  16. 12 2月, 2016 2 次提交
  17. 10 2月, 2016 1 次提交
  18. 29 12月, 2015 1 次提交
  19. 15 12月, 2015 1 次提交
  20. 25 11月, 2015 1 次提交
  21. 21 10月, 2015 1 次提交
    • E
      drm/vc4: Add KMS support for Raspberry Pi. · c8b75bca
      Eric Anholt 提交于
      This is enough for fbcon and bringing up X using
      xf86-video-modesetting.  It doesn't support the 3D accelerator or
      power management yet.
      
      v2: Drop FB_HELPER select thanks to Archit's patches.  Do manual init
          ordering instead of using the .load hook.  Structure registration
          more like tegra's, but still using the typical "component" code.
          Drop no-op hooks for atomic_begin and mode_fixup() now that
          they're optional.  Drop sentinel in Makefile.  Fix minor style
          nits I noticed on another reread.
      
      v3: Use the new bcm2835 clk driver to manage pixel/HSM clocks instead
          of having a fixed video mode.  Use exynos-style component driver
          matching instead of devicetree nodes to list the component driver
          instances.  Rename compatibility strings to say bcm2835, and
          distinguish pv0/1/2.  Clean up some h/vsync code, and add in
          interlaced mode setup.  Fix up probe/bind error paths.  Use
          bitops.h macros for vc4_regs.h
      
      v4: Include i2c.h, allow building under COMPILE_TEST, drop msleep now
          that other bugs have been fixed, add timeouts to cpu_relax()
          loops, rename hpd-gpio to hpd-gpios.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c8b75bca
  22. 01 10月, 2015 1 次提交
  23. 30 9月, 2015 1 次提交
  24. 20 8月, 2015 1 次提交
    • J
      drm/layerscape: Add Freescale DCU DRM driver · 109eee2f
      Jianwei Wang 提交于
      This patch add support for Two Dimensional Animation and Compositing
      Engine (2D-ACE) on the Freescale SoCs.
      
      2D-ACE is a Freescale display controller. 2D-ACE describes
      the functionality of the module extremely well its name is a value
      that cannot be used as a token in programming languages.
      Instead the valid token "DCU" is used to tag the register names and
      function names.
      
      The Display Controller Unit (DCU) module is a system master that
      fetches graphics stored in internal or external memory and displays
      them on a TFT LCD panel. A wide range of panel sizes is supported
      and the timing of the interface signals is highly configurable.
      Graphics are read directly from memory and then blended in real-time,
      which allows for dynamic content creation with minimal CPU
      intervention.
      
      The features:
      (1) Full RGB888 output to TFT LCD panel.
      (2) Blending of each pixel using up to 4 source layers
      dependent
      on size of panel.
      (3) Each graphic layer can be placed with one pixel resolution
      in either axis.
      (4) Each graphic layer support RGB565 and RGB888 direct colors
      without alpha channel and BGRA8888 BGRA4444 ARGB1555 direct
      colors
      with an alpha channel and YUV422 format.
      (5) Each graphic layer support alpha blending with 8-bit
      resolution.
      This is a simplified version, only one primary plane, one
      framebuffer, one crtc, one connector and one encoder for TFT
      LCD panel.
      Signed-off-by: NAlison Wang <b18965@freescale.com>
      Signed-off-by: NXiubo Li <lixiubo@cmss.chinamobile.com>
      Signed-off-by: NJianwei Wang <jianwei.wang.chn@gmail.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      109eee2f
  25. 06 8月, 2015 1 次提交
    • A
      drm: Add top level Kconfig option for DRM fbdev emulation · a03fdcb1
      Archit Taneja 提交于
      Legacy fbdev emulation support via DRM is achieved through KMS FB helpers.
      Most modesetting drivers enable provide fbdev emulation by default by
      selecting KMS FB helpers. A few provide a separate Kconfig option for the
      user to enable or disbale fbdev emulation.
      
      Enabling fbdev emulation is finally a distro-level decision. Having a top
      level Kconfig option for fbdev emulation helps by providing a uniform way
      to enable/disable fbdev emulation for any modesetting driver. It also lets
      us remove unnecessary driver specific Kconfig options that causes bloat.
      
      With a top level Kconfig in place, we can stub out the fb helper functions
      when not needed without breaking functionality. Having stub functions also
      prevents drivers to require wrapping fb helper function calls with #ifdefs.
      
      DRM_FBDEV_EMULATION defaults to y since many drivers enable fbdev
      emulation by default and majority of distributions expect the fbdev
      interface in the kernel.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a03fdcb1
  26. 04 6月, 2015 1 次提交
  27. 03 6月, 2015 1 次提交
    • D
      Add virtio gpu driver. · dc5698e8
      Dave Airlie 提交于
      This patch adds a kms driver for the virtio gpu.  The xorg modesetting
      driver can handle the device just fine, the framebuffer for fbcon is
      there too.
      
      Qemu patches for the host side are under review currently.
      
      The pci version of the device comes in two variants: with and without
      vga compatibility.  The former has a extra memory bar for the vga
      framebuffer, the later is a pure virtio device.  The only concern for
      this driver is that in the virtio-vga case we have to kick out the
      firmware framebuffer.
      
      Initial revision has only 2d support, 3d (virgl) support requires
      some more work on the qemu side and will be added later.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      dc5698e8
  28. 27 5月, 2015 1 次提交
  29. 13 5月, 2015 1 次提交
  30. 02 4月, 2015 1 次提交
  31. 28 1月, 2015 1 次提交
    • A
      drm/bridge: make bridge registration independent of drm flow · 3d3f8b1f
      Ajay Kumar 提交于
      Currently, third party bridge drivers(ptn3460) are dependent
      on the corresponding encoder driver init, since bridge driver
      needs a drm_device pointer to finish drm initializations.
      The encoder driver passes the drm_device pointer to the
      bridge driver. Because of this dependency, third party drivers
      like ptn3460 doesn't adhere to the driver model.
      
      In this patch, we reframe the bridge registration framework
      so that bridge initialization is split into 2 steps, and
      bridge registration happens independent of drm flow:
      --Step 1: gather all the bridge settings independent of drm and
      	  add the bridge onto a global list of bridges.
      --Step 2: when the encoder driver is probed, call drm_bridge_attach
      	  for the corresponding bridge so that the bridge receives
      	  drm_device pointer and continues with connector and other
      	  drm initializations.
      
      The old set of bridge helpers are removed, and a set of new helpers
      are added to accomplish the 2 step initialization.
      
      The bridge devices register themselves onto global list of bridges
      when they get probed by calling "drm_bridge_add".
      
      The parent encoder driver waits till the bridge is available
      in the lookup table(by calling "of_drm_find_bridge") and then
      continues with its initialization.
      
      The encoder driver should also call "drm_bridge_attach" to pass
      on the drm_device to the bridge object.
      
      drm_bridge_attach inturn calls "bridge->funcs->attach" so that
      bridge can continue with drm related initializations.
      Signed-off-by: NAjay Kumar <ajaykumar.rs@samsung.com>
      Acked-by: NInki Dae <inki.dae@samsung.com>
      Tested-by: NRahul Sharma <rahul.sharma@samsung.com>
      Tested-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Tested-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Tested-by: NSjoerd Simons <sjoerd.simons@collabora.co.uk>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      3d3f8b1f
  32. 21 1月, 2015 1 次提交
  33. 21 12月, 2014 1 次提交
    • O
      drm: Put amdkfd before radeon in drm Makefile · 611a03d7
      Oded Gabbay 提交于
      When amdkfd and radeon are compiled inside the kernel image (not as modules),
      radeon will load before amdkfd, which will cause a bug when radeon will probe
      the GPUs.
      
      When the two drivers are compiled as modules, amdkfd is loaded after radeon is
      loaded but before radeon starts probing the GPUs. This is done because radeon
      loads the amdkfd module through symbol_request function.
      
      This patch makes amdkfd load before radeon when they are both compiled inside
      the kernel image, which makes the behavior similar to the case when they are
      modules, and prevents the kernel bug.
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      611a03d7
  34. 02 12月, 2014 1 次提交