1. Dec 19, 2016
  2. Dec 13, 2016
  3. Dec 11, 2016
    • Daniel Vetter's avatar
      drm: Add fake controlD* symlinks for backwards compat · 6449b088
      Daniel Vetter authored
      We thought that no userspace is using them, but oops libdrm is using
      them to figure out whether a driver supports modesetting. Check out
      drmCheckModesettingSupported but maybe don't because it's horrible and
      totally runs counter to where we want to go with libdrm device
      handling. The function looks in the device hierarchy for whether
      controlD* exist using the following format string:
      
      /sys/bus/pci/devices/%04x:%02x:%02x.%d/drm/controlD%d
      
      The "/drm" subdirectory is the glue directory from the sysfs class
      stuff, and the only way to get at it seems to through
      kdev->kobj.parent (when kdev is represents e.g. the card0 chardev
      instance in sysfs). Git grep says we're not the only ones touching
      that, so I hope it's ok we dig into such internals - I couldn't find a
      proper interface for getting at the glue directory.
      
      Quick git grep shows that at least -amdgpu, -ati are using this.
      -modesetting do not, and on -intel it's only about the 4th fallback
      path for device lookup, which is why this didn't blow up earlier.
      
      Oh well, we need to keep it working, and the simplest way is to add a
      symlink at the right place in sysfs from controlD* to card*.
      
      v2:
      - Fix error path handling by adding if (!minor) return checks (David)
      - Fix the controlD* numbers to match what's been there (David)
      - Add a comment what exactly userspace minimally needs.
      - Correct the analysis for -intel (Chris).
      
      Fixes: 8a357d10
      
       ("drm: Nerf DRM_CONTROL nodes")
      Cc: Dave Airlie <airlied@gmail.com>
      Reported-and-tested-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Acked-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161209135656.14881-1-daniel.vetter@ffwll.ch
      6449b088
  4. Dec 10, 2016
  5. Dec 09, 2016
    • Dave Airlie's avatar
      Merge tag 'drm-fsl-dcu-for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next · 25dfd7cf
      Dave Airlie authored
      Some fixes and cleanup, mainly around fbdev emulation. It also adds a
      new module parameter which allows to specify the color depth/bpp for
      the fbdev emulation (like the IMX DRM driver).
      
      * tag 'drm-fsl-dcu-for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu:
        drm/fsl-dcu: introduce kernel parameter to specify fbdev depth
        drm/fsl-dcu: remove separate compilation unit for fbdev emulation
        drm/fsl-dcu: Propagate the real error code
        drm/fsl-dcu: Remove unneeded NULL check
        drm/fsl-dcu: disable outputs before unloading driver
        drm/fsl-dcu: unload driver before disabling clocks
      25dfd7cf
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2016-12-08' of git://anongit.freedesktop.org/git/drm-misc into drm-next · acc5ddd9
      Dave Airlie authored
      Another pile of misc stuff, final one for 4.10. If there's some serious
      bugfix still I'll send you a pull for drm-misc-next-fixes (like we do with
      intel), otherwise this is it and next pull next year for 4.11.
      
      Most interesting bits are probably Chris' fb helper fixes against mst
      hotplug oopses.
      
      * tag 'drm-misc-next-2016-12-08' of git://anongit.freedesktop.org/git/drm-misc: (22 commits)
        drm: Take ownership of the dmabuf->obj when exporting
        drm: Allow CAP_PRIME on !MODESET
        drm/fence: add drm_crtc_create_fence()
        drm/bridge: analogix: Don't return -EINVAL when panel doesn't support PSR
        drm/atomic: doc: remove old comment about nonblocking commits
        drm: Don't block the kworker waiting for mode_config.mutex in output_poll()
        drm: Return -ENOTSUPP when called for KMS cap with a non-KMS driver
        drm/amdgpu: don't add files at control minor debugfs directory
        drm: allow changing DPMS mode
        drm/qxl: fix use of uninitialized variable
        drm/qxl: Don't register debugfs for control minors
        drm/radeon: don't add files at control minor debugfs directory
        drm/vmwgfx: Switch to mode_cmd2
        drm/vgem: Use ww_mutex_(un)lock even with a NULL context
        drm: Make the connector .detect() callback optional
        drm/bridge: tc358767: don't warn if display side ASSR enable fails
        drm: Initialise drm_mm.head_node.allocated
        drm: Fix locking cargo-cult in encoder/plane init/cleanup
        drm/doc: Fix indenting in drm_modeset_lock.c comment
        drm: Protect fb_helper list manipulation with a mutex
        ...
      acc5ddd9
    • Dave Airlie's avatar
      Merge branch 'drm-next-4.10' of git://people.freedesktop.org/~agd5f/linux into drm-next · bfd5be0f
      Dave Airlie authored
      Misc fixes and cleanups for 4.10. Highlights:
      - Cursor fixes for radeon and amdgpu
      - DPM fixes for some new SI variants
      - Powerplay fixes
      - Clock and powergating fixes
      
      * 'drm-next-4.10' of git://people.freedesktop.org/~agd5f/linux: (39 commits)
        drm/amdgpu/dce6: Set MASTER_UPDATE_MODE to 0 in resume_mc_access as well
        drm/amdgpu: use pin rather than pin_restricted in a few cases
        drm/amd/powerplay: use pr_debug to print function not implemented message
        drm/amd/amdgpu: Add gpr reading for GFX v7
        drm/amd/amdgpu: Add gpr reading for GFX v6
        drm/amd/amdgpu: Add debugfs support for reading GPRs (v2)
        drm/amd/amdgpu: export vbios information (v2)
        drm/amd/amdgpu: stored bios_size
        drm/amdgpu: update golden setting of tonga
        drm/amdgpu/si: load the proper firmware on 0x87 oland boards
        drm/amdgpu: add additional pci revision to dpm workaround
        drm/radeon/si: load the proper firmware on 0x87 oland boards
        drm/radeon: add additional pci revision to dpm workaround
        drm/amd/powerplay: Fix potential NULL pointer issue
        drm/amdgpu: Don't touch GFX hw during HW fini
        drm/amd/powerplay: Adjust the position of data size initial
        drm/amd/powerplay: Ignore smu buffer usage
        drm/amd/powerplay: cut digest part
        drm/amdgpu: drop redundant vi_mqd define
        drm/amdgpu: fix gtt available page num accounting
        ...
      bfd5be0f
    • Dave Airlie's avatar
      Merge tag 'omapdrm-4.10-fixes' of... · 6f218909
      Dave Airlie authored
      Merge tag 'omapdrm-4.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next
      
      omapdrm fixes for v4.10
      
      * fix tpd12s015's error handling, which causes omap5 uevm HDMI to fail
      * fix omapdrm primary plane allocation bug, which makes the display to fail to
        come up
      
      * tag 'omapdrm-4.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
        drm/omap: tpd12s015: fix error handling
        drm/omap: fix primary-plane's possible_crtcs
        drm: fix possible_crtc's type
      6f218909