1. 19 6月, 2019 1 次提交
    • P
      DRM: Add KMS driver for the Ingenic JZ47xx SoCs · 90b86fcc
      Paul Cercueil 提交于
      Add a KMS driver for the Ingenic JZ47xx family of SoCs.
      This driver is meant to replace the aging jz4740-fb driver.
      
      This driver does not make use of the simple pipe helper, for the reason
      that it will soon be updated to support more advanced features like
      multiple planes, IPU integration for colorspace conversion and up/down
      scaling, support for DSI displays, and TV-out and HDMI outputs.
      
      Notes:
          v2: - Remove custom handling of panel. The panel is now discovered using
                the standard API.
              - Lots of small tweaks suggested by upstream
      
          v3: - Use devm_drm_dev_init()
              - Update compatible strings to -lcd instead of -drm
              - Add destroy() callbacks to plane and crtc
              - The ingenic,lcd-mode is now read from the bridge's DT node
      
          v4: Remove ingenic,lcd-mode property completely. The various modes are now
              deduced from the connector type, the pixel format or the bus flags.
      
          v5: - Fix framebuffer size incorrectly calculated for 24bpp framebuffers
              - Use 32bpp framebuffer instead of 16bpp, as it'll work with both
                16-bit and 24-bit panel
              - Get rid of drm_format_plane_cpp() which has been dropped upstream
              - Avoid using drm_format_info->depth, which is deprecated.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Tested-by: NArtur Rojek <contact@artur-rojek.eu>
      Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190603152331.23160-2-paul@crapouillou.net
      90b86fcc
  2. 14 6月, 2019 1 次提交
  3. 04 6月, 2019 1 次提交
    • N
      drm/fb-helper: Remove drm_fb_helper_crtc · d81294af
      Noralf Trønnes 提交于
      struct drm_fb_helper_crtc is now just a wrapper around drm_mode_set so
      use that directly instead and attach it as a modeset array onto
      drm_client_dev. drm_fb_helper will use this array to store its modesets
      which means it will always initialize a drm_client, but it will not
      register the client (callbacks) unless it's the generic fbdev emulation.
      
      Code will later be moved to drm_client, so add code there in a new file
      drm_client_modeset.c with MIT license to match drm_fb_helper.c.
      
      The modeset connector array size is hardcoded for the cloned case to avoid
      having to pass in a value from the driver. A value of 8 is chosen to err
      on the safe side. This means that the max connector argument for
      drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore,
      a todo entry for this is added.
      
      In pan_display_atomic() restore_fbdev_mode_force() is used instead of
      restore_fbdev_mode_atomic() because that one will later become internal
      to drm_client_modeset.
      
      Locking order:
      1. drm_fb_helper->lock
      2. drm_master_internal_acquire
      3. drm_client_dev->modeset_mutex
      
      v6: Improve commit message (Sam Ravnborg)
      
      v3:
      - Use full drm_client_init/release for the modesets (Daniel Vetter)
      - drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
      - Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)
      
      v2:
      - Add modesets array to drm_client (Daniel Vetter)
      - Use a new file for the modeset code (Daniel Vetter)
      - File has to be MIT licensed (Emmanuel Vadot)
      - Add copyrights from drm_fb_helper.c
      Signed-off-by: NNoralf Trønnes <noralf@tronnes.org>
      Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-3-noralf@tronnes.org
      d81294af
  4. 24 5月, 2019 1 次提交
  5. 15 5月, 2019 2 次提交
  6. 09 5月, 2019 1 次提交
  7. 24 4月, 2019 3 次提交
  8. 13 4月, 2019 1 次提交
    • R
      drm/panfrost: Add initial panfrost driver · f3ba9122
      Rob Herring 提交于
      This adds the initial driver for panfrost which supports Arm Mali
      Midgard and Bifrost family of GPUs. Currently, only the T860 and
      T760 Midgard GPUs have been tested.
      
      v2:
      - Add GPU reset on job hangs (Tomeu)
      - Add RuntimePM and devfreq support (Tomeu)
      - Fix T760 support (Tomeu)
      - Add a TODO file (Rob, Tomeu)
      - Support multiple in fences (Tomeu)
      - Drop support for shared fences (Tomeu)
      - Fill in MMU de-init (Rob)
      - Move register definitions back to single header (Rob)
      - Clean-up hardcoded job submit todos (Rob)
      - Implement feature setup based on features/issues (Rob)
      - Add remaining Midgard DT compatible strings (Rob)
      
      v3:
      - Add support for reset lines (Neil)
      - Add a MAINTAINERS entry (Rob)
      - Call dma_set_mask_and_coherent (Rob)
      - Do MMU invalidate on map and unmap. Restructure to do a single
        operation per map/unmap call. (Rob)
      - Add a missing explicit padding to struct drm_panfrost_create_bo (Rob)
      - Fix 0-day error: "panfrost_devfreq.c:151:9-16: ERROR: PTR_ERR applied after initialization to constant on line 150"
      - Drop HW_FEATURE_AARCH64_MMU conditional (Rob)
      - s/DRM_PANFROST_PARAM_GPU_ID/DRM_PANFROST_PARAM_GPU_PROD_ID/ (Rob)
      - Check drm_gem_shmem_prime_import_sg_table() error code (Rob)
      - Re-order power on sequence (Rob)
      - Move panfrost_acquire_object_fences() before scheduling job (Rob)
      - Add NULL checks on array pointers in job clean-up (Rob)
      - Rework devfreq (Tomeu)
      - Fix devfreq init with no regulator (Rob)
      - Various WS and comments clean-up (Rob)
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Lyude Paul <lyude@redhat.com>
      Reviewed-by: NAlyssa Rosenzweig <alyssa@rosenzweig.io>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NSteven Price <steven.price@arm.com>
      Signed-off-by: NMarty E. Plummer <hanetzer@startmail.com>
      Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190409205427.6943-4-robh@kernel.org
      f3ba9122
  9. 08 4月, 2019 1 次提交
  10. 04 4月, 2019 1 次提交
  11. 02 4月, 2019 1 次提交
    • Q
      drm/lima: driver for ARM Mali4xx GPUs · a1d2a633
      Qiang Yu 提交于
      - Mali 4xx GPUs have two kinds of processors GP and PP. GP is for
        OpenGL vertex shader processing and PP is for fragment shader
        processing. Each processor has its own MMU so prcessors work in
        virtual address space.
      - There's only one GP but multiple PP (max 4 for mali 400 and 8
        for mali 450) in the same mali 4xx GPU. All PPs are grouped
        togather to handle a single fragment shader task divided by
        FB output tiled pixels. Mali 400 user space driver is
        responsible for assign target tiled pixels to each PP, but mali
        450 has a HW module called DLBU to dynamically balance each
        PP's load.
      - User space driver allocate buffer object and map into GPU
        virtual address space, upload command stream and draw data with
        CPU mmap of the buffer object, then submit task to GP/PP with
        a register frame indicating where is the command stream and misc
        settings.
      - There's no command stream validation/relocation due to each user
        process has its own GPU virtual address space. GP/PP's MMU switch
        virtual address space before running two tasks from different
        user process. Error or evil user space code just get MMU fault
        or GP/PP error IRQ, then the HW/SW will be recovered.
      - Use GEM+shmem for MM. Currently just alloc and pin memory when
        gem object creation. GPU vm map of the buffer is also done in
        the alloc stage in kernel space. We may delay the memory
        allocation and real GPU vm map to command submission stage in the
        furture as improvement.
      - Use drm_sched for GPU task schedule. Each OpenGL context should
        have a lima context object in the kernel to distinguish tasks
        from different user. drm_sched gets task from each lima context
        in a fair way.
      
      mesa driver can be found here before upstreamed:
      https://gitlab.freedesktop.org/lima/mesa
      
      v8:
      - add comments for in_sync
      - fix ctx free miss mutex unlock
      
      v7:
      - remove lima_fence_ops with default value
      - move fence slab create to device probe
      - check pad ioctl args to be zero
      - add comments for user/kernel interface
      
      v6:
      - fix comments by checkpatch.pl
      
      v5:
      - export gp/pp version to userspace
      - rebase on drm-misc-next
      
      v4:
      - use get param interface to get info
      - separate context create/free ioctl
      - remove unused max sched task param
      - update copyright time
      - use xarray instead of idr
      - stop using drmP.h
      
      v3:
      - fix comments from kbuild robot
      - restrict supported arch to tested ones
      
      v2:
      - fix syscall argument check
      - fix job finish fence leak since kernel 5.0
      - use drm syncobj to replace native fence
      - move buffer object GPU va map into kernel
      - reserve syscall argument space for future info
      - remove kernel gem modifier
      - switch TTM back to GEM+shmem MM
      - use time based io poll
      - use whole register name
      - adopt gem reservation obj integration
      - use drm_timeout_abs_to_jiffies
      
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Christian König <ckoenig.leichtzumerken@gmail.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Signed-off-by: NAndreas Baierl <ichgeh@imkreisrum.de>
      Signed-off-by: NErico Nunes <nunes.erico@gmail.com>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: NSimon Shields <simon@lineageos.org>
      Signed-off-by: NVasily Khoruzhick <anarsoul@gmail.com>
      Signed-off-by: NQiang Yu <yuq825@gmail.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NRob Herring <robh@kerrnel.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/291200/
      a1d2a633
  12. 20 3月, 2019 1 次提交
  13. 15 3月, 2019 1 次提交
  14. 12 3月, 2019 1 次提交
  15. 08 2月, 2019 1 次提交
    • L
      drm: rcar-du: lvds: Add API to enable/disable clock output · 02f2b300
      Laurent Pinchart 提交于
      On the D3 and E3 platforms, the LVDS internal PLL supplies the pixel
      clock to the DU. This works automatically for LVDS outputs as the LVDS
      encoder is enabled through the bridge API, enabling the internal PLL and
      clock output. However, when using the DU DPAD output with the LVDS
      outputs turned off, the LVDS PLL needs to be controlled manually. Add an
      API to do so, to be called by the DU driver.
      
      The drivers/gpu/drm/rcar-du/ directory has to be treated as obj-y
      unconditionally, as the LVDS driver could be built-in while the DU
      driver is compiled as a module.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      02f2b300
  16. 14 1月, 2019 1 次提交
  17. 05 12月, 2018 1 次提交
  18. 28 11月, 2018 1 次提交
    • M
      drm/dsc: Add helpers for DSC picture parameter set infoframes · a408c857
      Manasi Navare 提交于
      According to Display Stream compression spec 1.2, the picture
      parameter set metadata is sent from source to sink device
      using the DP Secondary data packet. An infoframe is formed
      for the PPS SDP header and PPS SDP payload bytes.
      This patch adds helpers to fill the PPS SDP header
      and PPS SDP payload according to the DSC 1.2 specification.
      
      v7:
      * Use BUILD_BUG_ON() to protect changing struct size (Ville)
      * Remove typecaseting (Ville)
      * Include byteorder.h in drm_dsc.c (Ville)
      * Correct kernel doc spacing (Anusha)
      v6:
      * Use proper sequence points for breaking down the
      assignments (Chris Wilson)
      * Use SPDX identifier
      v5:
      Do not use bitfields for DRM structs (Jani N)
      v4:
      * Use DSC constants for params that dont change across
      configurations
      v3:
      * Add reference to added kernel-docs in
      Documentation/gpu/drm-kms-helpers.rst (Daniel Vetter)
      
      v2:
      * Add EXPORT_SYMBOL for the drm functions (Manasi)
      
      Cc: dri-devel@lists.freedesktop.org
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Acked-by: NHarry Wentland <harry.wentland@amd.com>
      Reviewed-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
      drm-intel)
      Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-5-manasi.d.navare@intel.com
      a408c857
  19. 22 11月, 2018 1 次提交
  20. 06 11月, 2018 1 次提交
  21. 06 10月, 2018 1 次提交
  22. 09 9月, 2018 1 次提交
    • D
      drm: extract drm_atomic_uapi.c · 72fdb40c
      Daniel Vetter 提交于
      This leaves all the commit/check and state handling in drm_atomic.c,
      while pulling all the uapi glue and the huge ioctl itself into a
      seprate file.
      
      This seems to almost perfectly split the rather big drm_atomic.c file
      into 2 equal sizes.
      
      Also adjust the kerneldoc and type a very terse overview text.
      
      v2: Rebase.
      
      v3: Fix tiny typo.
      
      v4:
      - Fixup armada, newly converted atomic driver hooray!
      - Fixup msm/dpu1, newly added too.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: linux-arm-msm@vger.kernel.org
      Cc: freedreno@lists.freedesktop.org
      Acked-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-7-daniel.vetter@ffwll.ch
      72fdb40c
  23. 13 7月, 2018 1 次提交
  24. 10 7月, 2018 1 次提交
  25. 05 7月, 2018 1 次提交
  26. 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
  27. 04 5月, 2018 2 次提交
  28. 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
  29. 25 1月, 2018 1 次提交
  30. 08 12月, 2017 1 次提交
  31. 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
  32. 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
  33. 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
  34. 27 9月, 2017 1 次提交
  35. 19 9月, 2017 1 次提交
  36. 05 9月, 2017 1 次提交