1. 21 9月, 2018 4 次提交
  2. 20 9月, 2018 3 次提交
  3. 19 9月, 2018 6 次提交
  4. 15 9月, 2018 1 次提交
    • C
      drm: Differentiate the lack of an interface from invalid parameter · 69fdf420
      Chris Wilson 提交于
      If the ioctl is not supported on a particular piece of HW/driver
      combination, report ENOTSUP (aka EOPNOTSUPP) so that it can be easily
      distinguished from both the lack of the ioctl and from a regular invalid
      parameter.
      
      v2: Across all the kms ioctls we had a mixture of reporting EINVAL,
      ENODEV and a few ENOTSUPP (most where EINVAL) for a failed
      drm_core_check_feature(). Update everybody to report ENOTSUPP.
      
      v3: ENOTSUPP is an internal errno! It's value (524) does not correspond
      to a POSIX errno, the one we want is ENOTSUP. However,
      uapi/asm-generic/errno.h doesn't include ENOTSUP but man errno says
      
      	"ENOTSUP and EOPNOTSUPP have the same value on Linux,
      	but according to POSIX.1 these error values should be
      	distinct."
      
      so use EOPNOTSUPP as its equivalent.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v2
      Link: https://patchwork.freedesktop.org/patch/msgid/20180913192050.24812-1-chris@chris-wilson.co.uk
      69fdf420
  5. 14 9月, 2018 2 次提交
  6. 13 9月, 2018 4 次提交
  7. 12 9月, 2018 18 次提交
  8. 11 9月, 2018 2 次提交
    • D
      drm/fb: Stop leaking physical address · 6be8f3bd
      Daniel Vetter 提交于
      For buffer sharing, use dma-buf instead. We can't set smem_start to 0
      unconditionally since that's used by the fbdev mmap default
      implementation. And we have plenty of userspace which would like to
      keep that working.
      
      This might break legit userspace - if it does we need to look at a
      case-by-cases basis how to handle that. Worst case I expect overrides
      for only specific drivers, since anything remotely modern should be
      using dma-buf/prime now (which is about 7 years old now for DRM
      drivers).
      
      This issue was uncovered because Noralf's rework to implement a
      generic fb_probe also implements it's own fb_mmap callback. Which
      means smem_start didn't have to be set anymore, which blew up some
      blob in userspace rather badly.
      Acked-by: NSean Paul <seanpaul@chromium.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Noralf Trønnes <noralf@tronnes.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-4-daniel.vetter@ffwll.ch
      6be8f3bd
    • D
      fbdev: Add FBINFO_HIDE_SMEM_START flag · da6c7707
      Daniel Vetter 提交于
      DRM drivers really, really, really don't want random userspace to
      share buffer behind it's back, bypassing the dma-buf buffer sharing
      machanism. For that reason we've ruthlessly rejected any IOCTL
      exposing the physical address of any graphics buffer.
      
      Unfortunately fbdev comes with that built-in. We could just set
      smem_start to 0, but that means we'd have to hand-roll our own fb_mmap
      implementation. For good reasons many drivers do that, but
      smem_start/length is still super convenient.
      
      Hence instead just stop the leak in the ioctl, to keep fb mmap working
      as-is. A second patch will set this flag for all drm drivers.
      Acked-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: linux-fbdev@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-3-daniel.vetter@ffwll.ch
      da6c7707