1. 20 Dec, 2014 3 commits
  2. 18 Dec, 2014 1 commit
    • Keith Packard's avatar
      modesetting: [v2] Don't re-enable the cursor when loading the image · 5a541bd5
      Keith Packard authored
      Hidden cursors also have their image updated; re-enabling the cursor
      each time the image is set will cause it to re-appear.
      
       * Unifies the code that was in  drmmode_load_cursor_argb and
        drm_mode_show_cursor and moves it to a new drmmode_set_cursor
      
       * Add a new boolean, 'cursor_up', to the per-crtc
         private data to track whether the cursor should be displayed.
      
       * Call drmmode_set_cursor from drm_mode_show_cursor and, if
         the cursor should be displayed, from drm_mode_load_cursor_argb.
      
      v2: Call drmModeSetCursor2 when loading a new cursor image if the
          cursor should be displayed.
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
      5a541bd5
  3. 12 Dec, 2014 4 commits
    • Michel Dänzer's avatar
      glamor: Make sure glamor_egl_close_screen wraps glamor_close_screen · 0f5fdaf6
      Michel Dänzer authored
      The other way around fails to destroy the screen pixmap EGL image:
      
      ==1782== 80 (32 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 981 of 2,171
      ==1782==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
      ==1782==    by 0xF9D4BD2: dri2_create_image_from_dri (egl_dri2.c:1264)
      ==1782==    by 0xF9D4BD2: dri2_create_image_dma_buf (egl_dri2.c:1764)
      ==1782==    by 0xF9D4BD2: dri2_create_image_khr (egl_dri2.c:1798)
      ==1782==    by 0xF9C7937: eglCreateImageKHR (eglapi.c:1494)
      ==1782==    by 0x85D5655: _glamor_egl_create_image (glamor_egl.c:134)
      ==1782==    by 0x85D5655: glamor_egl_create_textured_pixmap (glamor_egl.c:302)
      ==1782==    by 0x85D579B: glamor_egl_create_textured_screen (glamor_egl.c:225)
      ==1782==    by 0xC1BE05D: radeon_glamor_create_screen_resources (radeon_glamor.c:67)
      ==1782==    by 0xC1B6153: RADEONCreateScreenResources_KMS (radeon_kms.c:258)
      ==1782==    by 0x4B2105: xf86CrtcCreateScreenResources (xf86Crtc.c:709)
      ==1782==    by 0x43C823: dix_main (main.c:223)
      ==1782==    by 0x6CFAB44: (below main) (libc-start.c:287)
      Signed-off-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      0f5fdaf6
    • Michel Dänzer's avatar
      glamor: Make glamor_destroy_textured_pixmap idempotent · c8d4c0a2
      Michel Dänzer authored
      For robustness against drivers which may call both
      glamor_(egl_)destroy_textured_pixmap and glamor_destroy_pixmap.
      Signed-off-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      c8d4c0a2
    • Michel Dänzer's avatar
    • Michel Dänzer's avatar
      glamor: Fix use-after-free in glamor_destroy_textured_pixmap · 45b33352
      Michel Dänzer authored
      ==25551== Invalid read of size 8
      ==25551==    at 0x85D5F2C: glamor_egl_destroy_pixmap_image (glamor_egl.c:527)
      ==25551==    by 0x85D7750: glamor_destroy_pixmap (glamor.c:235)
      ==25551==    by 0xC1BDD9B: radeon_glamor_destroy_pixmap (radeon_glamor.c:278)
      ==25551==    by 0x5098F6: FreePicture (picture.c:1425)
      ==25551==    by 0x85DD7A9: glamor_unrealize_glyph_caches (glamor_glyphs.c:257)
      ==25551==    by 0x85D7B50: glamor_close_screen (glamor.c:586)
      ==25551==    by 0x4B1A82: xf86CrtcCloseScreen (xf86Crtc.c:734)
      ==25551==    by 0x4CFFC7: CursorCloseScreen (cursor.c:187)
      ==25551==    by 0x513A44: AnimCurCloseScreen (animcur.c:106)
      ==25551==    by 0x51529B: present_close_screen (present_screen.c:64)
      ==25551==    by 0x43CA83: dix_main (main.c:351)
      ==25551==    by 0x6CFAB44: (below main) (libc-start.c:287)
      ==25551==  Address 0x83dafa0 is 96 bytes inside a block of size 152 free'd
      ==25551==    at 0x4C29E90: free (vg_replace_malloc.c:473)
      ==25551==    by 0x85D76B4: glamor_destroy_textured_pixmap (glamor.c:225)
      ==25551==    by 0x85D7750: glamor_destroy_pixmap (glamor.c:235)
      ==25551==    by 0xC1BDD9B: radeon_glamor_destroy_pixmap (radeon_glamor.c:278)
      ==25551==    by 0x5098F6: FreePicture (picture.c:1425)
      ==25551==    by 0x85DD7A9: glamor_unrealize_glyph_caches (glamor_glyphs.c:257)
      ==25551==    by 0x85D7B50: glamor_close_screen (glamor.c:586)
      ==25551==    by 0x4B1A82: xf86CrtcCloseScreen (xf86Crtc.c:734)
      ==25551==    by 0x4CFFC7: CursorCloseScreen (cursor.c:187)
      ==25551==    by 0x513A44: AnimCurCloseScreen (animcur.c:106)
      ==25551==    by 0x51529B: present_close_screen (present_screen.c:64)
      ==25551==    by 0x43CA83: dix_main (main.c:351)
      Signed-off-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      45b33352
  4. 11 Dec, 2014 10 commits
  5. 09 Dec, 2014 22 commits