Skip to content
  1. May 17, 2021
  2. May 15, 2021
  3. May 14, 2021
  4. 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
  5. May 12, 2021
  6. May 11, 2021
    • Zhen Lei's avatar
      drm/vc4: Remove redundant error printing in vc4_ioremap_regs() · ca0b0c1f
      Zhen Lei authored
      
      
      When devm_ioremap_resource() fails, a clear enough error message will be
      printed by its subfunction __devm_ioremap_resource(). The error
      information contains the device name, failure cause, and possibly resource
      information.
      
      Therefore, remove the error printing here to simplify code and reduce the
      binary size.
      
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210511092923.4617-1-thunder.leizhen@huawei.com
      ca0b0c1f
    • Thomas Zimmermann's avatar
      Merge drm/drm-next into drm-misc-next · fd531024
      Thomas Zimmermann authored
      
      
      Backmerging to get v5.12 fixes. Requested for vmwgfx.
      
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      fd531024
    • Thomas Zimmermann's avatar
      drm: Include <asm/agp.h> iff CONFIG_AGP is set · eb185a32
      Thomas Zimmermann authored
      
      
      Platforms without AGP don't provide the AGP header. Only include it
      if CONFIG_AGP is set.
      
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Fixes: 04dfe19a ("drm: Mark AGP implementation and ioctls as legacy")
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      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: "Christian König" <christian.koenig@amd.com>
      Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
      Cc: Jason Yan <yanaijie@huawei.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: dri-devel@lists.freedesktop.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20210510145218.10322-1-tzimmermann@suse.de
      eb185a32
    • Lyude Paul's avatar
      drm/dp: Fix bogus DPCD version check in drm_dp_read_downstream_info() · 208d8b9d
      Lyude Paul authored
      
      
      Ville pointed this out to me when fixing some issues in
      drm_dp_read_downstream_info() - the DPCD version check here is bogus as
      there's no DisplayPort versions prior to 1.0. The original code from i915
      that this was extracted from actually did:
      
        dpcd[DP_DPCD_REV] == DP_DPCD_REV_10
      
      Which is correct, and somehow got missed when extracting this function. So
      let's fix this. Note that as far as I'm aware, I don't think this fixes any
      actual issues users are hitting.
      
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210507214209.554866-1-lyude@redhat.com
      208d8b9d
  7. May 10, 2021