1. 10 7月, 2018 1 次提交
  2. 05 7月, 2018 1 次提交
  3. 20 6月, 2018 1 次提交
    • B
      drm: Add writeback connector type · 935774cd
      Brian Starkey 提交于
      Writeback connectors represent writeback engines which can write the
      CRTC output to a memory framebuffer. Add a writeback connector type and
      related support functions.
      
      Drivers should initialize a writeback connector with
      drm_writeback_connector_init() which takes care of setting up all the
      writeback-specific details on top of the normal functionality of
      drm_connector_init().
      
      Writeback connectors have a WRITEBACK_FB_ID property, used to set the
      output framebuffer, and a WRITEBACK_PIXEL_FORMATS blob used to expose the
      supported writeback formats to userspace.
      
      When a framebuffer is attached to a writeback connector with the
      WRITEBACK_FB_ID property, it is used only once (for the commit in which
      it was included), and userspace can never read back the value of
      WRITEBACK_FB_ID. WRITEBACK_FB_ID can only be set if the connector is
      attached to a CRTC.
      
      Changes since v1:
       - Added drm_writeback.c + documentation
       - Added helper to initialize writeback connector in one go
       - Added core checks
       - Squashed into a single commit
       - Dropped the client cap
       - Writeback framebuffers are no longer persistent
      
      Changes since v2:
       Daniel Vetter:
       - Subclass drm_connector to drm_writeback_connector
       - Relax check to allow CRTC to be set without an FB
       - Add some writeback_ prefixes
       - Drop PIXEL_FORMATS_SIZE property, as it was unnecessary
       Gustavo Padovan:
       - Add drm_writeback_job to handle writeback signalling centrally
      
      Changes since v3:
       - Rebased
       - Rename PIXEL_FORMATS -> WRITEBACK_PIXEL_FORMATS
      
      Chances since v4:
       - Embed a drm_encoder inside the drm_writeback_connector to
         reduce the amount of boilerplate code required from the drivers
         that are using it.
      
      Changes since v5:
       - Added Rob Clark's atomic_commit() vfunc to connector helper
         funcs, so that writeback jobs are committed from atomic helpers
       - Updated create_writeback_properties() signature to return an
         error code rather than a boolean false for failure.
       - Free writeback job with the connector state rather than when
         doing the cleanup_work()
      
      Changes since v7:
       - fix extraneous use of out_fence that is only introduced in a
         subsequent patch.
      
      Changes since v8:
       - whitespace changes pull from subsequent patch
      
      Changes since v9:
       - Revert the v6 changes that free the writeback job in the connector
         state cleanup and return to doing it in the cleanup_work() function
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: NMihail Atanassov <mihail.atanassov@arm.com>
      [rebased and added atomic_commit() vfunc for writeback jobs]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/229037/
      935774cd
  4. 04 5月, 2018 2 次提交
  5. 03 4月, 2018 1 次提交
    • O
      drm/xen-front: Add support for Xen PV display frontend · c575b7ee
      Oleksandr Andrushchenko 提交于
      Add support for Xen para-virtualized frontend display driver.
      Accompanying backend [1] is implemented as a user-space application
      and its helper library [2], capable of running as a Weston client
      or DRM master.
      Configuration of both backend and frontend is done via
      Xen guest domain configuration options [3].
      
      Driver limitations:
       1. Only primary plane without additional properties is supported.
       2. Only one video mode supported which resolution is configured
          via XenStore.
       3. All CRTCs operate at fixed frequency of 60Hz.
      
      1. Implement Xen bus state machine for the frontend driver according to
      the state diagram and recovery flow from display para-virtualized
      protocol: xen/interface/io/displif.h.
      
      2. Read configuration values from Xen store according
      to xen/interface/io/displif.h protocol:
        - read connector(s) configuration
        - read buffer allocation mode (backend/frontend)
      
      3. Handle Xen event channels:
        - create for all configured connectors and publish
          corresponding ring references and event channels in Xen store,
          so backend can connect
        - implement event channels interrupt handlers
        - create and destroy event channels with respect to Xen bus state
      
      4. Implement shared buffer handling according to the
      para-virtualized display device protocol at xen/interface/io/displif.h:
        - handle page directories according to displif protocol:
          - allocate and share page directories
          - grant references to the required set of pages for the
            page directory
        - allocate xen balllooned pages via Xen balloon driver
          with alloc_xenballooned_pages/free_xenballooned_pages
        - grant references to the required set of pages for the
          shared buffer itself
        - implement pages map/unmap for the buffers allocated by the
          backend (gnttab_map_refs/gnttab_unmap_refs)
      
      5. Implement kernel modesetiing/connector handling using
      DRM simple KMS helper pipeline:
      
      - implement KMS part of the driver with the help of DRM
        simple pipepline helper which is possible due to the fact
        that the para-virtualized driver only supports a single
        (primary) plane:
        - initialize connectors according to XenStore configuration
        - handle frame done events from the backend
        - create and destroy frame buffers and propagate those
          to the backend
        - propagate set/reset mode configuration to the backend on display
          enable/disable callbacks
        - send page flip request to the backend and implement logic for
          reporting backend IO errors on prepare fb callback
      
      - implement virtual connector handling:
        - support only pixel formats suitable for single plane modes
        - make sure the connector is always connected
        - support a single video mode as per para-virtualized driver
          configuration
      
      6. Implement GEM handling depending on driver mode of operation:
      depending on the requirements for the para-virtualized environment,
      namely requirements dictated by the accompanying DRM/(v)GPU drivers
      running in both host and guest environments, number of operating
      modes of para-virtualized display driver are supported:
       - display buffers can be allocated by either
         frontend driver or backend
       - display buffers can be allocated to be contiguous
         in memory or not
      
      Note! Frontend driver itself has no dependency on contiguous memory for
      its operation.
      
      6.1. Buffers allocated by the frontend driver.
      
      The below modes of operation are configured at compile-time via
      frontend driver's kernel configuration.
      
      6.1.1. Front driver configured to use GEM CMA helpers
           This use-case is useful when used with accompanying DRM/vGPU driver
           in guest domain which was designed to only work with contiguous
           buffers, e.g. DRM driver based on GEM CMA helpers: such drivers can
           only import contiguous PRIME buffers, thus requiring frontend driver
           to provide such. In order to implement this mode of operation
           para-virtualized frontend driver can be configured to use
           GEM CMA helpers.
      
      6.1.2. Front driver doesn't use GEM CMA
           If accompanying drivers can cope with non-contiguous memory then, to
           lower pressure on CMA subsystem of the kernel, driver can allocate
           buffers from system memory.
      
      Note! If used with accompanying DRM/(v)GPU drivers this mode of operation
      may require IOMMU support on the platform, so accompanying DRM/vGPU
      hardware can still reach display buffer memory while importing PRIME
      buffers from the frontend driver.
      
      6.2. Buffers allocated by the backend
      
      This mode of operation is run-time configured via guest domain
      configuration through XenStore entries.
      
      For systems which do not provide IOMMU support, but having specific
      requirements for display buffers it is possible to allocate such buffers
      at backend side and share those with the frontend.
      For example, if host domain is 1:1 mapped and has DRM/GPU hardware
      expecting physically contiguous memory, this allows implementing
      zero-copying use-cases.
      
      Note, while using this scenario the following should be considered:
        a) If guest domain dies then pages/grants received from the backend
           cannot be claimed back
        b) Misbehaving guest may send too many requests to the
           backend exhausting its grant references and memory
           (consider this from security POV).
      
      Note! Configuration options 1.1 (contiguous display buffers) and 2
      (backend allocated buffers) are not supported at the same time.
      
      7. Handle communication with the backend:
       - send requests and wait for the responses according
         to the displif protocol
       - serialize access to the communication channel
       - time-out used for backend communication is set to 3000 ms
       - manage display buffers shared with the backend
      
      [1] https://github.com/xen-troops/displ_be
      [2] https://github.com/xen-troops/libxenbe
      [3] https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/man/xl.cfg.pod.5.in;h=a699367779e2ae1212ff8f638eff0206ec1a1cc9;hb=refs/heads/master#l1257Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180403112317.28751-2-andr2000@gmail.com
      c575b7ee
  6. 25 1月, 2018 1 次提交
  7. 08 12月, 2017 1 次提交
  8. 05 12月, 2017 1 次提交
    • H
      drm: Add panel orientation quirks, v6. · 404d1a3e
      Hans de Goede 提交于
      Some x86 clamshell design devices use portrait tablet screens and a display
      engine which cannot rotate in hardware, so the firmware just leaves things
      as is and we cannot figure out that the display is oriented non upright
      from the hardware.
      
      So at least on x86, we need a quirk table for this. This commit adds a DMI
      based quirk table which is initially populated with 5 such devices: Asus
      T100HA, GPD Pocket, GPD win, I.T.Works TW891 and the VIOS LTH17.
      
      This quirk table will be used by the drm code to let userspace know that
      the display is not mounted upright inside the devices case through a new
      panel orientation drm-connector property, as well as to tell fbcon to
      rotate the console so that it shows the right way up.
      
      Changes in v5:
      -Add a kernel-doc comment documenting drm_get_panel_orientation_quirk()
      -Remove board_* matches from the dmi-matches for the VIOS LTH17 laptop,
       keeping only the (identical) sys_vendor and product_name matches.
       This is necessary because an older version of the bios has
       board_vendor set to VOIS instead of VIOS
      
      Changes in v6:
      -Add reference to added kernel-docs in Documentation/gpu/drm-kms-helpers.rst
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-3-hdegoede@redhat.com
      404d1a3e
  9. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  10. 25 10月, 2017 1 次提交
    • K
      drm: Add drm_object lease infrastructure [v5] · 2ed077e4
      Keith Packard 提交于
      This provides new data structures to hold "lease" information about
      drm mode setting objects, and provides for creating new drm_masters
      which have access to a subset of the available drm resources.
      
      An 'owner' is a drm_master which is not leasing the objects from
      another drm_master, and hence 'owns' them.
      
      A 'lessee' is a drm_master which is leasing objects from some other
      drm_master. Each lessee holds the set of objects which it is leasing
      from the lessor.
      
      A 'lessor' is a drm_master which is leasing objects to another
      drm_master. This is the same as the owner in the current code.
      
      The set of objects any drm_master 'controls' is limited to the set of
      objects it leases (for lessees) or all objects (for owners).
      
      Objects not controlled by a drm_master cannot be modified through the
      various state manipulating ioctls, and any state reported back to user
      space will be edited to make them appear idle and/or unusable. For
      instance, connectors always report 'disconnected', while encoders
      report no possible crtcs or clones.
      
      The full list of lessees leasing objects from an owner (either
      directly, or indirectly through another lessee), can be searched from
      an idr in the drm_master of the owner.
      
      Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:
      
      * Sub-leasing has been disabled.
      
      * BUG_ON for lock checking replaced with lockdep_assert_held
      
      * 'change' ioctl has been removed.
      
      * Leased objects can always be controlled by the lessor; the
        'mask_lease' flag has been removed
      
      * Checking for leased status has been simplified, replacing
        the drm_lease_check function with drm_lease_held.
      
      Changes in v3, some suggested by Dave Airlie <airlied@gmail.com>
      
      * Add revocation. This allows leases to be effectively revoked by
        removing all of the objects they have access to. The lease itself
        hangs around as it's hanging off a file.
      
      * Free the leases IDR when the master is destroyed
      
      * _drm_lease_held should look at lessees, not lessor
      
      * Allow non-master files to check for lease status
      
      Changes in v4, suggested by Dave Airlie <airlied@gmail.com>
      
      * Formatting and whitespace changes
      
      Changes in v5 (airlied)
      
      * check DRIVER_MODESET before lease destroy call
      * check DRIVER_MODESET for lease revoke (Chris)
      * Use idr_mutex uniformly for all lease elements of struct drm_master. (Keith)
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      2ed077e4
  11. 27 9月, 2017 1 次提交
  12. 19 9月, 2017 1 次提交
  13. 05 9月, 2017 1 次提交
  14. 24 8月, 2017 1 次提交
    • L
      drm/tve200: Add new driver for TVE200 · 179c02fe
      Linus Walleij 提交于
      This adds a new DRM driver for the Faraday Technology TVE200
      block. This "TV Encoder" encodes a ITU-T BT.656 stream and can
      be found in the StorLink SL3516 (later Cortina Systems CS3516)
      as well as the Grain Media GM8180.
      
      I do not have definitive word from anyone at Faraday that this
      IP block is theirs, but it bears the hallmark of their 3-digit
      version code (200) and is used in two SoCs from completely
      different companies. (Grain Media was fully owned by Faraday
      until it was transferred to NovoTek this january, and
      Faraday did lots of work on the StorLink SoCs.)
      
      The D-Link DIR-685 uses this in connection with the Ilitek
      ILI9322 panel driver that supports BT.656 input, while the
      GM8180 apparently has been used with the Cirrus Logic CS4954
      digital video encoder. The oldest user seems to be
      something called Techwall 2835.
      
      This driver is heavily inspired by Eric Anholt's PL111
      driver and therefore I have mentioned all the ancestor authors
      in the header file.
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170820100557.24991-2-linus.walleij@linaro.org
      179c02fe
  15. 17 8月, 2017 1 次提交
  16. 14 6月, 2017 1 次提交
    • D
      drm: introduce sync objects (v4) · e9083420
      Dave Airlie 提交于
      Sync objects are new toplevel drm object, that contain a
      pointer to a fence. This fence can be updated via command
      submission ioctls via drivers.
      
      There is also a generic wait obj API modelled on the vulkan
      wait API (with code modelled on some amdgpu code).
      
      These objects can be converted to an opaque fd that can be
      passes between processes.
      
      v2: rename reference/unreference to put/get (Chris)
      fix leaked reference (David Zhou)
      drop mutex in favour of cmpxchg (Chris)
      v3: cleanups from danvet, rebase on drm_fops rename
      check fd_flags is 0 in ioctls.
      v4: export find/free, change replace fence to take a
      syncobj. In order to support lookup first, replace
      later semantics which seem in the end to be cleaner.
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e9083420
  17. 07 6月, 2017 1 次提交
  18. 05 6月, 2017 1 次提交
  19. 01 6月, 2017 1 次提交
  20. 09 5月, 2017 1 次提交
    • T
      drm/pl111: Initial drm/kms driver for pl111 · bed41005
      Tom Cooksey 提交于
      This is a modesetting driver for the pl111 CLCD display controller
      found on various ARM platforms such as the Versatile Express. The
      driver has only been tested on the bcm911360_entphn platform so far,
      with PRIME-based buffer sharing between vc4 and clcd.
      
      It reuses the existing devicetree binding, while not using quite as
      many of its properties as the fbdev driver does (those are left for
      future work).
      
      v2: Nearly complete rewrite by anholt, cutting 2/3 of the code thanks
          to DRM core's excellent new helpers.
      v3: Don't match pl110 any more, don't attach if we don't have a DRM
          panel, use DRM_GEM_CMA_FOPS, update MAINTAINERS, use the simple
          display helper, use drm_gem_cma_dumb_create (same as our wrapper).
      v4: Change the driver's .name to not clash with fbdev in sysfs, drop
          platform alias, drop redundant "drm" in DRM driver name, hook up
          .prepare_fb to the CMA helper so that DMA fences should work.
      v5: Move register definitions inside the driver directory, fix build
          in COMPILE_TEST and !AMBA mode.
      v6: Drop TIM2_CLKSEL for now to be consistent with existing DT
          bindings, switch back to external register definitions.
      Signed-off-by: NTom Cooksey <tom.cooksey@arm.com>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: Linus Walleij <linus.walleij@linaro.org> (v5)
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170413031746.12921-2-eric@anholt.net
      bed41005
  21. 15 4月, 2017 1 次提交
  22. 21 3月, 2017 1 次提交
  23. 09 3月, 2017 1 次提交
  24. 19 2月, 2017 1 次提交
  25. 17 2月, 2017 1 次提交
  26. 06 1月, 2017 1 次提交
  27. 28 12月, 2016 1 次提交
  28. 27 12月, 2016 2 次提交
  29. 06 12月, 2016 1 次提交
    • M
      drm: Add new driver for MXSFB controller · 45d59d70
      Marek Vasut 提交于
      Add new driver for the MXSFB controller found in i.MX23/28/6SX .
      The MXSFB controller is a simple framebuffer controller with one
      parallel LCD output. Unlike the MXSFB fbdev driver that is used
      on these systems now, this driver uses the DRM/KMS framework.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      45d59d70
  30. 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
  31. 15 11月, 2016 2 次提交
  32. 09 11月, 2016 1 次提交
  33. 07 11月, 2016 1 次提交
  34. 17 10月, 2016 1 次提交
    • T
      drm: Add API for capturing frame CRCs · 9edbf1fa
      Tomeu Vizoso 提交于
      Adds files and directories to debugfs for controlling and reading frame
      CRCs, per CRTC:
      
      dri/0/crtc-0/crc
      dri/0/crtc-0/crc/control
      dri/0/crtc-0/crc/data
      
      Drivers can implement the set_crc_source callback() in drm_crtc_funcs to
      start and stop generating frame CRCs and can add entries to the output
      by calling drm_crtc_add_crc_entry.
      
      v2:
          - Lots of good fixes suggested by Thierry.
          - Added documentation.
          - Changed the debugfs layout.
          - Moved to allocate the entries circular queue once when frame
            generation gets enabled for the first time.
      v3:
          - Use the control file just to select the source, and start and stop
            capture when the data file is opened and closed, respectively.
          - Make variable the number of CRC values per entry, per source.
          - Allocate entries queue each time we start capturing as now there
            isn't a fixed number of CRC values per entry.
          - Store the frame counter in the data file as a 8-digit hex number.
          - For sources that cannot provide useful frame numbers, place
            XXXXXXXX in the frame field.
      
      v4:
          - Build only if CONFIG_DEBUG_FS is enabled.
          - Use memdup_user_nul.
          - Consolidate calculation of the size of an entry in a helper.
          - Add 0x prefix to hex numbers in the data file.
          - Remove unnecessary snprintf and strlen usage in read callback.
      
      v5:
          - Made the crcs array in drm_crtc_crc_entry fixed-size
          - Lots of other smaller improvements suggested by Emil Velikov
      
      v7:
          - Move definition of drm_debugfs_crtc_crc_add to drm_internal.h
      
      v8:
          - Call debugfs_remove_recursive when we fail to create the minor
            device
      
      v9:
          - Register the debugfs directory for a crtc from
            drm_crtc_register_all()
      
      v10:
          - Don't let debugfs failures interrupt CRTC registration (Emil
            Velikov)
      
      v11:
          - Remove extra brace that broke compilation. Sorry!
      Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Reviewed-by: NEmil Velikov <emil.velikov@collabora.com>
      Acked-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1475767268-14379-3-git-send-email-tomeu.vizoso@collabora.com
      9edbf1fa
  35. 22 9月, 2016 2 次提交
  36. 29 8月, 2016 1 次提交