1. 28 1月, 2019 8 次提交
  2. 24 1月, 2019 1 次提交
  3. 09 1月, 2019 1 次提交
  4. 12 12月, 2018 1 次提交
  5. 21 11月, 2018 3 次提交
  6. 30 10月, 2018 4 次提交
  7. 12 9月, 2018 1 次提交
    • P
      qxl: refactor to use drm_fb_helper_fbdev_setup · bf8744e4
      Peter Wu 提交于
      Lots of code can be removed by relying on fb-helper:
      - "struct drm_framebuffer" moves to fb_helper.fb.
      - "struct drm_gem_object" moves to fb_helper.obj[0].
      - "struct qxl_device" can be inferred as drm_fb_helper is embedded.
      - qxl_user_framebuffer_create -> drm_gem_fb_create.
      - qxl_user_framebuffer_destroy -> drm_gem_fb_destroy.
      - qxl_fbdev_destroy -> drm_fb_helper_fbdev_teardown + vfree(shadow).
      
      Remove unused code:
      - qxl_fbdev_qobj_is_fb, qxl_fbdev_set_suspend.
      - Unused fields of qxl_fbdev: delayed_ops, delayed_ops_lock, size.
      
      Misc notes:
      - The dirty callback is preserved as it is necessary to trigger update
        commands in the hw (the screen stays black otherwise).
      - No idea when .create_handle in drm_framebuffer_funcs is used, but use
        the same drm_gem_fb_create_handle to match drm_gem_fb_funcs.
      - I don't know why qxl_fb_find_or_create_single used to check for an
        existing framebuffer and removed that check to match other drivers.
      - Use of drm_fb_helper_fbdev_teardown also requires "info->fbdefio" to
        be dynamically allocated. Replace the existing defio config by
        drm_fb_helper_defio_init to accomodate this.
      
      Testing results: startx with fbdev, modesetting and qxl all seems to
      work. Tested also with CONFIG_DRM_FBDEV_EMULATION=n, fbdev obviously
      fails but others are fine. QEMU -spice and QEMU -spice with vdagent and
      multiple (resized) displays (via remote-viewer) also works.
      unbind vtconsole and rmmod has *not* regressed (i.e. it still trips on a
      use-after-free in qxl_check_idle via qxl_ttm_fini).
      
      Ideally setup/teardown is replaced by drm_fbdev_generic_setup as that
      would result in further code reduction, improve error handling (like not
      leaking shadow memory), but unfortunately QXL has no implementation for
      qxl_gem_prime_vmap.
      Signed-off-by: NPeter Wu <peter@lekensteyn.nl>
      Link: http://patchwork.freedesktop.org/patch/msgid/20180910132156.23201-1-peter@lekensteyn.nlSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
      bf8744e4
  8. 10 8月, 2018 1 次提交
  9. 14 7月, 2018 1 次提交
  10. 04 6月, 2018 1 次提交
  11. 27 4月, 2018 4 次提交
  12. 25 4月, 2018 1 次提交
  13. 21 3月, 2018 1 次提交
  14. 08 12月, 2017 2 次提交
  15. 23 10月, 2017 1 次提交
    • G
      qxl: alloc & use shadow for dumb buffers · 62676d10
      Gerd Hoffmann 提交于
      This patch changes the way the primary surface is used for dumb
      framebuffers.  Instead of configuring the bo itself as primary surface
      a shadow bo is created and used instead.  Framebuffers can share the
      shadow bo in case they have the same format and resolution.
      
      On atomic plane updates we don't have to update the primary surface in
      case we pageflip from one framebuffer to another framebuffer which
      shares the same shadow.  This in turn avoids the flicker caused by the
      primary-destroy + primary-create cycle, which is very annonying when
      running wayland on qxl.
      
      The qxl driver never actually writes to the shadow bo.  It sends qxl
      blit commands which update it though, and the spice server might
      actually execute them (and thereby write to the shadow) in case the
      local rendering is kicked for some reason.  This happens for example in
      case qemu is asked to write out a dump of the guest display (screendump
      monitor command).
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NDave Airlie <airlied@redhat.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20171019062150.28090-3-kraxel@redhat.com
      62676d10
  16. 25 9月, 2017 1 次提交
  17. 12 9月, 2017 1 次提交
  18. 02 8月, 2017 1 次提交
    • B
      drm: Plumb modifiers through plane init · e6fc3b68
      Ben Widawsky 提交于
      This is the plumbing for supporting fb modifiers on planes. Modifiers
      have already been introduced to some extent, but this series will extend
      this to allow querying modifiers per plane. Based on this, the client to
      enable optimal modifications for framebuffers.
      
      This patch simply allows the DRM drivers to initialize their list of
      supported modifiers upon initializing the plane.
      
      v2: A minor addition from Daniel
      
      v3:
      * Updated commit message
      * s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu)
      * Remove some excess newlines (Liviu)
      * Update comment for > 64 modifiers (Liviu)
      
      v4: Minor comment adjustments (Liviu)
      
      v5: Some new platforms added due to rebase
      
      v6: Add some missed plane inits (or maybe they're new - who knows at
      this point) (Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
      Reviewed-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NDaniel Stone <daniels@collabora.com>
      e6fc3b68
  19. 30 6月, 2017 2 次提交
  20. 28 6月, 2017 2 次提交
  21. 23 6月, 2017 1 次提交
  22. 23 5月, 2017 1 次提交
    • G
      drm: qxl: Delay entering atomic context during cursor update · 429030bc
      Gabriel Krisman Bertazi 提交于
      qxl_release_map will enter an atomic context, but since we still need to
      alloc memory for BOs, we better delay that until we have everything we
      need, in case we need to sleep inside the allocation.  This avoids the
      Sleep in atomic state below, which was reported by Mike.
      
       [   43.910362] BUG: sleeping function called from invalid context at mm/slab.h:432
       [   43.910955] in_atomic(): 1, irqs_disabled(): 0, pid: 2077, name: Xorg
       [   43.911472] Preemption disabled at:
       [   43.911478] [<ffffffffa02b1c45>] qxl_bo_kmap_atomic_page+0xa5/0x100 [qxl]
       [   43.912103] CPU: 0 PID: 2077 Comm: Xorg Tainted: G            E   4.12.0-master #38
       [ 43.912550] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
       rel-1.8.1-0-g4adadbd-20161202_174313-build11a 04/01/2014
       [   43.913202] Call Trace:
       [   43.913371]  dump_stack+0x65/0x89
       [   43.913581]  ? qxl_bo_kmap_atomic_page+0xa5/0x100 [qxl]
       [   43.913876]  ___might_sleep+0x11a/0x190
       [   43.914095]  __might_sleep+0x4a/0x80
       [   43.914319]  ? qxl_bo_create+0x50/0x190 [qxl]
       [   43.914565]  kmem_cache_alloc_trace+0x46/0x180
       [   43.914836]  qxl_bo_create+0x50/0x190 [qxl]
       [   43.915082]  ? refcount_dec_and_test+0x11/0x20
       [   43.915332]  ? ttm_mem_io_reserve+0x41/0xe0 [ttm]
       [   43.915595]  qxl_alloc_bo_reserved+0x37/0xb0 [qxl]
       [   43.915884]  qxl_cursor_atomic_update+0x8f/0x260 [qxl]
       [   43.916172]  ? drm_atomic_helper_update_legacy_modeset_state+0x1d6/0x210 [drm_kms_helper]
       [   43.916623]  drm_atomic_helper_commit_planes+0xec/0x230 [drm_kms_helper]
       [   43.916995]  drm_atomic_helper_commit_tail+0x2b/0x60 [drm_kms_helper]
       [   43.917398]  commit_tail+0x65/0x70 [drm_kms_helper]
       [   43.917693]  drm_atomic_helper_commit+0xa9/0x100 [drm_kms_helper]
       [   43.918039]  drm_atomic_commit+0x4b/0x50 [drm]
       [   43.918334]  drm_atomic_helper_update_plane+0xf1/0x110 [drm_kms_helper]
       [   43.918902]  __setplane_internal+0x19f/0x280 [drm]
       [   43.919240]  drm_mode_cursor_universal+0x101/0x1c0 [drm]
       [   43.919541]  drm_mode_cursor_common+0x15b/0x1d0 [drm]
       [   43.919858]  drm_mode_cursor2_ioctl+0xe/0x10 [drm]
       [   43.920157]  drm_ioctl+0x211/0x460 [drm]
       [   43.920383]  ? drm_mode_cursor_ioctl+0x50/0x50 [drm]
       [   43.920664]  ? handle_mm_fault+0x93/0x160
       [   43.920893]  do_vfs_ioctl+0x96/0x6e0
       [   43.921117]  ? __fget+0x73/0xa0
       [   43.921322]  SyS_ioctl+0x41/0x70
       [   43.921545]  entry_SYSCALL_64_fastpath+0x1a/0xa5
       [   43.922188] RIP: 0033:0x7f1145804bc7
       [   43.922526] RSP: 002b:00007ffcd3e50508 EFLAGS: 00003246 ORIG_RAX: 0000000000000010
       [   43.923367] RAX: ffffffffffffffda RBX: 0000000000000040 RCX: 00007f1145804bc7
       [   43.923852] RDX: 00007ffcd3e50540 RSI: 00000000c02464bb RDI: 000000000000000b
       [   43.924299] RBP: 0000000000000040 R08: 0000000000000040 R09: 000000000000000c
       [   43.924694] R10: 00007ffcd3e50340 R11: 0000000000003246 R12: 0000000000000018
       [   43.925128] R13: 00000000022bc390 R14: 0000000000000040 R15: 00007ffcd3e5062c
      Reported-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170519175819.15682-1-krisman@collabora.co.ukSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
      429030bc