1. 10 8月, 2014 2 次提交
  2. 09 8月, 2014 1 次提交
  3. 08 8月, 2014 1 次提交
    • D
      Revert "drm: drop redundant drm_file->is_master" · 7963e9db
      Dave Airlie 提交于
      This reverts commit 48ba8137.
      
      Thanks to Chris:
      "drm_file->is_master is not synomous with having drm_file->master ==
      drm_file->minor->master. This is because drm_file->master is the same
      for all drm_files of the same generation and so when there is a master,
      every drm_file believes itself to be the master. Confusion ensues and
      things go pear shaped when one file is closed and there is no master
      anymore."
      
      Conflicts:
      	drivers/gpu/drm/drm_drv.c
      	drivers/gpu/drm/drm_stub.c
      7963e9db
  4. 07 8月, 2014 3 次提交
    • D
      Merge tag 'drm/tegra/for-3.17-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next · fa1d0ee6
      Dave Airlie 提交于
      drm/tegra: Changes for v3.17-rc1
      
      Mostly some cleanup all over the place. Pitch alignment limitations of
      the display controller are now honored and job submission is 64-bit
      safe.
      
      The SOR output (used for eDP) properly configures sync signal polarities
      according to the display mode rather than hard-coding them to some value
      and the number of bits per color is now taken from the panel rather than
      hard-coded to properly support 24-bit vs. 18-bit panels.
      
      The DSI controller now properly supports non-continuous clock mode.
      
      GEM objects can now have their flags and tiling mode modified via IOCTLs
      to allow buffers imported from Nouveau to be properly displayed. Newer
      generations of the Tegra display controller can also detile block linear
      buffers at scan-out time.
      
      Finally the driver now properly exports MODULE_DEVICE_TABLEs to allow it
      to be automatically loaded when built as a module.
      
      * tag 'drm/tegra/for-3.17-rc1' of git://anongit.freedesktop.org/tegra/linux:
        drm/tegra: add MODULE_DEVICE_TABLEs
        drm/tegra: dc - Reset controller on driver remove
        drm/tegra: Properly align stride for framebuffers
        drm/tegra: sor - Configure proper sync polarities
        drm/tegra: sor - Use bits-per-color from panel
        drm/tegra: Make job submission 64-bit safe
        drm/tegra: Allow non-authenticated processes to create buffer objects
        drm/tegra: Add SET/GET_FLAGS IOCTLs
        drm/tegra: Add SET/GET_TILING IOCTLs
        drm/tegra: Implement more tiling modes
        drm/tegra: dsi - Handle non-continuous clock flag
        drm/tegra: sor - missing unlock on error
      fa1d0ee6
    • D
      Merge tag 'drm/panel/for-3.17-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next · 0c6287ec
      Dave Airlie 提交于
      drm/panel: Changes for v3.17-rc1
      
      Panels can now be more finely controlled via .prepare() and .unprepare()
      callbacks in addition to .enable() and .disable(). New kerneldoc details
      what they are supposed to do and when they should be called.
      
      The simple panel driver gained support for a couple of new panels and it
      is now possible to specify additional delays during power up and power
      down sequences if panels require it.
      
      DSI devices can now advertise that they support non-continuous clock
      mode which will allow DSI host controllers to disable the high speed
      clock after transmissions to save power.
      
      * tag 'drm/panel/for-3.17-rc1' of git://anongit.freedesktop.org/tegra/linux: (30 commits)
        drm/panel: simple: Use devm_gpiod_get_optional()
        drm/dsi: Replace upcasting macro by function
        drm/panel: ld9040: Replace upcasting macro by function
        drm/exynos: dp: Modify driver to support drm_panel
        drm/exynos: Move DP setup into commit()
        drm/panel: simple: Add AUO B133HTN01 panel support
        drm/panel: simple: Support delays in panel functions
        drm/panel: simple: Add proper definition for prepare and unprepare
        drm/panel: s6e8aa0: Add proper definition for prepare and unprepare
        drm/panel: ld9040: Add proper definition for prepare and unprepare
        drm/tegra: Add support for panel prepare and unprepare routines
        drm/exynos: dsi: Add support for panel prepare and unprepare routines
        drm/exynos: dpi: Add support for panel prepare and unprepare routines
        drm/panel: simple: Add dummy prepare and unprepare routines
        drm/panel: s6e8aa0: Add dummy prepare and unprepare routines
        drm/panel: ld9040: Add dummy prepare and unprepare routines
        drm/panel: Provide convenience wrapper for .get_modes()
        drm/panel: add .prepare() and .unprepare() functions
        drm/panel: simple: Remove simple-panel compatible
        drm/panel: simple: Add Innolux N116BGE panel support
        ...
      0c6287ec
    • A
      drm/panel: simple: Use devm_gpiod_get_optional() · 9746c619
      Alexandre Courbot 提交于
      Use the new devm_gpiod_get_optional() to simplify the probe code.
      Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      9746c619
  5. 06 8月, 2014 24 次提交
  6. 05 8月, 2014 9 次提交
    • M
      drm/radeon: Prevent hdmi deep color if max_tmds_clock is undefined. · 9f51e2e0
      Mario Kleiner 提交于
      HDMI spec requires a valid max_tmds_clock from edid for hdmi
      deep color modes. If a sink violates this, disable deep color.
      
      Also add a hint to user about the deep_color module parameter if
      deep color is disabled due to that.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      9f51e2e0
    • D
      drm: make sysfs device always available for minors · e1728075
      David Herrmann 提交于
      For each minor we allocate a sysfs device as minor->kdev. Currently, this
      is allocated and registered in drm_minor_register(). This makes it
      impossible to add sysfs-attributes to the device before it is registered.
      Therefore, they are not added atomically, nor can we move device_add()
      *after* ->load() is called.
      
      This patch makes minor->kdev available early, but only adds the device
      during minor-registration. Note that the registration is still called
      before ->load() as debugfs needs to be split, too. This will be fixed in
      follow-ups.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      e1728075
    • D
      drm: make minor->index available early · f1b85962
      David Herrmann 提交于
      Instead of allocating the minor-index during registration, we now do this
      during allocation. This way, debug-messages between minor-allocation and
      minor-registration will now use the correct minor instead of 0. Same is
      done for unregistration vs. free, so debug-messages between
      device-shutdown and device-destruction show proper indices.
      
      Even though minor-indices are allocated early, we don't enable minor
      lookup early. Instead, we keep the entry set to NULL and replace it during
      registration / unregistration. This way, the index is allocated but lookup
      only works if registered.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      f1b85962
    • D
      drm: merge drm_drv.c into drm_ioctl.c · ec8f112d
      David Herrmann 提交于
      All that is left in drm_drv.c is ioctl management. Merge it into
      drm_ioctl.c so we have all ioctl management in one file (and the name is
      much more fitting).
      
      Maybe we should now rename drm_stub.c to drm_drv.c again?
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      ec8f112d
    • D
      drm: move module initialization to drm_stub.c · 1b7199fe
      David Herrmann 提交于
      Most of the new DRM management functions are nowadays in drm_stub.c. By
      moving the core module initialization to drm_stub.c we can make several
      global variables static and keep the stub-open helper local.
      
      The core files now look like this:
        drm_stub.c: Core management
         drm_drv.c: Ioctl dispatcher
       drm_ioctl.c: Actual ioctl backends
        drm_fops.c: Char-dev file-operations
      
      A follow-up patch will move what is left from drm_drv.c into drm_ioctl.c.
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      1b7199fe
    • D
      drm: don't de-authenticate clients on master-close · 3cb01a98
      David Herrmann 提交于
      If an active DRM-Master closes its device, we deauthenticate all clients
      on that master. However, if an inactive DRM-Master closes its device, we
      do nothing. This is quite inconsistent and breaks several scenarios:
      
       1) If this was used as security mechanism, it fails horribly if a master
          closes a device while VT switched away. Furthermore, none of the few
          drivers using ->master_*() callbacks seems to require it, anyway.
      
       2) If you spawn weston (or any other non-UMS compositor) in background
          while another compositor is active, both will get assigned to the
          same "drm_master" object. If the foreground compositor now exits, all
          clients of both the foreground AND background compositor will be
          de-authenticated leading to unexpected behavior.
      
      Stop this non-sense and keep clients authenticated. We don't do this when
      dropping DRM-Master (i.e., switching VTs) so don't do it on active-close
      either!
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      3cb01a98
    • D
      drm: drop redundant drm_file->is_master · 48ba8137
      David Herrmann 提交于
      The drm_file->is_master field is redundant as it's equivalent to:
          drm_file->master && drm_file->master == drm_file->minor->master
      
      1) "=>"
        Whenever we set drm_file->is_master, we also set:
            drm_file->minor->master = drm_file->master;
      
        Whenever we clear drm_file->is_master, we also call:
            drm_master_put(&drm_file->minor->master);
        which implicitly clears it to NULL.
      
      2) "<="
        minor->master cannot be set if it is non-NULL. Therefore, it stays as
        is unless a file drops it.
      
        If minor->master is NULL, it is only set by places that also adjust
        drm_file->is_master.
      
      Therefore, we can safely drop is_master and replace it by an inline helper
      that matches:
          drm_file->master && drm_file->master == drm_file->minor->master
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      48ba8137
    • D
      drm: extract legacy ctxbitmap flushing · 9f8d21ea
      David Herrmann 提交于
      The ctxbitmap code is only used by legacy drivers so lets try to keep it
      as separated as possible. Furthermore, the locking is non-obvious and
      kinda weird with ctxlist_mutex *and* struct_mutex. Keeping all ctxbitmap
      access in one file is much easier to review and makes drm_release() more
      readable.
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      9f8d21ea
    • M
      drm/radeon: Use pflip irqs for pageflip completion if possible. (v2) · 39dc5454
      Mario Kleiner 提交于
      Skip the "manual" pageflip completion checks via polling and
      guessing in the vblank handler radeon_crtc_handle_vblank() on
      asics which are known to reliably support hw pageflip completion
      irqs. Those pflip irqs are a more reliable and race-free method
      of handling pageflip completion detection, whereas the "classic"
      polling method has some small races in combination with dpm on,
      and with the reworked pageflip implementation since Linux 3.16.
      
      On old asics without pflip irqs, the classic method is used.
      
      On asics with known good pflip irqs, only pflip irqs are used
      by default, but a new module parameter "use_pflipirqs" allows to
      override this in case we encounter asics in the wild with
      unreliable or faulty pflip irqs. A module parameter of 0 allows
      to use the classic method only in such a case. A parameter of 1
      allows to use both classic method and pflip irqs as additional
      band-aid to avoid some small races which could happen with the
      classic method alone. The setting 1 gives Linux 3.16 behaviour.
      
      Hw pflip irqs are available since R600.
      
      Tested on DCE-4, AMD Cedar - FirePro 2270.
      
      v2:  agd5f: only enable pflip interrupts on DCE4+ as they are not
      reliable on older asics.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      39dc5454