1. 02 8月, 2017 1 次提交
    • B
      drm: Create a format/modifier blob · db1689aa
      Ben Widawsky 提交于
      Updated blob layout (Rob, Daniel, Kristian, xerpi)
      
      v2:
      * Removed __packed, and alignment (.+)
      * Fix indent in drm_format_modifier fields (Liviu)
      * Remove duplicated modifier > 64 check (Liviu)
      * Change comment about modifier (Liviu)
      * Remove arguments to blob creation, use plane instead (Liviu)
      * Fix data types (Ben)
      * Make the blob part of uapi (Daniel)
      
      v3:
      Remove unused ret field.
      Change i, and j to unsigned int (Emil)
      
      v4:
      Use plane->modifier_count instead of recounting (Daniel)
      
      v5:
      Rename modifiers to modifiers_property (Ville)
      Use sizeof(__u32) instead to reflect UAPI nature (Ville)
      Make BUILD_BUG_ON for blob header size
      
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Kristian H. Kristensen <hoegsberg@gmail.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
      Reviewed-by: Liviu Dudau <liviu@dudau.co.uk> (v2)
      Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v3)
      Signed-off-by: NDaniel Stone <daniels@collabora.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170724034641.13369-2-ben@bwidawsk.net
      db1689aa
  2. 22 5月, 2017 1 次提交
  3. 27 2月, 2017 1 次提交
    • M
      drm: Add a new connector atomic property for link status · 40ee6fbe
      Manasi Navare 提交于
      At the time userspace does setcrtc, we've already promised the mode
      would work. The promise is based on the theoretical capabilities of
      the link, but it's possible we can't reach this in practice. The DP
      spec describes how the link should be reduced, but we can't reduce
      the link below the requirements of the mode. Black screen follows.
      
      One idea would be to have setcrtc return a failure. However, it
      already should not fail as the atomic checks have passed. It would
      also conflict with the idea of making setcrtc asynchronous in the
      future, returning before the actual mode setting and link training.
      
      Another idea is to train the link "upfront" at hotplug time, before
      pruning the mode list, so that we can do the pruning based on
      practical not theoretical capabilities. However, the changes for link
      training are pretty drastic, all for the sake of error handling and
      DP compliance, when the most common happy day scenario is the current
      approach of link training at mode setting time, using the optimal
      parameters for the mode. It is also not certain all hardware could do
      this without the pipe on; not even all our hardware can do this. Some
      of this can be solved, but not trivially.
      
      Both of the above ideas also fail to address link degradation *during*
      operation.
      
      The solution is to add a new "link-status" connector property in order
      to address link training failure in a way that:
      a) changes the current happy day scenario as little as possible, to
      avoid regressions, b) can be implemented the same way by all drm
      drivers, c) is still opt-in for the drivers and userspace, and opting
      out doesn't regress the user experience, d) doesn't prevent drivers
      from implementing better or alternate approaches, possibly without
      userspace involvement. And, of course, handles all the issues presented.
      In the usual happy day scenario, this is always "good". If something
      fails during or after a mode set, the kernel driver can set the link
      status to "bad" and issue a hotplug uevent for userspace to have it
      re-check the valid modes through GET_CONNECTOR IOCTL, and try modeset
      again. If the theoretical capabilities of the link can't be reached,
      the mode list is trimmed based on that.
      
      v7 by Jani:
      * Rebase, simplify set property while at it, checkpatch fix
      v6:
      * Fix a typo in kernel doc (Sean Paul)
      v5:
      * Clarify doc for silent rejection of atomic properties by driver (Daniel Vetter)
      v4:
      * Add comments in kernel-doc format (Daniel Vetter)
      * Update the kernel-doc for link-status (Sean Paul)
      v3:
      * Fixed a build error (Jani Saarinen)
      v2:
      * Removed connector->link_status (Daniel Vetter)
      * Set connector->state->link_status in drm_mode_connector_set_link_status_property
      (Daniel Vetter)
      * Set the connector_changed flag to true if connector->state->link_status changed.
      * Reset link_status to GOOD in update_output_state (Daniel Vetter)
      * Never allow userspace to set link status from Good To Bad (Daniel Vetter)
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: NTony Cheng <tony.cheng@amd.com>
      Acked-by: NHarry Wentland <harry.wentland@amd.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Sean Paul <seanpaul@chromium.org>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: Eric Anholt <eric@anholt.net> (for the -modesetting patch)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/0182487051aa9f1594820e35a4853de2f8747b4e.1481883920.git.jani.nikula@intel.com
      40ee6fbe
  4. 10 12月, 2016 1 次提交
  5. 17 11月, 2016 1 次提交
  6. 15 11月, 2016 1 次提交
  7. 08 11月, 2016 1 次提交
  8. 17 10月, 2016 2 次提交
  9. 11 8月, 2016 1 次提交
  10. 13 5月, 2016 1 次提交
  11. 01 4月, 2016 1 次提交
    • E
      drm: Add an encoder and connector type enum for DPI. · 0b27c02a
      Eric Anholt 提交于
      Right now exynos is exposing DPI as a TMDS encoder and VGA connector,
      which seems rather misleading.  This isn't just an internal detail,
      since xrandr actually exposes "VGA" as the output name.  Define some
      new enums so that vc4's DPI can have a more informative name.
      
      I considered other names for the connector as well.  For VC4, the
      Adafruit DPI kippah takes the 28 GPIO pins and routes them to a
      standard-ish 40-pin FPC connector, but "40-pin FPC" doesn't uniquely
      identify an ordering of pins (apparently some other orderings exist),
      doesn't explain things as well for the user (who, if anything, knows
      their product is a DPI kippah/panel combo), and actually doesn't have
      to exist (one could connect the 28 GPIOs directly to something else).
      Simply "DPI" seems like a good compromise name to distinguish from the
      HDMI, DSI, and TV connectors .
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0b27c02a
  12. 31 3月, 2016 1 次提交
  13. 08 3月, 2016 1 次提交
  14. 10 12月, 2015 2 次提交
  15. 08 9月, 2015 1 次提交
  16. 22 5月, 2015 1 次提交
  17. 14 2月, 2015 1 次提交
    • R
      drm: add support for tiled/compressed/etc modifier in addfb2 · e3eb3250
      Rob Clark 提交于
      In DRM/KMS we are lacking a good way to deal with tiled/compressed
      formats.  Especially in the case of dmabuf/prime buffer sharing, where
      we cannot always rely on under-the-hood flags passed to driver specific
      gem-create ioctl to pass around these extra flags.
      
      The proposal is to add a per-plane format modifier.  This allows to, if
      necessary, use different tiling patters for sub-sampled planes, etc.
      The format modifiers are added at the end of the ioctl struct, so for
      legacy userspace it will be zero padded.
      
      v1: original
      v1.5: increase modifier to 64b
      
      v2: Incorporate review comments from the big thread, plus a few more.
      
      - Add a getcap so that userspace doesn't have to jump through hoops.
      - Allow modifiers only when a flag is set. That way drivers know when
        they're dealing with old userspace and need to fish out e.g. tiling
        from other information.
      - After rolling out checks for ->modifier to all drivers I've decided
        that this is way too fragile and needs an explicit opt-in flag. So
        do that instead.
      - Add a define (just for documentation really) for the "NONE"
        modifier. Imo we don't need to add mask #defines since drivers
        really should only do exact matches against values defined with
        fourcc_mod_code.
      - Drop the Samsung tiling modifier on Rob's request since he's not yet
        sure whether that one is accurate.
      
      v3:
      - Also add a new ->modifier[] array to struct drm_framebuffer and fill
        it in drm_helper_mode_fill_fb_struct. Requested by Tvrkto Uruslin.
      - Remove TODO in comment and add code comment that modifiers should be
        properly documented, requested by Rob.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Daniel Stone <daniel@fooishbar.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Signed-off-by: Rob Clark <robdclark@gmail.com> (v1.5)
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Acked-by: NDave Airlie <airlied@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      e3eb3250
  18. 05 1月, 2015 2 次提交
    • R
      drm: Atomic modeset ioctl · d34f20d6
      Rob Clark 提交于
      The atomic modeset ioctl can be used to push any number of new values
      for object properties. The driver can then check the full device
      configuration as single unit, and try to apply the changes atomically.
      
      The ioctl simply takes a list of object IDs and property IDs and their
      values.
      
      Originally based on a patch from Ville Syrjälä, although it has mutated
      (mutilated?) enough since then that you probably shouldn't blame it on
      him ;-)
      
      The atomic support is hidden behind the DRM_CLIENT_CAP_ATOMIC cap (to
      protect legacy userspace) and drm.atomic module param (for now).
      
      v2: Check for file_priv->atomic to make sure we only allow userspace
      in-the-know to use atomic.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d34f20d6
    • R
      drm: add atomic properties · 88a48e29
      Rob Clark 提交于
      Once a driver is using atomic helpers for modeset, the next step is to
      switch over to atomic properties.  To do this, make sure that any
      modeset objects have their ->atomic_{get,set}_property() vfuncs suitably
      populated if they have custom properties (you did already remember to
      plug in atomic-helper func for the legacy ->set_property() vfuncs,
      right?), and then set DRIVER_ATOMIC bit in driver_features flag.
      
      A new cap is introduced, DRM_CLIENT_CAP_ATOMIC, for the purposes of
      shielding legacy userspace from atomic properties.  Mostly for the
      benefit of legacy DDX drivers that do silly things like getting/setting
      each property at startup (since some of the new atomic properties will
      be able to trigger modeset).
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      [danvet: Squash in fixup patch to check for DRM_MODE_PROP_ATOMIC
      instaed of the CAP define when filtering properties. Reported by
      Tvrtko Uruslin, acked by Rob.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88a48e29
  19. 11 12月, 2014 1 次提交
  20. 20 11月, 2014 1 次提交
    • D
      drm: s/enum_blob_list/enum_list/ in drm_property · 3758b341
      Daniel Vetter 提交于
      I guess for hysterical raisins this was meant to be the way to read
      blob properties. But that's done with the two-stage approach which
      uses separate blob kms object and the special-purpose get_blob ioctl.
      
      Shipping userspace seems to have never relied on this, and the kernel
      also never put any blob thing onto that property. And nowadays it
      would blow up, e.g. in drm_property_destroy. Also it makes no sense to
      return values in an ioctl that only returns metadata about everything.
      
      So let's ditch all the internal code for the blob list, rename the
      list to be unambiguous and sprinkle comments all over the place to
      explain this peculiar piece of api.
      
      v2: Squash in fixup from Rob to remove now unused variables.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3758b341
  21. 23 7月, 2014 1 次提交
  22. 04 6月, 2014 3 次提交
  23. 30 5月, 2014 1 次提交
  24. 18 10月, 2013 1 次提交
    • C
      drm: Pad drm_mode_get_connector to 64-bit boundary · bc5bd37c
      Chris Wilson 提交于
      Pavel Roskin reported that DRM_IOCTL_MODE_GETCONNECTOR was overwritting
      the 4 bytes beyond the end of its structure with a 32-bit userspace
      running on a 64-bit kernel. This is due to the padding gcc inserts as
      the drm_mode_get_connector struct includes a u64 and its size is not a
      natural multiple of u64s.
      
      64-bit kernel:
      
      sizeof(drm_mode_get_connector)=80, alignof=8
      sizeof(drm_mode_get_encoder)=20, alignof=4
      sizeof(drm_mode_modeinfo)=68, alignof=4
      
      32-bit userspace:
      
      sizeof(drm_mode_get_connector)=76, alignof=4
      sizeof(drm_mode_get_encoder)=20, alignof=4
      sizeof(drm_mode_modeinfo)=68, alignof=4
      
      Fortuituously we can insert explicit padding to the tail of our
      structures without breaking ABI.
      Reported-by: NPavel Roskin <proski@gnu.org>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      bc5bd37c
  25. 01 10月, 2013 3 次提交
  26. 04 9月, 2013 1 次提交
  27. 30 8月, 2013 1 次提交
  28. 28 6月, 2013 1 次提交
    • D
      drm: add hotspot support for cursors. · 4c813d4d
      Dave Airlie 提交于
      So it looks like for virtual hw cursors on QXL we need to inform
      the "hw" device what the cursor hotspot parameters are. This
      makes sense if you think the host has to draw the cursor and interpret
      clicks from it. However the current modesetting interface doesn't support
      passing the hotspot information from userspace.
      
      This implements a new cursor ioctl, that takes the hotspot info as well,
      userspace can try calling the new interface and if it gets -ENOSYS it means
      its on an older kernel and can just fallback.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4c813d4d
  29. 12 4月, 2013 1 次提交
  30. 05 10月, 2012 1 次提交
  31. 24 8月, 2012 1 次提交
  32. 22 5月, 2012 1 次提交
  33. 17 5月, 2012 1 次提交