Skip to content
  1. May 18, 2021
  2. May 17, 2021
  3. May 15, 2021
  4. May 14, 2021
  5. May 13, 2021
    • Colin Ian King's avatar
      drm: simpledrm: Fix use after free issues · 0ff9bf9f
      Colin Ian King authored
      
      
      There are two occurrances where objects are being free'd via
      a put call and yet they are being referenced after this. Fix these
      by adding in the missing continue statement so that the put on the
      end of the loop is skipped over.
      
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Addresses-Coverity: ("Use after free")
      Fixes: 11e8f5fd ("drm: Add simpledrm driver")
      Link: https://patchwork.freedesktop.org/patch/msgid/20210512203051.299026-1-colin.king@canonical.com
      0ff9bf9f
    • Zou Wei's avatar
      drm/aperture: Fix missing unlock on error in devm_aperture_acquire() · 858aa5a4
      Zou Wei authored
      
      
      Add the missing unlock before return from function devm_aperture_acquire()
      in the error handling case.
      
      Signed-off-by: default avatarZou Wei <zou_wei@huawei.com>
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Fixes: 730e7992 ("drm/aperture: Add infrastructure for aperture ownership")
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Maxime Ripard <maxime@cerno.tech>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: dri-devel@lists.freedesktop.org
      Link: https://patchwork.freedesktop.org/patch/msgid/1620895564-52367-1-git-send-email-zou_wei@huawei.com
      858aa5a4
    • Randy Dunlap's avatar
      drm: simpledrm: print resource info using '%pr' · d84680d3
      Randy Dunlap authored
      struct resource start and end fields are not always long long,
      so using %llx to print them can cause build warnings (below).
      Fix these by using the special "%pr" for printing struct resource info.
      
      ../drivers/gpu/drm/tiny/simpledrm.c: In function ‘simpledrm_device_init_mm’:
      ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=]
      ../drivers/gpu/drm/tiny/simpledrm.c:533:54: note: format string is defined here
         drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n",
                                                         ~~~^
                                                         %x
      ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=]
      ../drivers/gpu/drm/tiny/simpledrm.c:533:61: note: format string is defined here
         drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n",
                                                                ~~~^
                                                                %x
      
      Fixes: 4aae79f7
      
       ("drm/simpledrm: Acquire memory aperture for framebuffer")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210512233459.19534-1-rdunlap@infradead.org
      d84680d3
    • Thomas Zimmermann's avatar
      drm/nouveau: Remove invalid reference to struct drm_device.pdev · bfba9416
      Thomas Zimmermann authored
      
      
      The pdev field got removed from struct drm_device recently. Replace
      the invalid reference with an upcast from the struct's dev field.
      
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Fixes: b347e044 ("drm: Remove pdev field from struct drm_device")
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Maxime Ripard <maxime@cerno.tech>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: dri-devel@lists.freedesktop.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20210512185527.26050-1-tzimmermann@suse.de
      bfba9416
    • Paul Cercueil's avatar
      drm/ingenic: Switch IPU plane to type OVERLAY · 68b433fe
      Paul Cercueil authored
      It should have been an OVERLAY from the beginning. The documentation
      stipulates that there should be an unique PRIMARY plane per CRTC.
      
      Fixes: fc1acf31
      
       ("drm/ingenic: Add support for the IPU")
      Cc: <stable@vger.kernel.org> # 5.8+
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarSimon Ser <contact@emersion.fr>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210329175046.214629-2-paul@crapouillou.net
      68b433fe
  6. May 12, 2021